Loading

Paste #plrxydqmr

  1.     do {
  2.         TileIndex cur_tile = tile + ToTileIndexDiff(it->ti);
  3.  
  4.         if (it->gfx != GFX_WATERTILE_SPECIALCHECK) {
  5.             i->location.Add(cur_tile);
  6.  
  7.             WaterClass wc = (IsWaterTile(cur_tile) ? GetWaterClass(cur_tile) : WATER_CLASS_INVALID);
  8.             Owner old_owner = GetTileOwner(cur_tile);
  9.             DoCommand(cur_tile, 0, 0, DC_EXEC | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);
  10.             SetTileOwner(cur_tile, old_owner);
  11.             MakeIndustry(cur_tile, i->index, it->gfx, Random(), wc);
  12.  
  13.             if (_generating_world) {
  14.                 SetIndustryConstructionCounter(cur_tile, 3);
  15.                 SetIndustryConstructionStage(cur_tile, 2);
  16.             }
  17.  
  18.             /* it->gfx is stored in the map. But the translated ID cur_gfx is the interesting one */
  19.             IndustryGfx cur_gfx = GetTranslatedIndustryTileID(it->gfx);
  20.             const IndustryTileSpec *its = GetIndustryTileSpec(cur_gfx);
  21.             if (its->animation.status != ANIM_STATUS_NO_ANIMATION) AddAnimatedTile(cur_tile);
  22.         }
  23.     } while ((++it)->ti.x != -0x80);

Version history

Revision # Author Created at
pwhxeitqi Anonymous 27 Feb 2015, 18:16:12 UTC Diff

Comments