staticconstuintTOWN_GROWTH_WINTER=0xFFFFFFFE;///< The town only needs this cargo in the winter (any amount)
staticconstuintTOWN_GROWTH_WINTER=0xFFFFFFFE;///< The town only needs this cargo in the winter (any amount)
staticconstuintTOWN_GROWTH_DESERT=0xFFFFFFFF;///< The town needs the cargo for growth when on desert (any amount)
staticconstuintTOWN_GROWTH_DESERT=0xFFFFFFFF;///< The town needs the cargo for growth when on desert (any amount)
staticconstuint16TOWN_GROW_RATE_CUSTOM =0x8000;///< If this mask is applied to Town::growth_rate, the grow_counter will not be calculated by the system (but assumed to be set by scripts)
staticconstuint16TOWN_GROWTH_RATE_NONE =0xFFFF;///< Special value for Town::growth_rate to disable town growth.
staticconstuint16TOWN_GROW_RATE_CUSTOM_NONE =0xFFFF;///< Special value for Town::growth_rate to disable town growth.
staticconstuint16MAX_TOWN_GROWTH_TICKS =930;///< Max amount of original town ticks that still fit into uint16, about equal to UINT16_MAX / TOWN_GROWTH_TICKS but sligtly less to simplify calculations
typedefPool<Town,TownID,64,64000>TownPool;
typedefPool<Town,TownID,64,64000>TownPool;
externTownPool_town_pool;
externTownPool_town_pool;
@ -165,6 +165,7 @@ enum TownFlags {
TOWN_IS_GROWING=0,///< Conditions for town growth are met. Grow according to Town::growth_rate.
TOWN_IS_GROWING=0,///< Conditions for town growth are met. Grow according to Town::growth_rate.
TOWN_HAS_CHURCH=1,///< There can be only one church by town.
TOWN_HAS_CHURCH=1,///< There can be only one church by town.
TOWN_HAS_STADIUM=2,///< There can be only one stadium by town.
TOWN_HAS_STADIUM=2,///< There can be only one stadium by town.
TOWN_CUSTOM_GROWTH=3,///< Growth rate is controlled by GS.