Add per-town override to disable town growth
This commit is contained in:
@@ -65,6 +65,7 @@ enum TownSettingOverrideFlags {
|
||||
TSOF_OVERRIDE_BUILD_LEVEL_CROSSINGS = 1,
|
||||
TSOF_OVERRIDE_BUILD_TUNNELS = 2,
|
||||
TSOF_OVERRIDE_BUILD_INCLINED_ROADS = 3,
|
||||
TSOF_OVERRIDE_GROWTH = 4,
|
||||
};
|
||||
|
||||
/** Town data structure. */
|
||||
@@ -187,6 +188,11 @@ struct Town : TownPool::PoolItem<&_town_pool> {
|
||||
return this->cached_name.c_str();
|
||||
}
|
||||
|
||||
inline bool IsTownGrowthDisabledByOverride() const
|
||||
{
|
||||
return HasBit(this->override_flags, TSOF_OVERRIDE_GROWTH);
|
||||
}
|
||||
|
||||
inline bool GetAllowBuildRoads() const
|
||||
{
|
||||
return HasBit(this->override_flags, TSOF_OVERRIDE_BUILD_ROADS) ? HasBit(this->override_values, TSOF_OVERRIDE_BUILD_ROADS) : _settings_game.economy.allow_town_roads;
|
||||
|
Reference in New Issue
Block a user