OpenTTD Source 20250312-master-gcdcc6b491d
|
Command definitions related to objects. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdBuildObject (DoCommandFlags flags, TileIndex tile, ObjectType type, uint8_t view) |
Build an object object. | |
CommandCost | CmdBuildObjectArea (DoCommandFlags 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 | ( | DoCommandFlags | 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 205 of file object_cmd.cpp.
References _current_company, _generating_world, CommandCost::AddCost(), AllowUnderBridge, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), CompanyProperties::build_object_limit, BuildObject(), BuiltOnWater, CALLBACK_FAILED, ObjectSpec::callback_mask, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_object_pool >::CanAllocateItem(), CBID_OBJECT_LAND_SLOPE_CHECK, CheckBuildableTile(), CheckOwnership(), CMD_ERROR, EnsureNoVehicleOnGround(), Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), ObjectSpec::flags, GB(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::Get(), ObjectSpec::Get(), GetBridgeHeight(), ObjectSpec::GetBuildCost(), GetErrorMessageFromLocationCallbackResult(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::GetIfValid(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::GetNumItems(), GetObjectCallback(), GetSouthernBridgeEnd(), GetTileMaxZ(), GetTileOwner(), GetTileSlope(), GetTileSlopeZ(), ObjectSpec::grf_prop, GRFFilePropsBase::grffile, HasBit(), HasTileWaterGround(), ObjectSpec::height, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, INVALID_TILE, ObjectSpec::IsAvailable(), IsBridgeAbove(), IsObjectType(), IsTileFlat(), IsTileOwner(), IsTileType(), IsValidTile(), IsWaterTile(), CompanyProperties::location_of_HQ, MP_OBJECT, NoModifyTownRating, NotOnLand, NoWater, OBJECT_HQ, OBJECT_LIGHTHOUSE, OBJECT_OWNED_LAND, OBJECT_STATUE, OBJECT_TRANSMITTER, OnlyInGame, OnlyInScenedit, OWNER_DEITY, OWNER_NONE, OWNER_WATER, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset(), SetWindowDirty(), ObjectSpec::size, SLOPE_FLAT, SlopeCheck, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TileX(), TileY(), ToggleBit(), UpdateCompanyHQ(), UpdateCompanyRatingAndValue(), ObjectSpec::views, ObjectSpec::WasEverAvailable(), and WC_COMPANY.
CommandCost CmdBuildObjectArea | ( | DoCommandFlags | 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 386 of file object_cmd.cpp.
References _current_company, CommandCost::AddCost(), CompanyProperties::build_object_limit, CMD_ERROR, TileIterator::Create(), Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), GB(), ObjectSpec::Get(), GetAvailableMoneyForCommand(), CommandCost::GetCost(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::GetIfValid(), INVALID_TILE, OBJECT_SIZE_1X1, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Reset(), Map::Size(), ObjectSpec::size, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and ObjectSpec::views.