Loading

Paste #pwmbeu9w0

  1. /**
  2.  * Make a ship depot section.
  3.  * @param t    Tile to place the ship depot section.
  4.  * @param owner_depot Owner of the depot.
  5.  * @param owner_canal Owner of the canal (only set if it's placed on canal).
  6.  * @param did  Depot ID.
  7.  * @param part Depot part (either #DEPOT_PART_NORTH or #DEPOT_PART_SOUTH).
  8.  * @param a    Axis of the depot.
  9.  * @param original_water_class Original water class.
  10.  */
  11. static inline void MakeShipDepot(TileIndex t, Owner owner_depot, Owner owner_canal, DepotID did, DepotPart part, Axis a, WaterClass original_water_class)
  12. {
  13.     SetTileType(t, MP_WATER);
  14.     SetTileOwner(t, owner_depot);
  15.     SetWaterClass(t, original_water_class);
  16.     if (original_water_class == WATER_CLASS_CANAL) SetCanalOwner(t, owner_canal);
  17.     _m[t].m2 = did;
  18.     _m[t].m3 = 0;
  19.     _m[t].m4 = 0;
  20.     _m[t].m5 = WBL_TYPE_DEPOT << WBL_TYPE_BEGIN | part << WBL_DEPOT_PART | a << WBL_DEPOT_AXIS;
  21.     SB(_me[t].m6, 2, 4, 0);
  22.     _me[t].m7 = 0;
  23. }

Version history

Revision # Author Created at
pbabrqnc1 Anonymous 13 Sep 2016, 15:53:07 UTC Diff

Comments