OpenTTD Source 20260206-master-g4d4e37dbf1
landscape_cmd.h File Reference

Command definitions related to landscape (slopes etc.). More...

#include "command_type.h"

Go to the source code of this file.

Functions

CommandCost CmdLandscapeClear (DoCommandFlags flags, TileIndex tile)
 Clear a piece of landscape.
std::tuple< CommandCost, Money > CmdClearArea (DoCommandFlags flags, TileIndex tile, TileIndex start_tile, bool diagonal)
 Clear a big piece of landscape.

Detailed Description

Command definitions related to landscape (slopes etc.).

Definition in file landscape_cmd.h.

Function Documentation

◆ CmdClearArea()

std::tuple< CommandCost, Money > CmdClearArea ( DoCommandFlags flags,
TileIndex tile,
TileIndex start_tile,
bool diagonal )

Clear a big piece of landscape.

Parameters
flagsof operation to conduct
tileend tile of area dragging
start_tilestart tile of area dragging
diagonalWhether to use the Orthogonal (false) or Diagonal (true) iterator.
Returns
the cost of this operation or an error

Definition at line 746 of file landscape.cpp.

References _current_company, _pause_mode, CommandCost::AddCost(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), Auto, Bankrupt, CompanyProperties::clear_limit, CMD_ERROR, TileIterator::Create(), CreateEffectVehicleAbove(), EV_EXPLOSION_LARGE, EV_EXPLOSION_SMALL, Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), ForceClearTile, GB(), GetAvailableMoneyForCommand(), CommandCost::GetCost(), INVALID_TILE, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), Map::Size(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TILE_SIZE, TileX(), and TileY().

◆ CmdLandscapeClear()