OpenTTD Source
20241121-master-g67a0fccfad
|
Public Member Functions | |
HouseID | Index () const |
Gets the index of this spec. More... | |
Money | GetRemovalCost () const |
Get the cost for removing this house. More... | |
Static Public Member Functions | |
static std::vector< HouseSpec > & | Specs () |
Get a reference to all HouseSpecs. More... | |
static HouseSpec * | Get (size_t house_id) |
Get the spec for a house ID. More... | |
Data Fields | |
TimerGameCalendar::Year | min_year |
introduction year of the house | |
TimerGameCalendar::Year | max_year |
last year it can be built | |
uint8_t | population |
population (Zero on other tiles in multi tile house.) | |
uint8_t | removal_cost |
cost multiplier for removing it | |
StringID | building_name |
building name | |
uint16_t | remove_rating_decrease |
rating decrease if removed | |
uint8_t | mail_generation |
mail generation multiplier (tile based, as the acceptances below) | |
uint8_t | cargo_acceptance [HOUSE_NUM_ACCEPTS] |
acceptance level for the cargo slots | |
CargoID | accepts_cargo [HOUSE_NUM_ACCEPTS] |
input cargo slots | |
BuildingFlags | building_flags |
some flags that describe the house (size, stadium etc...) | |
HouseZones | building_availability |
where can it be built (climates, zones) | |
bool | enabled |
the house is available to build (true by default, but can be disabled by newgrf) | |
GRFFileProps | grf_prop |
Properties related the the grf file. | |
uint16_t | callback_mask |
Bitmask of house callbacks that have to be called. | |
Colours | random_colour [4] |
4 "random" colours | |
uint8_t | probability |
Relative probability of appearing (16 is the standard value) | |
HouseExtraFlags | extra_flags |
some more flags | |
HouseClassID | class_id |
defines the class this house has (not grf file based) | |
AnimationInfo | animation |
information about the animation. | |
uint8_t | processing_time |
Periodic refresh multiplier. | |
uint8_t | minimum_life |
The minimum number of years this house will survive before the town rebuilds it. | |
CargoTypes | watched_cargoes |
Cargo types watched for acceptance. | |
CargoLabel | accepts_cargo_label [HOUSE_ORIGINAL_NUM_ACCEPTS] |
input landscape cargo slots | |
|
static |
Get the spec for a house ID.
house_id | The ID of the house. |
Definition at line 69 of file newgrf_house.cpp.
References NUM_HOUSES.
Referenced by AdvanceHouseConstruction(), ClearMakeHouseTile(), ClearTownHouse(), DecreaseBuildingCount(), DrawTile_Town(), HousePickerCallbacks::FillUsedItems(), HouseResolverObject::GetDebugID(), GetDistanceFromNearbyHouse(), GetFoundation_Town(), NIHHouse::GetGRFID(), GetHouseNorthPart(), GetHouseSpecGrf(), HousePickerCallbacks::GetPickerItem(), NIHHouse::GetSpec(), GetTranslatedHouseID(), HousePickerCallbacks::GetTypeName(), HouseResolverObject::HouseResolverObject(), IncreaseBuildingCount(), NIHHouse::IsInspectable(), HousePickerCallbacks::IsTypeAvailable(), MakeHouseTile(), MakeTownHouse(), SearchNearbyHouseClass(), SearchNearbyHouseGRFID(), SearchNearbyHouseID(), UpdateHousesAndTowns(), and WatchedCargoCallback().
Money HouseSpec::GetRemovalCost | ( | ) | const |
Get the cost for removing this house.
Definition at line 225 of file town_cmd.cpp.
HouseID HouseSpec::Index | ( | ) | const |
|
static |
Get a reference to all HouseSpecs.
Definition at line 50 of file newgrf_house.cpp.
Referenced by EnsureEarlyHouse(), HousePickerCallbacks::GetTypeCount(), InitializeBuildingCounts(), and HousePickerCallbacks::UpdateSavedItems().