OpenTTD Source 20241224-master-gf74b0cf984
|
Public Member Functions | |
HouseID | Index () const |
Gets the index of this spec. | |
Money | GetRemovalCost () const |
Get the cost for removing this house. | |
Static Public Member Functions | |
static std::vector< HouseSpec > & | Specs () |
Get a reference to all HouseSpecs. | |
static HouseSpec * | Get (size_t house_id) |
Get the spec for a house ID. | |
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(), AdvanceSingleHouseConstruction(), AnimateTile_Town(), ClearMakeHouseTile(), ClearTile_Town(), ClearTownHouse(), DecreaseBuildingCount(), DoWatchedCargoCallback(), DrawHouseInGUI(), DrawTile_Town(), HousePickerCallbacks::FillUsedItems(), FinaliseHouseArray(), HouseResolverObject::GetDebugID(), GetDistanceFromNearbyHouse(), GetFoundation_Town(), NIHHouse::GetGRFID(), GetHouseNorthPart(), GetHouseSpecGrf(), HousePickerCallbacks::GetPickerItem(), NIHHouse::GetSpec(), GetTranslatedHouseID(), HousePickerCallbacks::GetTypeName(), HouseScopeResolver::GetVariable(), HouseResolverObject::HouseResolverObject(), IncreaseBuildingCount(), IsHouseSpecValid(), NIHHouse::IsInspectable(), HousePickerCallbacks::IsTypeAvailable(), MakeHouseTile(), MakeTownHouse(), BuildHouseWindow::OnInvalidateData(), BuildHouseWindow::OnPlaceObject(), RebuildTownCaches(), SearchNearbyHouseClass(), SearchNearbyHouseGRFID(), SearchNearbyHouseID(), HouseOverrideManager::SetEntitySpec(), TileLoop_Town(), TownHouseChangeInfo(), TryBuildTownHouse(), UpdateHousesAndTowns(), and WatchedCargoCallback().
Money HouseSpec::GetRemovalCost | ( | ) | const |
Get the cost for removing this house.
Definition at line 225 of file town_cmd.cpp.
References removal_cost.
Referenced by ClearTile_Town().
HouseID HouseSpec::Index | ( | ) | const |
Gets the index of this spec.
Definition at line 59 of file newgrf_house.cpp.
Referenced by GetAcceptedCargoOfHouse(), GetHouseName(), BuildHouseWindow::OnPlaceObject(), and TryBuildTownHouse().
|
static |
Get a reference to all HouseSpecs.
Definition at line 50 of file newgrf_house.cpp.
Referenced by CargoesRow::ConnectIndustryAccepted(), EnsureEarlyHouse(), FinaliseHouseArray(), HousePickerCallbacks::GetTypeCount(), IndustryCargoesWindow::HousesCanAccept(), InitializeBuildingCounts(), InitializeBuildingCounts(), HouseOverrideManager::SetEntitySpec(), TryBuildTownHouse(), and HousePickerCallbacks::UpdateSavedItems().
CargoID HouseSpec::accepts_cargo[HOUSE_NUM_ACCEPTS] |
input cargo slots
Definition at line 103 of file house.h.
Referenced by AddAcceptedCargoOfHouse(), and FinaliseHouseArray().
CargoLabel HouseSpec::accepts_cargo_label[HOUSE_ORIGINAL_NUM_ACCEPTS] |
input landscape cargo slots
Definition at line 120 of file house.h.
Referenced by FinaliseHouseArray().
AnimationInfo HouseSpec::animation |
HouseZones HouseSpec::building_availability |
where can it be built (climates, zones)
Definition at line 105 of file house.h.
Referenced by EnsureEarlyHouse(), HousePickerCallbacks::FillUsedItems(), HousePickerCallbacks::GetTypeName(), IsHouseSpecValid(), and TryBuildTownHouse().
BuildingFlags HouseSpec::building_flags |
some flags that describe the house (size, stadium etc...)
Definition at line 104 of file house.h.
Referenced by AdvanceHouseConstruction(), ClearTownHouse(), DrawHouseInGUI(), FinaliseHouseArray(), BuildHouseWindow::GetHouseInformation(), IsHouseSpecValid(), MakeTownHouse(), TileLoop_Town(), TryBuildTownHouse(), UpdateHousesAndTowns(), and WatchedCargoCallback().
StringID HouseSpec::building_name |
uint16_t HouseSpec::callback_mask |
Bitmask of house callbacks that have to be called.
Definition at line 110 of file house.h.
Referenced by AddAcceptedCargoOfHouse(), DrawNewHouseTileInGUI(), GetFoundation_Town(), TileLoop_Town(), and TryBuildTownHouse().
uint8_t HouseSpec::cargo_acceptance[HOUSE_NUM_ACCEPTS] |
acceptance level for the cargo slots
Definition at line 102 of file house.h.
Referenced by AddAcceptedCargoOfHouse(), and FinaliseHouseArray().
HouseClassID HouseSpec::class_id |
defines the class this house has (not grf file based)
Definition at line 114 of file house.h.
Referenced by DecreaseBuildingCount(), HouseScopeResolver::GetVariable(), IncreaseBuildingCount(), SearchNearbyHouseClass(), and TryBuildTownHouse().
bool HouseSpec::enabled |
the house is available to build (true by default, but can be disabled by newgrf)
Definition at line 106 of file house.h.
Referenced by EnsureEarlyHouse(), HousePickerCallbacks::GetTypeName(), IsHouseSpecValid(), HousePickerCallbacks::IsTypeAvailable(), TownHouseChangeInfo(), and TryBuildTownHouse().
HouseExtraFlags HouseSpec::extra_flags |
GRFFileProps HouseSpec::grf_prop |
Properties related the the grf file.
Definition at line 109 of file house.h.
Referenced by AddAcceptedCargoOfHouse(), DrawHouseInGUI(), DrawTile_Town(), HouseResolverObject::GetDebugID(), GetFoundation_Town(), NIHHouse::GetGRFID(), GetHouseName(), GetHouseSpecGrf(), GetTranslatedHouseID(), HouseScopeResolver::GetVariable(), HouseResolverObject::HouseResolverObject(), IsHouseSpecValid(), NIHHouse::IsInspectable(), SearchNearbyHouseClass(), SearchNearbyHouseGRFID(), SearchNearbyHouseID(), HouseOverrideManager::SetEntitySpec(), TileLoop_Town(), TryBuildTownHouse(), and HousePickerCallbacks::UpdateSavedItems().
uint8_t HouseSpec::mail_generation |
mail generation multiplier (tile based, as the acceptances below)
Definition at line 101 of file house.h.
Referenced by TileLoop_Town().
TimerGameCalendar::Year HouseSpec::max_year |
last year it can be built
Definition at line 96 of file house.h.
Referenced by BuildHouseWindow::GetHouseInformation(), and TryBuildTownHouse().
TimerGameCalendar::Year HouseSpec::min_year |
introduction year of the house
Definition at line 95 of file house.h.
Referenced by EnsureEarlyHouse(), and BuildHouseWindow::GetHouseInformation().
uint8_t HouseSpec::minimum_life |
The minimum number of years this house will survive before the town rebuilds it.
Definition at line 117 of file house.h.
Referenced by TileLoop_Town().
uint8_t HouseSpec::population |
population (Zero on other tiles in multi tile house.)
Definition at line 97 of file house.h.
Referenced by BuildTownHouse(), ClearTownHouse(), BuildHouseWindow::GetHouseInformation(), IsHouseSpecValid(), RebuildTownCaches(), and TileLoop_Town().
uint8_t HouseSpec::probability |
Relative probability of appearing (16 is the standard value)
Definition at line 112 of file house.h.
Referenced by TryBuildTownHouse().
uint8_t HouseSpec::processing_time |
Colours HouseSpec::random_colour[4] |
uint8_t HouseSpec::removal_cost |
cost multiplier for removing it
Definition at line 98 of file house.h.
Referenced by GetRemovalCost().
uint16_t HouseSpec::remove_rating_decrease |
CargoTypes HouseSpec::watched_cargoes |
Cargo types watched for acceptance.
Definition at line 118 of file house.h.
Referenced by WatchedCargoCallback().