|
OpenTTD Source 20251117-master-g7398d2e290
|
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 = 0 |
| Amount of houses. | |
| uint32_t | population = 0 |
| Current population of people. | |
| TrackedViewportSign | sign {} |
| Location of name sign, UpdateVirtCoord updates this. | |
| PartsOfSubsidy | part_of_subsidy {} |
| Is this town a source/destination of a subsidy? | |
| std::array< uint32_t, NUM_HOUSE_ZONES > | 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 57 of file town.h.
Referenced by DecreaseBuildingCount(), IncreaseBuildingCount(), InitializeBuildingCounts(), and TryBuildTownHouse().
| uint32_t TownCache::num_houses = 0 |
Amount of houses.
Definition at line 52 of file town.h.
Referenced by BuildTownHouse(), ClearTownHouse(), CmdExpandTown(), DoCreateTown(), GetNormalGrowthRate(), TownScopeResolver::GetVariable(), GrowTownAtRoad(), LoadTownData(), RebuildTownCaches(), and UpdateTownRadius().
| PartsOfSubsidy TownCache::part_of_subsidy {} |
Is this town a source/destination of a subsidy?
Definition at line 55 of file town.h.
Referenced by CheckSubsidised().
| uint32_t TownCache::population = 0 |
Current population of people.
Definition at line 53 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 54 of file town.h.
Referenced by CmdDeleteTown(), and Town::UpdateVirtCoord().
| std::array<uint32_t, NUM_HOUSE_ZONES> TownCache::squared_town_zone_radius {} |
UpdateTownRadius updates this given the house count.
Definition at line 56 of file town.h.
Referenced by CmdBuildBridge(), CmdBuildRoad(), CmdBuildTunnel(), TownScopeResolver::GetVariable(), and UpdateTownRadius().