Loading

Paste #pmtjm5zum

  1.     /* Check whether this industry provides its own station */
  2.     bool oil_rig = false;
  3.     TILE_AREA_LOOP(tile_cur, ind->location) {
  4.         if (IsTileType(tile_cur, MP_INDUSTRY) && GetIndustryGfx(tile_cur) == GFX_OILRIG_1) {
  5.             TileIndex other = tile_cur + TileDiffXY(0, -1);

Paste #pksaypzcl

  1. >>> s=""
  2. >>> for a in ["45","48","01","01"]:
  3. ...  s+=chr(int(a,16))
  4. ...
  5. >>> s
  6. 'EH\x01\x01'

Paste #phnoopups

  1. diff --git a/nml/actions/action0properties.py b/nml/actions/action0properties.py
  2. index eebfd95..53da8c3 100644
  3. --- a/nml/actions/action0properties.py
  4. +++ b/nml/actions/action0properties.py
  5. @@ -751,7 +751,7 @@ def industry_prod_multiplier(value):

Paste #pgrmrgrjf

  1.   0 ·. gui
  2.   1 .· gui
  3.   2 ·. cursor
  4.   3 .· cursor
  5.   4 ·. overlay

Paste #plqkzyzqp

  1. // define the newgrf
  2. grf {
  3.     grfid: "CA\12\1E";
  4.     name: string(STR_GRF_NAME);
  5.     desc: string(STR_GRF_DESCRIPTION);

Paste #p7fdfcmh8

  1. AIInfo *AIScannerInfo::FindInfo(const char *nameParam, int versionParam, bool force_exact_match)
  2. {
  3.     if (this->info_list.size() == 0) return NULL;
  4.     if (nameParam == NULL) return NULL;

Paste #prkv7boyh

  1. Ricardo@FX-8150 MINGW64 /d/OpenTTD/OpenTTD GitHub/OpenTTD (EnsureNoShipFromDiagDirs)
  2. $ git fetch upstream
  3.  
  4. Ricardo@FX-8150 MINGW64 /d/OpenTTD/OpenTTD GitHub/OpenTTD (EnsureNoShipFromDiagDirs)
  5. $ git rebase upstream/master

Paste #prwmmzcsg

  1. Index: road.h
  2. ===================================================================
  3. --- road.h  (revision 22654)
  4. +++ road.h  (working copy)
  5. @@ -215,6 +215,7 @@

Paste #pckrx0ldj

  1. /**
  2. + * Path of a file that is possibly stored inside another file.
  3. + * The #fs_path points to a file at the file system. This can be either the file expressed by
  4. + * the #FilePath object, or a container file like a tar-file. In the latter case, the
  5. + * #contained_path is the lower-case path to the expressed file inside the container file.

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 #pjyzssm5y

  1. switch(FEAT_ROADVEHS, SELF, switch_pickup0, [
  2.     STORE_TEMP(CB_FLAG_MORE_SPRITES | PALETTE_USE_DEFAULT, 0x100)
  3. ]) {
  4.     default: spriteset_truck;
  5. }

Paste #pj0ywzrna

  1. ~/ottd/pp$ ./bin/pp -o test.nml tests/tokenize_test.txt
  2. Traceback (most recent call last):
  3.   File "./bin/pp", line 15, in <module>
  4.     from pp import main
  5.   File "/home/ingo/ottd/pp/pp/main.py", line 4, in <module>

this works

  1. import multiprocessing as mp
  2. import time
  3.  
  4. def foo_pool(x):
  5.     time.sleep(2)

Paste #pozutqws7

  1.         local start_tick = AIController.GetTick();
  2.         for (local i = routeManager.m_townRouteArray.len() - 1; i >= 0; --i) {
  3. //          AILog.Info("managing route " + i + ". sellVehiclesInDepot");
  4.             routeManager.m_townRouteArray[i].sellVehiclesInDepot();
  5.         }

Paste #pifab1uny

  1. /*
  2.  * CBA98 7654 3210
  3.  *             xxx <- RoadFlags
  4.  *   yyy xxxx x    <- RoadTypeIdentifier
  5.  *     x           <- _one_way_button_clicked
  6. */