OpenTTD Source 20241224-master-gee860a5c8e
|
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. | |
std::tuple< CommandCost, Money, TileIndex > | CmdLevelLand (DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal, LevelMode lm) |
Levels a selected (rectangle) area of land. | |
void | CcTerraform (Commands cmd, const CommandCost &result, Money, TileIndex tile) |
Variables | |
CommandCallback | CcPlaySound_EXPLOSION |
Command definitions related to terraforming.
Definition in file terraform_cmd.h.
void CcTerraform | ( | Commands | cmd, |
const CommandCost & | result, | ||
Money | , | ||
TileIndex | tile | ||
) |
Definition at line 48 of file terraform_gui.cpp.
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 _current_company, _generating_world, _settings_game, _tile_type_procs, CommandCost::AddCost(), Backup< T >::Change(), GameSettings::construction, DC_AUTO, DC_EXEC, DC_FORCE_CLEAR_TILE, DC_NO_MODIFY_TOWN_RATING, TerraformerState::dirty_tiles, EXPENSES_CONSTRUCTION, CommandCost::Failed(), FindClearedObject(), ClearedObjectArea::first_tile, GB(), GetBridgeHeight(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), GetSouthernBridgeEnd(), GetTileType(), INVALID_TILE, IsBridgeAbove(), IsTileType(), IsTunnelInWay(), MarkTileDirtyByTile(), ConstructionSettings::max_bridge_height, MP_VOID, Backup< T >::Restore(), SetTileHeight(), Map::Size(), SLOPE_E, SLOPE_FLAT, SLOPE_N, SLOPE_S, SLOPE_STEEP, SLOPE_W, CommandCost::Succeeded(), CompanyProperties::terraform_limit, TileTypeProcs::terraform_tile_proc, TerraformGetHeightOfTile(), TerraformTileHeight(), TerraformerState::tile_to_new_height, TileDiffXY(), and TileHeight().
CommandCallback CcPlaySound_EXPLOSION |
Definition at line 23 of file terraform_cmd.h.