@@ -87,15 +87,16 @@ enum HouseExtraFlags {
SYNCHRONISED_CALLBACK_1B = 1U << 2, ///< synchronized callback 1B will be performed, on multi tile houses
CALLBACK_1A_RANDOM_BITS = 1U << 3, ///< callback 1A needs random bits
};
DECLARE_ENUM_AS_BIT_SET(HouseExtraFlags)
template <typename T>
struct BuildingCounts {
uint8 id_count[HOUSE_MAX];
uint8 class_count[HOUSE_CLASS_MAX];
T id_count[HOUSE_MAX];
T class_count[HOUSE_CLASS_MAX];
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
DECLARE_OLD_POOL(Town, Town, 3, 8000)
@@ -173,13 +174,13 @@ struct Town : PoolItem<Town, TownID, &_T
TownLayoutByte layout; ///< town specific road layout
/* NOSAVE: UpdateTownRadius updates this given the house count. */
uint32 squared_town_zone_radius[HZB_END];
/* NOSAVE: The number of each type of building in the town. */
BuildingCounts building_counts;
BuildingCounts<uint16> building_counts;
/**
* Creates a new town
*/
Town(TileIndex tile = INVALID_TILE);