OpenTTD Source 20241224-master-gf74b0cf984
terraform_cmd.h File Reference

Command definitions related to terraforming. More...

#include "command_type.h"
#include "map_type.h"
#include "slope_type.h"

Go to the source code of this file.

Functions

std::tuple< CommandCost, Money, TileIndexCmdTerraformLand (DoCommandFlag flags, TileIndex tile, Slope slope, bool dir_up)
 Terraform land.
 
std::tuple< CommandCost, Money, TileIndexCmdLevelLand (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
 

Detailed Description

Command definitions related to terraforming.

Definition in file terraform_cmd.h.

Function Documentation

◆ CcTerraform()

void CcTerraform ( Commands  cmd,
const CommandCost result,
Money  ,
TileIndex  tile 
)

Definition at line 48 of file terraform_gui.cpp.

◆ CmdLevelLand()

std::tuple< CommandCost, Money, TileIndex > CmdLevelLand ( DoCommandFlag  flags,
TileIndex  tile,
TileIndex  start_tile,
bool  diagonal,
LevelMode  lm 
)

Levels a selected (rectangle) area of land.

Parameters
flagsfor this command type
tileend tile of area-drag
start_tilestart tile of area drag
diagonalWhether to use the Orthogonal (false) or Diagonal (true) iterator.
LevelModeMode of leveling LevelMode.
Returns
the cost of this operation or an error

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().

◆ CmdTerraformLand()

Variable Documentation

◆ CcPlaySound_EXPLOSION

CommandCallback CcPlaySound_EXPLOSION

Definition at line 23 of file terraform_cmd.h.