OpenTTD Source
20241121-master-g67a0fccfad
|
Table of all default cargo types. More...
Go to the source code of this file.
Macros | |
#define | MK_STR_CARGO_PLURAL(label_plural) STR_CARGO_PLURAL_ ## label_plural |
Construction macros for the CargoSpec StringID entries. | |
#define | MK_STR_CARGO_SINGULAR(label_singular) STR_CARGO_SINGULAR_ ## label_singular |
#define | MK_STR_QUANTITY(label_plural) STR_QUANTITY_ ## label_plural |
#define | MK_STR_ABBREV(label_plural) STR_ABBREV_ ## label_plural |
#define | MK_SPRITE(label_plural) SPR_CARGO_ ## label_plural |
Construction macros for the CargoSpec SpriteID entry. | |
#define | MK(bt, label, colour, weight, mult, ip, td1, td2, freight, tae, str_plural, str_singular, str_volume, classes) |
Construction macro for a CargoSpec structure. More... | |
Variables | |
static const CargoSpec | _default_cargo [] |
Cargo types available by default. | |
static const std::variant< CargoLabel, int > | _default_climate_cargo [NUM_LANDSCAPE][NUM_ORIGINAL_CARGO] |
Table of cargo types available in each climate, by default. More... | |
Table of all default cargo types.
Definition in file cargo_const.h.
#define MK | ( | bt, | |
label, | |||
colour, | |||
weight, | |||
mult, | |||
ip, | |||
td1, | |||
td2, | |||
freight, | |||
tae, | |||
str_plural, | |||
str_singular, | |||
str_volume, | |||
classes | |||
) |
Construction macro for a CargoSpec structure.
The order of arguments matches the order in which they are defined in CargoSpec. Some macros are used to automatically expand to the correct StringID consts, this means that adding/changing a cargo spec requires updating of the following strings:
bt | Cargo bit number, is INVALID_CARGO_BITNUM for a non-used spec. |
label | Unique label of the cargo type. |
colour | CargoSpec->legend_colour and CargoSpec->rating_colour. |
weight | Weight of a single unit of this cargo type in 1/16 ton (62.5 kg). |
mult | Capacity multiplier for vehicles. (8 fractional bits). |
ip | CargoSpec->initial_payment. |
td1 | CargoSpec->transit_periods[0]. |
td2 | CargoSpec->transit_periods[1]. |
freight | Cargo type is considered to be freight (affects train freight multiplier). |
tae | The effect that delivering this cargo type has on towns. |
str_plural | The name suffix used to populate CargoSpec->name, CargoSpec->quantifier, CargoSpec->abbrev and CargoSpec->sprite. See above for more detailed information. |
str_singular | The name suffix used to populate CargoSpec->name_single. See above for more information. |
str_volume | Name of a single unit of cargo of this type. |
classes | Classes of this cargo type. |
Definition at line 46 of file cargo_const.h.
|
static |
Table of cargo types available in each climate, by default.
Definition at line 99 of file cargo_const.h.