OpenTTD Source 20250529-master-g10c159a79f
|
Base of the town class. More...
#include "viewport_type.h"
#include "timer/timer_game_tick.h"
#include "town_map.h"
#include "subsidy_type.h"
#include "newgrf_storage.h"
#include "cargotype.h"
Go to the source code of this file.
Data Structures | |
struct | BuildingCounts< T > |
struct | TownCache |
Data structure with cached data of towns. More... | |
struct | Town |
Town data structure. More... | |
Typedefs | |
typedef Pool< Town, TownID, 64 > | TownPool |
using | TownActions = EnumBitSet< TownAction, uint8_t > |
Enumerations | |
enum | TownCouncilAttitudes { TOWN_COUNCIL_LENIENT = 0 , TOWN_COUNCIL_TOLERANT = 1 , TOWN_COUNCIL_HOSTILE = 2 , TOWN_COUNCIL_PERMISSIVE = 3 } |
Settings for town council attitudes. More... | |
enum | TownRatingCheckType { ROAD_REMOVE = 0 , TUNNELBRIDGE_REMOVE = 1 , TOWN_RATING_CHECK_TYPE_COUNT } |
Action types that a company must ask permission for to a town authority. More... | |
enum | TownDirectoryInvalidateWindowData { TDIWD_FORCE_REBUILD , TDIWD_POPULATION_CHANGE , TDIWD_FORCE_RESORT } |
Special values for town list window for the data parameter of InvalidateWindowData. More... | |
enum | TownFlags { TOWN_IS_GROWING = 0 , TOWN_HAS_CHURCH = 1 , TOWN_HAS_STADIUM = 2 , TOWN_CUSTOM_GROWTH = 3 } |
This enum is used in conjunction with town->flags. More... | |
enum class | TownAction : uint8_t { AdvertiseSmall , AdvertiseMedium , AdvertiseLarge , RoadRebuild , BuildStatue , FundBuildings , BuyRights , Bribe , End } |
Town actions of a company. More... | |
Functions | |
uint32_t | GetWorldPopulation () |
Get the total population, the sum of all towns in the world. | |
void | UpdateAllTownVirtCoords () |
Update the virtual coords needed to draw the town sign for all towns. | |
void | ClearAllTownCachedNames () |
Clear the cached_name of all towns. | |
void | ShowTownViewWindow (TownID town) |
void | ExpandTown (Town *t) |
void | RebuildTownKdtree () |
CommandCost | CheckforTownRating (DoCommandFlags flags, Town *t, TownRatingCheckType type) |
Does the town authority allow the (destructive) action of the current company? | |
TileIndexDiff | GetHouseNorthPart (HouseID &house) |
Determines if a given HouseID is part of a multitile house. | |
Town * | CalcClosestTownFromTile (TileIndex tile, uint threshold=UINT_MAX) |
Return the town closest to the given tile within threshold. | |
void | ResetHouses () |
DECLARE_INCREMENT_DECREMENT_OPERATORS (TownAction) | |
void | ClearTownHouse (Town *t, TileIndex tile) |
Clear a town house. | |
void | UpdateTownMaxPass (Town *t) |
Update the maximum amount of monthly passengers and mail for a town, based on its population. | |
void | UpdateTownRadius (Town *t) |
Update the cached town zone radii of a town, based on the number of houses. | |
CommandCost | CheckIfAuthorityAllowsNewStation (TileIndex tile, DoCommandFlags flags) |
Checks whether the local authority allows construction of a new station (rail, road, airport, dock) on the given tile. | |
Town * | ClosestTownFromTile (TileIndex tile, uint threshold) |
Return the town closest (in distance or ownership) to a given tile, within a given threshold. | |
void | ChangeTownRating (Town *t, int add, int max, DoCommandFlags flags) |
Changes town rating of the current company. | |
HouseZone | GetTownRadiusGroup (const Town *t, TileIndex tile) |
Returns the bit corresponding to the town zone of the specified tile. | |
void | SetTownRatingTestMode (bool mode) |
Switch the town rating to test-mode, to allow commands to be tested without affecting current ratings. | |
TownActions | GetMaskOfTownActions (CompanyID cid, const Town *t) |
Get a list of available town authority actions. | |
uint | GetDefaultTownsForMapSize () |
Calculate the number of towns which should be on the map according to the current "town density" newgame setting and the map size. | |
bool | GenerateTowns (TownLayout layout, std::optional< uint > number=std::nullopt) |
Generate a number of towns with a given layout. | |
const CargoSpec * | FindFirstCargoWithTownAcceptanceEffect (TownAcceptanceEffect effect) |
Determines the first cargo with a certain town effect. | |
CargoArray | GetAcceptedCargoOfHouse (const HouseSpec *hs) |
Get accepted cargo of a house prototype. | |
uint8_t | GetTownActionCost (TownAction action) |
Get cost factors for a TownAction. | |
template<class T > | |
void | MakeDefaultName (T *obj) |
Set the default name for a depot/waypoint. | |
uint16_t | TownTicksToGameTicks (uint16_t ticks) |
RoadType | GetTownRoadType () |
Get the road type that towns should build at this current moment. | |
bool | CheckTownRoadTypes () |
Check if towns are able to build road. | |
std::span< const DrawBuildingsTileStruct > | GetTownDrawTileData () |
Variables | |
static const uint | CUSTOM_TOWN_NUMBER_DIFFICULTY = 4 |
value for custom town number in difficulty settings | |
static const uint | CUSTOM_TOWN_MAX_NUMBER = 5000 |
this is the maximum number of towns a user can specify in customisation | |
static const uint | TOWN_GROWTH_WINTER = 0xFFFFFFFE |
The town only needs this cargo in the winter (any amount) | |
static const uint | TOWN_GROWTH_DESERT = 0xFFFFFFFF |
The town needs the cargo for growth when on desert (any amount) | |
static const uint16_t | TOWN_GROWTH_RATE_NONE = 0xFFFF |
Special value for Town::growth_rate to disable town growth. | |
static const uint16_t | MAX_TOWN_GROWTH_TICKS = 930 |
Max amount of original town ticks that still fit into uint16_t, about equal to UINT16_MAX / TOWN_GROWTH_TICKS but slightly less to simplify calculations. | |
TownPool | _town_pool |
Base of the town class.
Definition in file town.h.
using TownActions = EnumBitSet<TownAction, uint8_t> |
|
strong |
Town actions of a company.
enum TownCouncilAttitudes |
Special values for town list window for the data parameter of InvalidateWindowData.
enum TownFlags |
This enum is used in conjunction with town->flags.
IT simply states what bit is used for. It is pretty unrealistic (IMHO) to only have one church/stadium per town, NO MATTER the population of it. And there are 5 more bits available on flags...
Enumerator | |
---|---|
TOWN_IS_GROWING | Conditions for town growth are met. Grow according to Town::growth_rate. |
TOWN_HAS_CHURCH | There can be only one church by town. |
TOWN_HAS_STADIUM | There can be only one stadium by town. |
TOWN_CUSTOM_GROWTH | Growth rate is controlled by GS. |
enum TownRatingCheckType |
Action types that a company must ask permission for to a town authority.
Enumerator | |
---|---|
ROAD_REMOVE | Removal of a road owned by the town. |
TUNNELBRIDGE_REMOVE | Removal of a tunnel or bridge owned by the towb. |
TOWN_RATING_CHECK_TYPE_COUNT | Number of town checking action types. |
Return the town closest to the given tile within threshold.
tile | Starting point of the search. |
threshold | Biggest allowed distance to the town. |
nullptr
if there is no such town.Definition at line 3887 of file town_cmd.cpp.
References DistanceManhattan(), Kdtree< T, TxyFunc, CoordT, DistT >::FindNearest(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Get(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::GetNumItems(), TileX(), TileY(), and Town::xy.
Referenced by AfterLoadGame(), AirportGetNearestTown(), BuildObject(), ClosestTownFromTile(), CmdBuildBridge(), CmdBuildRoad(), CmdBuildTunnel(), Town::PostDestructor(), RemoveRoad(), and UpdateNearestTownForRoadTiles().
void ChangeTownRating | ( | Town * | t, |
int | add, | ||
int | max, | ||
DoCommandFlags | flags | ||
) |
Changes town rating of the current company.
t | Town to affect |
add | Value to add |
max | Minimum (add < 0) resp. maximum (add > 0) rating that should be achievable with this change. |
flags | Command flags, especially DoCommandFlag::NoModifyTownRating is tested |
Definition at line 3984 of file town_cmd.cpp.
References _cheats, _current_company, _town_rating_test, _town_test_ratings, GetRating(), Town::have_ratings, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), Cheats::magic_bulldozer, NoModifyTownRating, Town::ratings, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), SetWindowDirty(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), Cheat::value, and WC_TOWN_AUTHORITY.
Referenced by CheckAllowRemoveRoad(), ClearTile_Town(), CmdBuildBridge(), CmdPlantTree(), DoClearBridge(), DoClearTunnel(), and TownActionBribe().
CommandCost CheckforTownRating | ( | DoCommandFlags | flags, |
Town * | t, | ||
TownRatingCheckType | type | ||
) |
Does the town authority allow the (destructive) action of the current company?
flags | Checking flags of the command. |
t | Town that must allow the company action. |
type | Type of action that is wanted. |
Definition at line 4021 of file town_cmd.cpp.
References _cheats, _current_company, _settings_game, CommandCostWithParam(), GameSettings::difficulty, GetRating(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), Cheats::magic_bulldozer, NoTestTownRating, RATING_ROAD_NEEDED_HOSTILE, RATING_ROAD_NEEDED_LENIENT, RATING_ROAD_NEEDED_NEUTRAL, RATING_ROAD_NEEDED_PERMISSIVE, RATING_TUNNEL_BRIDGE_NEEDED_HOSTILE, RATING_TUNNEL_BRIDGE_NEEDED_LENIENT, RATING_TUNNEL_BRIDGE_NEEDED_NEUTRAL, RATING_TUNNEL_BRIDGE_NEEDED_PERMISSIVE, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), DifficultySettings::town_council_tolerance, TOWN_RATING_CHECK_TYPE_COUNT, and Cheat::value.
Referenced by CheckAllowRemoveRoad(), CmdConvertRoad(), DoClearBridge(), and DoClearTunnel().
CommandCost CheckIfAuthorityAllowsNewStation | ( | TileIndex | tile, |
DoCommandFlags | flags | ||
) |
Checks whether the local authority allows construction of a new station (rail, road, airport, dock) on the given tile.
tile | The tile where the station shall be constructed. |
flags | Command flags. DoCommandFlag::NoTestTownRating is tested. |
Definition at line 3864 of file town_cmd.cpp.
References _current_company, _settings_game, ClosestTownFromTile(), CommandCostWithParam(), GameSettings::difficulty, EconomySettings::dist_local_authority, GameSettings::economy, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), NoTestTownRating, Town::ratings, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and DifficultySettings::town_council_tolerance.
Referenced by CmdBuildAirport(), CmdBuildDock(), CmdBuildRailStation(), and CmdBuildRoadStop().
bool CheckTownRoadTypes | ( | ) |
Check if towns are able to build road.
Definition at line 1009 of file town_cmd.cpp.
References TimerGameCalendar::date, GetEncodedString(), GetTownRoadTypeFirstIntroductionDate(), ShowErrorMessage(), and WL_CRITICAL.
Referenced by _GenerateWorld().
void ClearAllTownCachedNames | ( | ) |
Clear the cached_name of all towns.
Definition at line 425 of file town_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Iterate().
Clear a town house.
t | The town which owns the house. |
tile | The tile to clear. |
Definition at line 2995 of file town_cmd.cpp.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), HouseSpec::building_flags, Town::cache, ChangePopulation(), ClrBit(), DoClearTownHouseHelper(), Town::flags, HouseSpec::Get(), GetHouseNorthPart(), GetHouseType(), IsHouseCompleted(), IsTileType(), MP_HOUSE, TownCache::num_houses, HouseSpec::population, RemoveNearbyStations(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TileDiffXY(), TOWN_HAS_CHURCH, TOWN_HAS_STADIUM, and UpdateTownRadius().
Referenced by ClearTile_Town(), and TileLoop_Town().
Return the town closest (in distance or ownership) to a given tile, within a given threshold.
tile | Starting point of the search. |
threshold | Biggest allowed distance to the town. |
nullptr
if there is no such town.Definition at line 3905 of file town_cmd.cpp.
References _generating_world, CalcClosestTownFromTile(), DistanceManhattan(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Get(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::GetNumItems(), GetTileType(), GetTownIndex(), HasTownOwnedRoad(), IsRoadDepot(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::IsValidID(), MP_HOUSE, MP_ROAD, and Town::xy.
Referenced by AfterLoadGame(), BuildStationPart(), CheckAllowRemoveRoad(), CheckIfAuthorityAllowsNewStation(), CheckIfCallBackAllowsCreation(), CmdBuildAirport(), CmdBuildBridge(), CmdConvertRoad(), CmdPlaceHouse(), CmdPlantTree(), DisasterTick_Big_Ufo(), DoClearBridge(), DoClearTunnel(), FindTownForIndustry(), CHKPChunkHandler::FixPointers(), GenerateCompanyName(), GetParamsForOwnedBy(), AirportResolverObject::GetTown(), IndustriesResolverObject::GetTown(), ObjectResolverObject::GetTown(), StationResolverObject::GetTown(), AirportTileScopeResolver::GetVariable(), IndustryTileScopeResolver::GetVariable(), ObjectScopeResolver::GetVariable(), RailTypeScopeResolver::GetVariable(), RoadStopScopeResolver::GetVariable(), RoadTypeScopeResolver::GetVariable(), HighlightTownLocalAuthorityTiles(), MakeDefaultName(), LandInfoWindow::OnInit(), and RemoveGenericRoadStop().
const CargoSpec * FindFirstCargoWithTownAcceptanceEffect | ( | TownAcceptanceEffect | effect | ) |
Determines the first cargo with a certain town effect.
effect | Town effect of interest |
Definition at line 3072 of file town_cmd.cpp.
References CargoSpec::Iterate().
Referenced by AfterLoadGame(), CmdTownCargoGoal(), DoCreateTown(), and TownViewWindow::DrawWidget().
bool GenerateTowns | ( | TownLayout | layout, |
std::optional< uint > | number | ||
) |
Generate a number of towns with a given layout.
This function is used by the Random Towns button in Scenario Editor as well as in world generation.
layout | The road layout to build. |
number | The number of towns to create. std::nullopt means to use the game settings. |
Definition at line 2404 of file town_cmd.cpp.
References _random, _settings_game, CreateRandomTown(), CUSTOM_TOWN_NUMBER_DIFFICULTY, GameSettings::difficulty, GameSettings::economy, GenerateTownName(), GetDefaultTownsForMapSize(), GetEncodedString(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::GetNumItems(), GWP_TOWN, IncreaseGeneratingWorldProgress(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Iterate(), EconomySettings::larger_towns, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::MAX_SIZE, DifficultySettings::number_towns, Random, SetGeneratingWorldProgress(), ShowErrorMessage(), TSZ_RANDOM, and WL_CRITICAL.
Referenced by _GenerateWorld(), and FoundTownWindow::OnQueryTextFinished().
CargoArray GetAcceptedCargoOfHouse | ( | const HouseSpec * | hs | ) |
Get accepted cargo of a house prototype.
hs | Spec of the house. |
Definition at line 848 of file town_cmd.cpp.
References AddAcceptedCargoOfHouse(), HouseSpec::Index(), and INVALID_TILE.
Referenced by BuildHouseWindow::GetHouseInformation().
uint GetDefaultTownsForMapSize | ( | ) |
Calculate the number of towns which should be on the map according to the current "town density" newgame setting and the map size.
If the number of towns is set to "custom", the function will always return that value instead.
Definition at line 2388 of file town_cmd.cpp.
References _settings_game, _settings_newgame, GameCreationSettings::custom_town_number, CUSTOM_TOWN_NUMBER_DIFFICULTY, GameSettings::difficulty, GameSettings::game_creation, DifficultySettings::number_towns, and Map::ScaleBySize().
Referenced by GenerateTowns(), and FoundTownWindow::OnClick().
TileIndexDiff GetHouseNorthPart | ( | HouseID & | house | ) |
Determines if a given HouseID is part of a multitile house.
The given ID is set to the ID of the north tile and the TileDiff to the north tile is returned.
house | Is changed to the HouseID of the north tile of the same house |
Definition at line 2970 of file town_cmd.cpp.
References HouseSpec::Get(), and TileDiffXY().
Referenced by ClearTownHouse(), GetDistanceFromNearbyHouse(), RebuildTownCaches(), TriggerHouseAnimation_WatchedCargoAccepted(), and UpdateHousesAndTowns().
TownActions GetMaskOfTownActions | ( | CompanyID | cid, |
const Town * | t | ||
) |
Get a list of available town authority actions.
cid | The company that is querying the town. |
t | The town that is queried. |
Definition at line 3616 of file town_cmd.cpp.
References _current_company, _settings_game, EconomySettings::bribe, Bribe, BuildStatue, BuyRights, COMPANY_SPECTATOR, GameSettings::economy, Town::exclusive_counter, EconomySettings::exclusive_rights, Town::exclusivity, EconomySettings::fund_buildings, EconomySettings::fund_roads, FundBuildings, GetAvailableMoney(), GetTownActionCost(), Town::ratings, RoadRebuild, Town::statues, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and Town::unwanted.
Referenced by CmdDoTownAction(), and TownAuthorityWindow::OnPaint().
uint8_t GetTownActionCost | ( | TownAction | action | ) |
Get cost factors for a TownAction.
action | TownAction to get cost factor for. |
Factor in the cost of each town action.
Definition at line 3335 of file town_cmd.cpp.
References to_underlying().
Referenced by CmdDoTownAction(), TownAuthorityWindow::DrawWidget(), GetMaskOfTownActions(), and TownAuthorityWindow::UpdateWidgetSize().
std::span< const DrawBuildingsTileStruct > GetTownDrawTileData | ( | ) |
Definition at line 4133 of file town_cmd.cpp.
Returns the bit corresponding to the town zone of the specified tile.
t | Town on which town zone is to be found. |
tile | TileIndex where town zone needs to be found. |
Definition at line 2472 of file town_cmd.cpp.
References DistanceSquare(), Town::fund_buildings_months, to_underlying(), and Town::xy.
Referenced by AirportTileScopeResolver::GetVariable(), HouseScopeResolver::GetVariable(), IndustriesScopeResolver::GetVariable(), IndustryTileScopeResolver::GetVariable(), ObjectScopeResolver::GetVariable(), RailTypeScopeResolver::GetVariable(), RoadStopScopeResolver::GetVariable(), RoadTypeScopeResolver::GetVariable(), and TryBuildTownHouse().
RoadType GetTownRoadType | ( | ) |
Get the road type that towns should build at this current moment.
They may have built a different type in the past.
Definition at line 953 of file town_cmd.cpp.
References TimerGameCalendar::date, RoadTypeInfo::flags, GetRoadTypeInfo(), RoadTypeInfo::introduction_date, IsInsideMM(), RoadTypeInfo::label, TimerGameConst< struct Calendar >::MAX_DATE, RoadTypeInfo::max_speed, ROADTYPE_BEGIN, ROADTYPE_END, ROADTYPE_ROAD, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and TownBuild.
Referenced by CanRoadContinueIntoNextTile(), GrowTown(), GrowTownWithBridge(), GrowTownWithRoad(), GrowTownWithTunnel(), IsRoadAllowedHere(), and TownCanGrowRoad().
uint32_t GetWorldPopulation | ( | ) |
Get the total population, the sum of all towns in the world.
Definition at line 452 of file town_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Iterate().
Referenced by TownDirectoryWindow::GetWidgetString().
void MakeDefaultName | ( | T * | obj | ) |
Set the default name for a depot/waypoint.
T | The type/class to make a default name for |
obj | The object/instance we want to find the name for |
Definition at line 247 of file town.h.
References ClosestTownFromTile(), HasBit(), and SetBit().
Referenced by AfterLoadGame(), CmdBuildBuoy(), CmdBuildRailWaypoint(), CmdBuildRoadDepot(), CmdBuildRoadWaypoint(), CmdBuildShipDepot(), CmdBuildTrainDepot(), and CmdRenameDepot().
void RebuildTownKdtree | ( | ) |
Definition at line 73 of file town_cmd.cpp.
void ResetHouses | ( | ) |
Definition at line 81 of file newgrf_house.cpp.
void SetTownRatingTestMode | ( | bool | mode | ) |
Switch the town rating to test-mode, to allow commands to be tested without affecting current ratings.
The function is safe to use in nested calls.
mode | Test mode switch (true means go to test-mode, false means leave test-mode). |
Definition at line 3946 of file town_cmd.cpp.
References _town_rating_test, and _town_test_ratings.
Referenced by CommandHelperBase::InternalDoAfter(), CommandHelperBase::InternalDoBefore(), CommandHelperBase::InternalExecutePrepTest(), and CommandHelperBase::InternalExecuteValidateTestAndPrepExec().
void ShowTownViewWindow | ( | TownID | town | ) |
Definition at line 656 of file town_gui.cpp.
void UpdateAllTownVirtCoords | ( | ) |
Update the virtual coords needed to draw the town sign for all towns.
Definition at line 417 of file town_cmd.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Iterate().
Referenced by UpdateAllVirtCoords().
void UpdateTownMaxPass | ( | Town * | t | ) |
Update the maximum amount of monthly passengers and mail for a town, based on its population.
t | The town to update. |
Definition at line 1999 of file town_cmd.cpp.
References Town::cache, TownCache::population, ScaleByCargoScale(), Town::supplied, CargoSpec::town_production_cargoes, TPE_MAIL, and TPE_PASSENGERS.
Referenced by AfterLoadGame(), CmdExpandTown(), and DoCreateTown().
void UpdateTownRadius | ( | Town * | t | ) |
Update the cached town zone radii of a town, based on the number of houses.
t | The town to update. |
Definition at line 1952 of file town_cmd.cpp.
References Town::cache, TownCache::num_houses, TownCache::squared_town_zone_radius, and to_underlying().
Referenced by BuildTownHouse(), ClearTownHouse(), CmdExpandTown(), DoCreateTown(), and RebuildTownCaches().
|
static |
this is the maximum number of towns a user can specify in customisation
Definition at line 29 of file town.h.
Referenced by GenerateLandscapeWindow::OnQueryTextFinished(), and GenerateLandscapeWindow::UpdateWidgetSize().
|
static |
value for custom town number in difficulty settings
Definition at line 28 of file town.h.
Referenced by GenerateTowns(), GetDefaultTownsForMapSize(), GenerateLandscapeWindow::GetWidgetString(), and GenerateLandscapeWindow::OnDropdownSelect().
|
static |
|
static |
The town needs the cargo for growth when on desert (any amount)
Definition at line 32 of file town.h.
Referenced by AfterLoadGame(), DoCreateTown(), TownViewWindow::DrawWidget(), TownViewWindow::GetDesiredInfoHeight(), and UpdateTownGrowth().
|
static |
Special value for Town::growth_rate to disable town growth.
Definition at line 33 of file town.h.
Referenced by AfterLoadGame(), UpdateTownGrowCounter(), and UpdateTownGrowth().
|
static |
The town only needs this cargo in the winter (any amount)
Definition at line 31 of file town.h.
Referenced by AfterLoadGame(), DoCreateTown(), TownViewWindow::DrawWidget(), TownViewWindow::GetDesiredInfoHeight(), and UpdateTownGrowth().