Clarify how the "town growth speed depends on transported cargo" setting works
This commit is contained in:
@@ -599,7 +599,7 @@ STR_CONFIG_SETTING_CITY_ZONE_4_MULT :Multiplier for
|
||||
STR_CONFIG_SETTING_CITY_ZONE_4_MULT_HELPTEXT :Multiplier for the size of City Zone 4 (Innermost roads with street lights). This setting works best with minor alterations.
|
||||
|
||||
STR_CONFIG_SETTING_TOWN_GROWTH_CARGO_TRANSPORTED :Town growth speed depends on transported cargo: {STRING2}
|
||||
STR_CONFIG_SETTING_TOWN_GROWTH_CARGO_TRANSPORTED_HELPTEXT :Percentage of town growth speed which depends on proportion of town cargo transported in the last month
|
||||
STR_CONFIG_SETTING_TOWN_GROWTH_CARGO_TRANSPORTED_HELPTEXT :Percentage of town growth speed which depends on proportion of town cargo transported in the last month.{}This percentage of the calculated town growth speed is multiplied by the fraction of passengers and mail which were transported in the last month. This setting can only decrease the town growth speed, not increase it.
|
||||
|
||||
STR_CONFIG_SETTING_RANDOM_ROAD_RECONSTRUCTION :Probability of random town road re-construction: {STRING2}
|
||||
STR_CONFIG_SETTING_RANDOM_ROAD_RECONSTRUCTION_HELPTEXT :The probability of town roads randomly being re-constructed (0 = off, 1000 = max)
|
||||
|
@@ -4024,6 +4024,10 @@ static uint GetNormalGrowthRate(Town *t)
|
||||
if (t->larger_town) m /= 2;
|
||||
|
||||
if (_settings_game.economy.town_growth_cargo_transported > 0) {
|
||||
/* The standard growth rate here is proportional to 1/m.
|
||||
* town_growth_cargo_transported percent of the growth rate is multiplied by the proportion of town cargoes transported.
|
||||
* The growth rate can only be decreased by this setting, not increased.
|
||||
*/
|
||||
uint32 inverse_m = UINT32_MAX / m;
|
||||
auto calculate_cargo_ratio_fix15 = [](const TransportedCargoStat<uint32> &stat) -> uint32 {
|
||||
return stat.old_max ? ((uint64) (stat.old_act << 15)) / stat.old_max : 1 << 15;
|
||||
|
Reference in New Issue
Block a user