15 typedef uint16 TownID;
32 RATING_MINIMUM = -1000,
33 RATING_APPALLING = -400,
34 RATING_VERYPOOR = -200,
36 RATING_MEDIOCRE = 200,
38 RATING_VERYGOOD = 600,
39 RATING_EXCELLENT = 800,
47 RATING_TREE_DOWN_STEP = -35,
48 RATING_TREE_MINIMUM = RATING_MINIMUM,
49 RATING_TREE_UP_STEP = 7,
50 RATING_TREE_MAXIMUM = 220,
70 RATING_HOUSE_MINIMUM = RATING_MINIMUM,
72 RATING_BRIBE_UP_STEP = 200,
73 RATING_BRIBE_MAXIMUM = 800,
74 RATING_BRIBE_DOWN_TO = -50
111 template <
typename Tstorage>
123 this->old_max = this->new_max; this->new_max = 0;
124 this->old_act = this->new_act; this->new_act = 0;
Helper template class that makes basic properties of given enumeration type visible from outsize...
Geometric 2x2 grid algorithm.
penalty for removing town owned tunnel or bridge
TownCargoGenMode
Town cargo generation modes.
void NewMonth()
Update stats for a new month.
Tstorage new_act
Actually transported this month.
Type (helpers) for enums.
TownSize
Supported initial town sizes.
Original algorithm (quadratic cargo by population)
minimum rating after removing town owned road
Used for iterations and limit testing.
rating needed, "Permissive" difficulty settings
when a town grows, all companies have rating increased a bit ...
Number of available town sizes.
Informative template class exposing basic enumeration properties used by several other templates belo...
Allowed, with custom town layout.
Geometric 3x3 grid algorithm.
rating needed, "Permissive" difficulty settings
Bit-counted algorithm (normal distribution from individual house population)
Used for iterations and limit testing.
Extended original algorithm (min. 2 distance between roads)
... up to RATING_MEDIOCRE
Tstorage new_max
Maximum amount this month.
removing a roadpiece at the edge
TownFounding
Town founding setting values.
removing a roadpiece in the middle
Tstorage old_max
Maximum amount last month.
Random size, bigger than small, smaller than large.
Original algorithm (min. 1 distance between roads)
Store the maximum and actually transported cargo amount for the current and the last month...
static const uint MAX_LENGTH_TOWN_NAME_CHARS
The maximum length of a town name in characters including '\0'.
when a town grows, company gains reputation for all well serviced stations ...
... but loses for badly serviced stations
minimum rating after removing tunnel or bridge
Tstorage old_act
Actually transported last month.