OpenTTD Source 20241224-master-gf74b0cf984
|
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. | |
CommandCost | CmdBuildObjectArea (DoCommandFlag flags, TileIndex tile, TileIndex start_tile, ObjectType type, uint8_t view, bool diagonal) |
Construct multiple objects in an area. | |
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 _current_company, _generating_world, CommandCost::AddCost(), CompanyProperties::build_object_limit, BuildObject(), CALLBACK_FAILED, ObjectSpec::callback_mask, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_object_pool >::CanAllocateItem(), CBID_OBJECT_LAND_SLOPE_CHECK, CBM_OBJ_SLOPE_CHECK, CheckBuildableTile(), CheckOwnership(), CMD_ERROR, DC_EXEC, DC_NO_MODIFY_TOWN_RATING, DC_NO_WATER, EnsureNoVehicleOnGround(), EXPENSES_CONSTRUCTION, CommandCost::Failed(), ObjectSpec::flags, GB(), ObjectSpec::Get(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::Get(), GetBridgeHeight(), ObjectSpec::GetBuildCost(), GetErrorMessageFromLocationCallbackResult(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::GetIfValid(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_town_pool >::GetNumItems(), GetObjectCallback(), GetSouthernBridgeEnd(), GetTileMaxZ(), GetTileOwner(), GetTileSlope(), GetTileSlopeZ(), ObjectSpec::grf_prop, GRFFilePropsBase< Tcnt >::grffile, HasBit(), HasTileWaterGround(), ObjectSpec::height, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, INVALID_TILE, ObjectSpec::IsAvailable(), IsBridgeAbove(), IsObjectType(), IsTileFlat(), IsTileOwner(), IsTileType(), IsValidTile(), IsWaterTile(), CompanyProperties::location_of_HQ, MAX_COMPANIES, MP_OBJECT, OBJECT_FLAG_ALLOW_UNDER_BRIDGE, OBJECT_FLAG_BUILT_ON_WATER, OBJECT_FLAG_NOT_ON_LAND, OBJECT_FLAG_ONLY_IN_GAME, OBJECT_FLAG_ONLY_IN_SCENEDIT, OBJECT_HQ, OBJECT_LIGHTHOUSE, OBJECT_OWNED_LAND, OBJECT_STATUE, OBJECT_TRANSMITTER, OWNER_DEITY, OWNER_NONE, OWNER_WATER, SetWindowDirty(), ObjectSpec::size, SLOPE_FLAT, TileX(), TileY(), ToggleBit(), UpdateCompanyHQ(), UpdateCompanyRatingAndValue(), ObjectSpec::views, ObjectSpec::WasEverAvailable(), and WC_COMPANY.
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.