OpenTTD Source
20241108-master-g80f628063a
|
Command definitions related to terraforming. More...
Go to the source code of this file.
Functions | |
std::tuple< CommandCost, Money, TileIndex > | CmdTerraformLand (DoCommandFlag flags, TileIndex tile, Slope slope, bool dir_up) |
Terraform land. More... | |
std::tuple< CommandCost, Money, TileIndex > | CmdLevelLand (DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal, LevelMode lm) |
Levels a selected (rectangle) area of land. More... | |
DEF_CMD_TRAIT (CMD_LEVEL_LAND, CmdLevelLand, CMD_ALL_TILES|CMD_AUTO|CMD_NO_TEST, CMDT_LANDSCAPE_CONSTRUCTION) CommandCallback CcPlaySound_EXPLOSION | |
void | CcTerraform (Commands cmd, const CommandCost &result, Money, TileIndex tile) |
Command definitions related to terraforming.
Definition in file terraform_cmd.h.
std::tuple<CommandCost, Money, TileIndex> CmdLevelLand | ( | DoCommandFlag | flags, |
TileIndex | tile, | ||
TileIndex | start_tile, | ||
bool | diagonal, | ||
LevelMode | lm | ||
) |
Levels a selected (rectangle) area of land.
flags | for this command type |
tile | end tile of area-drag |
start_tile | start tile of area drag |
diagonal | Whether to use the Orthogonal (false) or Diagonal (true) iterator. |
LevelMode | Mode of leveling LevelMode . |
Definition at line 315 of file terraform_cmd.cpp.
References _current_company, _settings_game, CommandCost::AddCost(), CMD_ERROR, GameSettings::construction, TileIterator::Create(), DC_EXEC, EXPENSES_CONSTRUCTION, CommandCost::Failed(), GB(), GetAvailableMoneyForCommand(), CommandCost::GetCost(), CommandCost::GetErrorMessage(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), INVALID_STRING_ID, INVALID_TILE, LM_LEVEL, LM_LOWER, LM_RAISE, ConstructionSettings::map_height_limit, Map::Size(), SLOPE_N, CommandCost::Succeeded(), CompanyProperties::terraform_limit, and TileHeight().
std::tuple<CommandCost, Money, TileIndex> CmdTerraformLand | ( | DoCommandFlag | flags, |
TileIndex | tile, | ||
Slope | slope, | ||
bool | dir_up | ||
) |
Terraform land.
flags | for this command type |
tile | tile to terraform |
slope | corners to terraform (SLOPE_xxx) |
dir_up | direction; eg up (true) or down (false) |
Definition at line 169 of file terraform_cmd.cpp.
References _generating_world, _settings_game, CommandCost::AddCost(), GameSettings::construction, TerraformerState::dirty_tiles, EXPENSES_CONSTRUCTION, FindClearedObject(), ClearedObjectArea::first_tile, GetBridgeHeight(), GetSouthernBridgeEnd(), IsBridgeAbove(), IsTileType(), IsTunnelInWay(), ConstructionSettings::max_bridge_height, MP_VOID, Map::Size(), SLOPE_E, SLOPE_FLAT, SLOPE_N, SLOPE_S, SLOPE_STEEP, SLOPE_W, TerraformGetHeightOfTile(), TerraformTileHeight(), TileDiffXY(), and TileHeight().