Loading

Paste #pv4hpnauh

  1.         int mass = t->cache.num_houses / 8;
  2.         /* Actually we are proportional to sqrt() but that's right because we are covering an area.
  3.          * The offsets are to make sure the radii do not decrease in size when going from the table
  4.          * to the calculated value.*/
  5.         t->cache.squared_town_zone_radius[0] = mass * 15 - 40;

Paste #pzwsfd4w1

  1. NewGRF: 0x37c9810 cargo:19 amount:3
  2. NewGRF: 0x37c9810 cargo:14 amount:8
  3. NewGRF: 0x37c9810 cargo:19 amount:3
  4. NewGRF: 0x37c9810 cargo:15 amount:8

Paste #pouurpwrj

  1. switch (FEAT_SHIPS, SELF, ${ship.id}_switch_graphics_ship_not_moving, STORE_TEMP(PALETTE_USE_DEFAULT, 0x100)) {
  2.     0: return ${ship.id}_sg_not_moving;
  3. }
  4. switch (FEAT_SHIPS, SELF, ${ship.id}_switch_graphics_ship_moving, STORE_TEMP(CB_FLAG_MORE_SPRITES | PALETTE_USE_DEFAULT, 0x100)) {
  5.     return ${ship.id}_sg_moving;

Paste #pefl5urrc

  1. NML today:
  2.  
  3. cargotable                                                            { }
  4. template            identifier (...)                                  { }
  5. spritset                       (identifier, ...)                      { }

PSEUDO CODE

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

Arctic Basic v3

  1. Sulfur
  2. Clay
  3. Engineering Supplies
  4. Farm Supplies
  5. Food

Paste #p0wjbgi2l

  1. /*
  2.  * This file is aimed to provide an example on how to code a vehicle in NML
  3.  * In this case a road vehicle is coded, other vehicle types work in a similar fashion.
  4.  * To keep the code readable, not every property or variable is documented in
  5.  * detail, refer to the vehicle-specific reference in the documentation.

NRT SE

  1. Handling NRT in Scenario Editor (SE)
  2.  
  3. Which RoadTypes should be available to be built?
  4.  - Tramways are buildable only by players (not city)
  5.    frosch: trams can also be allowed in SE. they would be buildable like canals, and owned by OWNER_NONE.

Paste #pnyij7sau

  1. Rail, in-game: railtype available only if vehicle is available, "build infrastructure when not available" has no effect
  2. Rail, scen-edit: never available
  3.  
  4. Road, in-game: roadtype available if vehicle is available. default road is also available if "build infrastructure when not available" is enabled
  5. Road, scen-edit: roadtype available if vehicle is available at some date in the past or future. default road is always available

temporary transparency

  1. Index: src/dock_gui.cpp
  2. ===================================================================
  3. --- src/dock_gui.cpp    (revision 27772)
  4. +++ src/dock_gui.cpp    (working copy)
  5. @@ -27,6 +27,7 @@

Paste #pb2hvgyfg

  1. static void CheckIfAircraftNeedsService(Aircraft *v)
  2. {
  3.     if (Company::Get(v->owner)->settings.vehicle.servint_aircraft == 0 || !v->NeedsAutomaticServicing()) return;
  4.     if (v->IsChainInDepot()) {
  5.         VehicleServiceInDepot(v);

Paste #pzrn5no1x

  1. [SRC] Linking openttd
  2. make[1]: Leaving directory '/home/lordaro/dev/openttd/objs/release'
  3. [11:08 lordaro@Apollo openttd] > git d
  4. diff --git a/src/fontcache.cpp b/src/fontcache.cpp
  5. index 7c358145b..b7df8df7f 100644

Paste #pw0td0crh

  1. Index: src/station_cmd.cpp
  2. ===================================================================
  3. --- src/station_cmd.cpp (revision 27655)
  4. +++ src/station_cmd.cpp (working copy)
  5. @@ -2443,6 +2443,48 @@

nvidia issue with last up

  1. Updates were installed last night unsupervised (agreeing to install updates when shutting down system). This morning the graphics card and monitors do not seem to be recognized anymore. The relevant update (the only other one installed at that time affects virtualbox, sorry for German locale):
  2.  
  3. planetmaker@aeolusmaximus:~$ sudo dnf history info 88
  4. Transaktions-ID : 88
  5. Anfangszeit : Sat May 20 01:05:13 2017

Paste #psxs30xcq

  1.   0 ·. gui                        ROTSG_CURSORS +  0
  2.   1 .· gui                        ROTSG_CURSORS +  1
  3.   2 ·. cursor                     ROTSG_CURSORS +  2
  4.   3 .· cursor                     ROTSG_CURSORS +  3