OpenTTD Source 20250205-master-gfd85ab1e2c
|
Command definitions related to water tiles. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdBuildShipDepot (DoCommandFlag flags, TileIndex tile, Axis axis) |
Build a ship depot. | |
CommandCost | CmdBuildCanal (DoCommandFlag flags, TileIndex tile, TileIndex start_tile, WaterClass wc, bool diagonal) |
Build a piece of canal. | |
CommandCost | CmdBuildLock (DoCommandFlag flags, TileIndex tile) |
Builds a lock. | |
Command definitions related to water tiles.
Definition in file water_cmd.h.
CommandCost CmdBuildCanal | ( | DoCommandFlag | 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 472 of file water_cmd.cpp.
References _current_company, CommandCost::AddCost(), CheckForDockingTile(), CircularTileSearch(), CMD_ERROR, TileIterator::Create(), DC_EXEC, DirtyCompanyInfrastructureWindows(), EXPENSES_CONSTRUCTION, CommandCost::Failed(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::Get(), CommandCost::GetCost(), GetTileOwner(), GetTileSlope(), INVALID_TILE, IsCanal(), IsInclinedSlope(), IsTileOwner(), IsTileType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), IsValidWaterClass(), IsWaterTile(), MakeCanal(), MakeRiver(), MakeSea(), MarkCanalsAndRiversAroundDirty(), MarkTileDirtyByTile(), MP_WATER, OWNER_NONE, Random, RIVER_OFFSET_DESERT_DISTANCE, RiverModifyDesertZone(), Map::Size(), SLOPE_FLAT, TileHeight(), WATER_CLASS_CANAL, WATER_CLASS_RIVER, and WATER_CLASS_SEA.
CommandCost CmdBuildLock | ( | DoCommandFlag | flags, |
TileIndex | tile | ||
) |
Builds a lock.
flags | type of operation |
tile | tile where to place the lock |
Definition at line 435 of file water_cmd.cpp.
References DoBuildLock(), GetInclinedSlopeDirection(), GetTileSlope(), and INVALID_DIAGDIR.
CommandCost CmdBuildShipDepot | ( | DoCommandFlag | 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(), Depot::build_date, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_depot_pool >::CanAllocateItem(), CheckForDockingTile(), CMD_ERROR, TimerGameCalendar::date, DC_AUTO, DC_EXEC, DEPOT_PART_NORTH, DEPOT_PART_SOUTH, DirtyCompanyInfrastructureWindows(), EXPENSES_CONSTRUCTION, CommandCost::Failed(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::Get(), GetWaterClass(), HasTileWaterClass(), HasTileWaterGround(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, IsBridgeAbove(), IsTileFlat(), IsTileOwner(), IsValidAxis(), IsWaterTile(), LOCK_DEPOT_TILE_FACTOR, MakeDefaultName(), MakeShipDepot(), MarkTileDirtyByTile(), TileOffsByAxis(), and WATER_CLASS_CANAL.