OpenTTD Source 20241224-master-gf74b0cf984
|
Data structure with cached data of towns. More...
#include <town.h>
Public Member Functions | |
auto | operator<=> (const TownCache &) const =default |
Data Fields | |
uint32_t | num_houses |
Amount of houses. | |
uint32_t | population |
Current population of people. | |
TrackedViewportSign | sign |
Location of name sign, UpdateVirtCoord updates this. | |
PartOfSubsidy | part_of_subsidy |
Is this town a source/destination of a subsidy? | |
std::array< uint32_t, HZB_END > | squared_town_zone_radius |
UpdateTownRadius updates this given the house count. | |
BuildingCounts< uint16_t > | building_counts |
The number of each type of building in the town. | |
BuildingCounts<uint16_t> TownCache::building_counts |
The number of each type of building in the town.
Definition at line 48 of file town.h.
Referenced by DecreaseBuildingCount(), IncreaseBuildingCount(), InitializeBuildingCounts(), and TryBuildTownHouse().
uint32_t TownCache::num_houses |
Amount of houses.
Definition at line 43 of file town.h.
Referenced by BuildTownHouse(), ClearTownHouse(), CmdExpandTown(), DoCreateTown(), TownViewWindow::DrawWidget(), GetNormalGrowthRate(), TownScopeResolver::GetVariable(), GrowTownAtRoad(), LoadTownData(), RebuildTownCaches(), and UpdateTownRadius().
PartOfSubsidy TownCache::part_of_subsidy |
Is this town a source/destination of a subsidy?
Definition at line 46 of file town.h.
Referenced by CheckSubsidised().
uint32_t TownCache::population |
Current population of people.
Definition at line 44 of file town.h.
Referenced by ChangePopulation(), CheckIfIndustryIsAllowed(), CreateRandomTown(), DoCreateTown(), TownViewWindow::DrawWidget(), TownDirectoryWindow::DrawWidget(), FindSubsidyPassengerRoute(), FindSubsidyTownCargoRoute(), TownViewWindow::GetDesiredInfoHeight(), TownScopeResolver::GetVariable(), GrowTownWithBridge(), GrowTownWithTunnel(), LoadTownData(), Town::MaxTownNoise(), RebuildTownCaches(), TownDirectoryWindow::TownPopulationSorter(), UpdateTownGrowth(), UpdateTownMaxPass(), and Town::UpdateVirtCoord().
TrackedViewportSign TownCache::sign |
Location of name sign, UpdateVirtCoord updates this.
Definition at line 45 of file town.h.
Referenced by CmdDeleteTown(), and Town::UpdateVirtCoord().
std::array<uint32_t, HZB_END> TownCache::squared_town_zone_radius |
UpdateTownRadius updates this given the house count.
Definition at line 47 of file town.h.
Referenced by CmdBuildBridge(), CmdBuildRoad(), CmdBuildTunnel(), TownScopeResolver::GetVariable(), and UpdateTownRadius().