|
OpenTTD Source 20251126-master-g67ded4f980
|
Types related to towns. More...
Go to the source code of this file.
Data Structures | |
| struct | TransportedCargoStat< Tstorage > |
| Store the maximum and actually transported cargo amount for the current and the last month. More... | |
Typedefs | |
| using | TownID = PoolID< uint16_t, struct TownIDTag, 64000, 0xFFFF > |
| using | TownExpandModes = EnumBitSet< TownExpandMode, uint8_t > |
Enumerations | |
| enum | TownSize : uint8_t { TSZ_SMALL , TSZ_MEDIUM , TSZ_LARGE , TSZ_RANDOM , TSZ_END } |
| Supported initial town sizes. More... | |
| enum | TownLayout : uint8_t { TL_BEGIN = 0 , TL_ORIGINAL = 0 , TL_BETTER_ROADS , TL_2X2_GRID , TL_3X3_GRID , TL_RANDOM , NUM_TLS } |
| Town Layouts. More... | |
| enum class | TownExpandMode : uint8_t { Buildings , Roads } |
| Options for growing towns. More... | |
| enum | TownFounding : uint8_t { TF_BEGIN = 0 , TF_FORBIDDEN = 0 , TF_ALLOWED , TF_CUSTOM_LAYOUT , TF_END } |
| Town founding setting values. More... | |
| enum | TownCargoGenMode : uint8_t { TCGM_BEGIN = 0 , TCGM_ORIGINAL = 0 , TCGM_BITCOUNT , TCGM_END } |
| Town cargo generation modes. More... | |
Variables | |
| static constexpr int | RATING_MINIMUM = -1000 |
| static constexpr int | RATING_APPALLING = -400 |
| static constexpr int | RATING_VERYPOOR = -200 |
| static constexpr int | RATING_POOR = 0 |
| static constexpr int | RATING_MEDIOCRE = 200 |
| static constexpr int | RATING_GOOD = 400 |
| static constexpr int | RATING_VERYGOOD = 600 |
| static constexpr int | RATING_EXCELLENT = 800 |
| static constexpr int | RATING_OUTSTANDING = 1000 |
| OUTSTANDING. | |
| static constexpr int | RATING_MAXIMUM = RATING_OUTSTANDING |
| static constexpr int | RATING_INITIAL = 500 |
| initial rating | |
| static constexpr int | RATING_TREE_DOWN_STEP = -35 |
| static constexpr int | RATING_TREE_MINIMUM = RATING_MINIMUM |
| static constexpr int | RATING_TREE_UP_STEP = 7 |
| static constexpr int | RATING_TREE_MAXIMUM = 220 |
| static constexpr int | RATING_GROWTH_UP_STEP = 5 |
| when a town grows, all companies have rating increased a bit ... | |
| static constexpr int | RATING_GROWTH_MAXIMUM = RATING_MEDIOCRE |
| ... up to RATING_MEDIOCRE | |
| static constexpr int | RATING_STATION_UP_STEP = 12 |
| when a town grows, company gains reputation for all well serviced stations ... | |
| static constexpr int | RATING_STATION_DOWN_STEP = -15 |
| ... but loses for badly serviced stations | |
| static constexpr int | RATING_TUNNEL_BRIDGE_UP_STEP = 50 |
| rating increase for improving a town-owned bridge | |
| static constexpr int | RATING_TUNNEL_BRIDGE_DOWN_STEP = -250 |
| penalty for removing town owned tunnel or bridge | |
| static constexpr int | RATING_TUNNEL_BRIDGE_MINIMUM = 0 |
| minimum rating after removing tunnel or bridge | |
| static constexpr int | RATING_TUNNEL_BRIDGE_NEEDED_LENIENT = 144 |
| rating needed, "Lenient" difficulty settings | |
| static constexpr int | RATING_TUNNEL_BRIDGE_NEEDED_NEUTRAL = 208 |
| "Neutral" | |
| static constexpr int | RATING_TUNNEL_BRIDGE_NEEDED_HOSTILE = 400 |
| "Hostile" | |
| static constexpr int | RATING_TUNNEL_BRIDGE_NEEDED_PERMISSIVE = RATING_MINIMUM |
| "Permissive" (local authority disabled) | |
| static constexpr int | RATING_ROAD_DOWN_STEP_INNER = -50 |
| removing a roadpiece in the middle | |
| static constexpr int | RATING_ROAD_DOWN_STEP_EDGE = -18 |
| removing a roadpiece at the edge | |
| static constexpr int | RATING_ROAD_MINIMUM = -100 |
| minimum rating after removing town owned road | |
| static constexpr int | RATING_ROAD_NEEDED_LENIENT = 16 |
| rating needed, "Lenient" difficulty settings | |
| static constexpr int | RATING_ROAD_NEEDED_NEUTRAL = 64 |
| "Neutral" | |
| static constexpr int | RATING_ROAD_NEEDED_HOSTILE = 112 |
| "Hostile" | |
| static constexpr int | RATING_ROAD_NEEDED_PERMISSIVE = RATING_MINIMUM |
| "Permissive" (local authority disabled) | |
| static constexpr int | RATING_HOUSE_MINIMUM = RATING_MINIMUM |
| static constexpr int | RATING_BRIBE_UP_STEP = 200 |
| static constexpr int | RATING_BRIBE_MAXIMUM = 800 |
| static constexpr int | RATING_BRIBE_DOWN_TO = -50 |
| static const uint | MAX_LENGTH_TOWN_NAME_CHARS = 32 |
| The maximum length of a town name in characters including '\0'. | |
Types related to towns.
Definition in file town_type.h.
| using TownExpandModes = EnumBitSet<TownExpandMode, uint8_t> |
Definition at line 100 of file town_type.h.
Definition at line 16 of file town_type.h.
| enum TownCargoGenMode : uint8_t |
Town cargo generation modes.
| Enumerator | |
|---|---|
| TCGM_ORIGINAL | Original algorithm (quadratic cargo by population) |
| TCGM_BITCOUNT | Bit-counted algorithm (normal distribution from individual house population) |
Definition at line 112 of file town_type.h.
|
strong |
Options for growing towns.
| Enumerator | |
|---|---|
| Buildings | Allow town to place buildings. |
| Roads | Allow town to place roads. |
Definition at line 95 of file town_type.h.
| enum TownFounding : uint8_t |
Town founding setting values.
It needs to be 8bits, because we save and load it as such
| Enumerator | |
|---|---|
| TF_BEGIN | Used for iterations and limit testing. |
| TF_FORBIDDEN | Forbidden. |
| TF_ALLOWED | Allowed. |
| TF_CUSTOM_LAYOUT | Allowed, with custom town layout. |
| TF_END | Used for iterations and limit testing. |
Definition at line 103 of file town_type.h.
| enum TownLayout : uint8_t |
Town Layouts.
It needs to be 8bits, because we save and load it as such
Definition at line 81 of file town_type.h.
| enum TownSize : uint8_t |
Supported initial town sizes.
| Enumerator | |
|---|---|
| TSZ_SMALL | Small town. |
| TSZ_MEDIUM | Medium town. |
| TSZ_LARGE | Large town. |
| TSZ_RANDOM | Random size, bigger than small, smaller than large. |
| TSZ_END | Number of available town sizes. |
Definition at line 21 of file town_type.h.
|
static |
The maximum length of a town name in characters including '\0'.
Definition at line 119 of file town_type.h.
Referenced by CmdFoundTown(), CmdRenameTown(), TownViewWindow::OnClick(), and VerifyTownName().
|
staticconstexpr |
Definition at line 34 of file town_type.h.
|
staticconstexpr |
Definition at line 78 of file town_type.h.
|
staticconstexpr |
Definition at line 77 of file town_type.h.
|
staticconstexpr |
Definition at line 76 of file town_type.h.
|
staticconstexpr |
Definition at line 40 of file town_type.h.
|
staticconstexpr |
Definition at line 38 of file town_type.h.
|
staticconstexpr |
... up to RATING_MEDIOCRE
Definition at line 54 of file town_type.h.
Referenced by UpdateTownRating().
|
staticconstexpr |
when a town grows, all companies have rating increased a bit ...
Definition at line 53 of file town_type.h.
Referenced by UpdateTownRating().
|
staticconstexpr |
Definition at line 74 of file town_type.h.
|
staticconstexpr |
initial rating
Definition at line 45 of file town_type.h.
Referenced by AfterLoadGame(), ChangeOwnershipOfCompanyItems(), and DoCreateTown().
|
staticconstexpr |
Definition at line 43 of file town_type.h.
|
staticconstexpr |
Definition at line 37 of file town_type.h.
|
staticconstexpr |
Definition at line 33 of file town_type.h.
|
staticconstexpr |
OUTSTANDING.
Definition at line 41 of file town_type.h.
|
staticconstexpr |
Definition at line 36 of file town_type.h.
|
staticconstexpr |
removing a roadpiece at the edge
Definition at line 67 of file town_type.h.
Referenced by CheckAllowRemoveRoad().
|
staticconstexpr |
removing a roadpiece in the middle
Definition at line 66 of file town_type.h.
Referenced by CheckAllowRemoveRoad().
|
staticconstexpr |
minimum rating after removing town owned road
Definition at line 68 of file town_type.h.
Referenced by CheckAllowRemoveRoad().
|
staticconstexpr |
|
staticconstexpr |
rating needed, "Lenient" difficulty settings
Definition at line 69 of file town_type.h.
Referenced by CheckforTownRating().
|
staticconstexpr |
|
staticconstexpr |
"Permissive" (local authority disabled)
Definition at line 72 of file town_type.h.
Referenced by CheckforTownRating().
|
staticconstexpr |
... but loses for badly serviced stations
Definition at line 56 of file town_type.h.
|
staticconstexpr |
when a town grows, company gains reputation for all well serviced stations ...
Definition at line 55 of file town_type.h.
|
staticconstexpr |
Definition at line 48 of file town_type.h.
|
staticconstexpr |
Definition at line 51 of file town_type.h.
|
staticconstexpr |
Definition at line 49 of file town_type.h.
|
staticconstexpr |
Definition at line 50 of file town_type.h.
|
staticconstexpr |
penalty for removing town owned tunnel or bridge
Definition at line 59 of file town_type.h.
Referenced by DoClearBridge(), and DoClearTunnel().
|
staticconstexpr |
minimum rating after removing tunnel or bridge
Definition at line 60 of file town_type.h.
Referenced by DoClearBridge(), and DoClearTunnel().
|
staticconstexpr |
|
staticconstexpr |
rating needed, "Lenient" difficulty settings
Definition at line 61 of file town_type.h.
Referenced by CheckforTownRating().
|
staticconstexpr |
|
staticconstexpr |
"Permissive" (local authority disabled)
Definition at line 64 of file town_type.h.
Referenced by CheckforTownRating().
|
staticconstexpr |
rating increase for improving a town-owned bridge
Definition at line 58 of file town_type.h.
Referenced by CmdBuildBridge().
|
staticconstexpr |
Definition at line 39 of file town_type.h.
|
staticconstexpr |
Definition at line 35 of file town_type.h.