OpenTTD Source
20241108-master-g80f628063a
|
Command definitions related to objects. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdBuildObject (DoCommandFlag flags, TileIndex tile, ObjectType type, uint8_t view) |
Build an object object. More... | |
CommandCost | CmdBuildObjectArea (DoCommandFlag flags, TileIndex tile, TileIndex start_tile, ObjectType type, uint8_t view, bool diagonal) |
Construct multiple objects in an area. More... | |
Command definitions related to objects.
Definition in file object_cmd.h.
CommandCost CmdBuildObject | ( | DoCommandFlag | flags, |
TileIndex | tile, | ||
ObjectType | type, | ||
uint8_t | view | ||
) |
Build an object object.
flags | type of operation |
tile | tile where the object will be located |
type | the object type to build |
view | the view for the object |
Definition at line 210 of file object_cmd.cpp.
References CMD_ERROR, EXPENSES_CONSTRUCTION, and ObjectSpec::Get().
CommandCost CmdBuildObjectArea | ( | DoCommandFlag | flags, |
TileIndex | tile, | ||
TileIndex | start_tile, | ||
ObjectType | type, | ||
uint8_t | view, | ||
bool | diagonal | ||
) |
Construct multiple objects in an area.
flags | of operation to conduct |
tile | end tile of area dragging |
start_tile | start tile of area dragging |
type | the object type to build |
view | the view for the object |
diagonal | Whether to use the Orthogonal (0) or Diagonal (1) iterator. |
Definition at line 391 of file object_cmd.cpp.
References _current_company, CommandCost::AddCost(), CompanyProperties::build_object_limit, CMD_ERROR, TileIterator::Create(), DC_EXEC, EXPENSES_CONSTRUCTION, CommandCost::Failed(), GB(), ObjectSpec::Get(), GetAvailableMoneyForCommand(), CommandCost::GetCost(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), INVALID_TILE, OBJECT_SIZE_1X1, Map::Size(), ObjectSpec::size, and ObjectSpec::views.