Loading

Paste #p2pn4keww

  1. uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, SourceID source_id, const StationList *all_stations)
  2. {
  3.     /* Return if nothing to do. Also the rounding below fails for 0. */
  4.     if (amount == 0) return 0;

Paste #p9hlizjtm

  1. Index: src/autoreplace_cmd.cpp
  2. ===================================================================
  3. --- src/autoreplace_cmd.cpp (revision 27930)
  4. +++ src/autoreplace_cmd.cpp (working copy)
  5. @@ -78,11 +78,6 @@

Paste #pp2vtpnsv

  1. Index: src/economy.cpp
  2. ===================================================================
  3. --- src/economy.cpp (revision 27964)
  4. +++ src/economy.cpp (working copy)
  5. @@ -294,7 +294,15 @@

Paste #pamsfeefa

  1. >>> import json
  2. >>> x=[1,2,3]
  3. >>> print(json.dumps(x, sort_keys=True, indent=4))
  4. [
  5.     1,

Paste #p1xjx4tqv

  1. /**
  2.  * Type safe Gnome Sort.
  3.  *
  4.  * This is a slightly modified Gnome search. The basic
  5.  * Gnome search tries to sort already sorted list parts.

Paste #pbftxsvuw

  1. static CargoID cargo_type_comparator;
  2. static int CDECL CompareCargoRatings(Station * const *a, Station * const *b)
  3. {
  4.     return (*b)->goods[cargo_type_comparator].rating - (*a)->goods[cargo_type_comparator].rating;
  5. }

Paste #pyxuf1a7i

  1.     /* Create additional river tiles around possible lock locations to connect them. */
  2.     for (uint tile = 0; tile != MapSize(); tile++) {
  3.         if (IsValidTile(tile) && IsTileType(tile, MP_WATER) && IsRiver(tile) && IsInclinedSlope(GetTileSlope(tile))) {
  4.  
  5.             Slope slope = GetTileSlope(tile);

Paste #pdbjhwad9

  1. /**
  2.  * Check whether a river could (logically) flow into a lock.
  3.  * @param tile the middle tile of a lock.
  4.  * @recursive whether the function is being called recursively.
  5.  * @return true iff the water can be flowing into a lock.

layered wagon

  1.  
  2. spriteset           (spriteset_wagon_wheel, "../gfx/8bpp/hopper-test/x1/wagon-wheel-x1-8bpp.png" )  {template_vehicle8_x1_8bpp(0)}
  3. alternative_sprites (spriteset_wagon_wheel, ZOOM_LEVEL_IN_4X,  BIT_DEPTH_8BPP         )     {template_vehicle8_x4(0, "../gfx/8bpp/hopper-test/wagon-wheel-8bpp.png")}
  4. alternative_sprites (spriteset_wagon_wheel, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP        )     {template_vehicle8_x1(0, "../gfx/32bpp/hopper-test/x1/wagon-wheel-x1.png")}
  5. alternative_sprites (spriteset_wagon_wheel, ZOOM_LEVEL_IN_4X,  BIT_DEPTH_32BPP        )   {template_vehicle8_x4(0, "../gfx/32bpp/hopper-test/wagon-wheel.png")}

Paste #pv6sresix

  1. diff -r 62877abb8ef0 webtranslate/users/redmine.py
  2. --- a/webtranslate/users/redmine.py Fri Dec 23 14:39:42 2016 +0100
  3. +++ b/webtranslate/users/redmine.py Mon Jan 08 19:08:25 2018 +0100
  4. @@ -118,20 +118,21 @@

Paste #phtxvttpa

  1. function Utils::AreOtherStationsNearby(tile, cargoClass, stationId) {
  2.     local stationType = cargoClass == AICargo.CC_PASSENGERS ? AIStation.STATION_BUS_STOP : AIStation.STATION_TRUCK_STOP;
  3.    
  4.     //check if there are other stations squareSize squares nearby
  5.     local squareSize = AIStation.GetCoverageRadius(stationType);

Paste #pceswwkbb

  1.     /* Check whether the third tile is an aqueduct head, or a water tile
  2.      * with one corner raised with or without a rail track, or a buoy. */
  3.     if (!IsTileType(tile_cur, MP_WATER)) {
  4.         if (IsTileType(tile_cur, MP_TUNNELBRIDGE)) {
  5.             if (GetTunnelBridgeTransportType(tile_cur) != TRANSPORT_WATER) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);

Paste #pe46uito2

  1. diff -r 95b0092b4639 src/grfstrip.cpp
  2. --- a/src/grfstrip.cpp  Tue Jul 19 20:58:18 2016 +0200
  3. +++ b/src/grfstrip.cpp  Mon Oct 23 20:18:09 2017 +0200
  4. @@ -169,7 +169,7 @@
  5.             "GRFSTRIP " VERSION " - Copyright (C) 2009 by Remko Bijker\n"

palette-converter_v9.py

  1. import math
  2. import time
  3. import datetime
  4. import os
  5. from os import remove

Wolf01

  1. NWidget(WWT_PANEL, COLOUR_RED), SetPadding(10, 10, 10, 10),
  2.     NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(200, 100),
  3.         NWidget(WWT_CAPTION, COLOUR_GREEN),
  4.     EndContainer(),
  5. EndContainer(),