OpenTTD Source 20241224-master-gf74b0cf984
|
Command definitions related to tree tiles. More...
#include "command_type.h"
Go to the source code of this file.
Functions | |
CommandCost | CmdPlantTree (DoCommandFlag flags, TileIndex tile, TileIndex start_tile, uint8_t tree_to_plant, bool diagonal) |
Plant a tree. | |
Command definitions related to tree tiles.
Definition in file tree_cmd.h.
CommandCost CmdPlantTree | ( | DoCommandFlag | flags, |
TileIndex | tile, | ||
TileIndex | start_tile, | ||
uint8_t | tree_to_plant, | ||
bool | diagonal | ||
) |
Plant a tree.
flags | type of operation |
tile | end tile of area-drag |
start_tile | start tile of area-drag of tree plantation |
tree_to_plant | tree type, TREE_INVALID means random. |
diagonal | Whether to use the Orthogonal (false) or Diagonal (true) iterator. |
Definition at line 389 of file tree_cmd.cpp.
References _current_company, _settings_game, CommandCost::AddCost(), AddTreeCount(), ChangeTownRating(), CLEAR_FIELDS, CLEAR_ROCKS, ClosestTownFromTile(), CMD_ERROR, TileIterator::Create(), DC_EXEC, EconomySettings::dist_local_authority, GameSettings::economy, EXPENSES_OTHER, CommandCost::Failed(), GameSettings::game_creation, GB(), CommandCost::GetCost(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), GetRandomTreeType(), GetRawClearGround(), GetTileSlope(), GetTileType(), GetTreeCount(), GetTropicZone(), Growing1, Grown, INVALID_STRING_ID, INVALID_TILE, IsBridgeAbove(), IsCoast(), IsInsideBS(), IsInsideMM(), IsSlopeWithOneCornerRaised(), IsTileType(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), GameCreationSettings::landscape, MarkTileDirtyByTile(), MP_CLEAR, MP_TREES, MP_WATER, PlantTreesOnTile(), SetTropicZone(), Map::Size(), TREE_CACTUS, TREE_INVALID, CompanyProperties::tree_limit, TREE_RAINFOREST, TREE_SUB_TROPICAL, TREE_TOYLAND, TROPICZONE_DESERT, TROPICZONE_NORMAL, and TROPICZONE_RAINFOREST.