summaryrefslogtreecommitdiff
path: root/src/settings_type.h
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2018-11-07 19:06:39 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-03-04 20:19:44 +0100
commit52572cafa62b1ab2f095f8a6d7db23f5d0fa618e (patch)
tree576afdf38e049815a7227d836354dce4260e041e /src/settings_type.h
parent7f00a420cbd2e4311a34937bc33966981b0ef5e5 (diff)
downloadopenttd-52572cafa62b1ab2f095f8a6d7db23f5d0fa618e.tar.xz
Add: Option for population-linear town cargo generation
Introduce a new default algorithm for town cargo generation (passengers and mail), and a game setting to choose between the new and original algorithm. The original town cargo generation algorithm has the property of the generated amount relating to the square of each building's population, meaning large towns easily produce more cargo than can realistically be transported. The problem is excessive cargo is amplified if playing with cargodist. The new algorithm introduced instead has a linear relation to the population. The result is that smaller towns will produce slightly more cargo, while the largest towns will produce about a fourth of what they would with the original algorithm. Existing savegames will use the original algorithm, while new games will default to the new algorithm.
Diffstat (limited to 'src/settings_type.h')
-rw-r--r--src/settings_type.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/settings_type.h b/src/settings_type.h
index 8f03b1dc1..6fba8ed2c 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -493,6 +493,7 @@ struct EconomySettings {
uint8 larger_towns; ///< the number of cities to build. These start off larger and grow twice as fast
uint8 initial_city_size; ///< multiplier for the initial size of the cities compared to towns
TownLayoutByte town_layout; ///< select town layout, @see TownLayout
+ TownCargoGenMode town_cargogen_mode; ///< algorithm for generating cargo from houses, @see TownCargoGenMode
bool allow_town_roads; ///< towns are allowed to build roads (always allowed when generating world / in SE)
TownFoundingByte found_town; ///< town founding, @see TownFounding
bool station_noise_level; ///< build new airports when the town noise level is still within accepted limits