OpenTTD Source 20260208-master-g43af8e94d0
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 (DoCommandFlags flags, TileIndex tile, Slope slope, bool dir_up)
 Terraform land.
std::tuple< CommandCost, Money, TileIndexCmdLevelLand (DoCommandFlags 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 ( DoCommandFlags 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 Diagonal or Orthogonal tile iterator.
lmMode 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, TileIterator::Create(), Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), GB(), GetAvailableMoneyForCommand(), CommandCost::GetCost(), CommandCost::GetErrorMessage(), INVALID_STRING_ID, INVALID_TILE, LM_LEVEL, LM_LOWER, LM_RAISE, Map::Size(), SLOPE_N, CommandCost::Succeeded(), CompanyProperties::terraform_limit, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and TileHeight().

◆ CmdTerraformLand()

Variable Documentation

◆ CcPlaySound_EXPLOSION

CommandCallback CcPlaySound_EXPLOSION

Definition at line 23 of file terraform_cmd.h.