|
|
|
@ -116,6 +116,13 @@ public:
|
|
|
|
|
TOWN_SIZE_INVALID = -1, ///< Invalid town size.
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Special values for SetGrowthRate.
|
|
|
|
|
*/
|
|
|
|
|
enum TownGrowth {
|
|
|
|
|
TOWN_GROWTH_NORMAL = 0x10000, ///< Use default town growth algorithm instead of custom growth rate.
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the number of towns.
|
|
|
|
|
* @return The number of towns.
|
|
|
|
@ -249,9 +256,9 @@ public:
|
|
|
|
|
/**
|
|
|
|
|
* Set the amount of days between town growth.
|
|
|
|
|
* @param town_id The index of the town.
|
|
|
|
|
* @param days_between_town_growth The amount of days between town growth.
|
|
|
|
|
* @param days_between_town_growth The amount of days between town growth, or TOWN_GROWTH_NORMAL.
|
|
|
|
|
* @pre IsValidTown(town_id).
|
|
|
|
|
* @pre days_between_town_growth <= 30000.
|
|
|
|
|
* @pre days_between_town_growth <= 30000 || days_between_town_growth == TOWN_GROWTH_NORMAL.
|
|
|
|
|
* @return True if the action succeeded.
|
|
|
|
|
* @note Even when setting a growth rate, towns only grow when the conditions for growth (SetCargoCoal) are met,
|
|
|
|
|
* and the game settings (economy.town_growth_rate) allow town growth at all.
|
|
|
|
|