OpenTTD Source 20250428-master-g68ba2735ea
|
Command definitions related to water tiles. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdBuildShipDepot (DoCommandFlags flags, TileIndex tile, Axis axis) |
Build a ship depot. | |
CommandCost | CmdBuildCanal (DoCommandFlags flags, TileIndex tile, TileIndex start_tile, WaterClass wc, bool diagonal) |
Build a piece of canal. | |
CommandCost | CmdBuildLock (DoCommandFlags flags, TileIndex tile) |
Builds a lock. | |
Command definitions related to water tiles.
Definition in file water_cmd.h.
CommandCost CmdBuildCanal | ( | DoCommandFlags | flags, |
TileIndex | tile, | ||
TileIndex | start_tile, | ||
WaterClass | wc, | ||
bool | diagonal | ||
) |
Build a piece of canal.
flags | type of operation |
tile | end tile of stretch-dragging |
start_tile | start tile of stretch-dragging |
wc | waterclass to build. sea and river can only be built in scenario editor |
diagonal | Whether to use the Orthogonal (0) or Diagonal (1) iterator. |
Definition at line 466 of file water_cmd.cpp.
References _current_company, CommandCost::AddCost(), CheckForDockingTile(), CMD_ERROR, TileIterator::Create(), DirtyCompanyInfrastructureWindows(), Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), CommandCost::GetCost(), GetTileOwner(), GetTileSlope(), GetTropicZone(), INVALID_TILE, IsCanal(), IsInclinedSlope(), IsTileOwner(), IsTileType(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), IsValidWaterClass(), IsWaterTile(), MakeCanal(), MakeRiver(), MakeSea(), MarkCanalsAndRiversAroundDirty(), MarkTileDirtyByTile(), MP_WATER, OWNER_NONE, Random, RIVER_OFFSET_DESERT_DISTANCE, SetTropicZone(), Map::Size(), SLOPE_FLAT, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TileHeight(), TROPICZONE_DESERT, TROPICZONE_NORMAL, WATER_CLASS_CANAL, WATER_CLASS_RIVER, and WATER_CLASS_SEA.
CommandCost CmdBuildLock | ( | DoCommandFlags | flags, |
TileIndex | tile | ||
) |
Builds a lock.
flags | type of operation |
tile | tile where to place the lock |
Definition at line 434 of file water_cmd.cpp.
References DoBuildLock(), GetInclinedSlopeDirection(), GetTileSlope(), and INVALID_DIAGDIR.
CommandCost CmdBuildShipDepot | ( | DoCommandFlags | flags, |
TileIndex | tile, | ||
Axis | axis | ||
) |
Build a ship depot.
flags | type of operation |
tile | tile where ship depot is built |
axis | depot orientation (Axis) |
Definition at line 112 of file water_cmd.cpp.
References _current_company, CommandCost::AddCost(), Auto, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_depot_pool >::CanAllocateItem(), CheckForDockingTile(), CMD_ERROR, DEPOT_PART_NORTH, DEPOT_PART_SOUTH, DirtyCompanyInfrastructureWindows(), Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), CommandCost::GetCost(), GetWaterClass(), HasTileWaterClass(), HasTileWaterGround(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, IsBridgeAbove(), IsTileFlat(), IsTileOwner(), IsValidAxis(), IsWaterTile(), LOCK_DEPOT_TILE_FACTOR, MakeDefaultName(), MakeShipDepot(), MarkTileDirtyByTile(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TileOffsByAxis(), and WATER_CLASS_CANAL.