63 uint16 initial_payment;
64 uint8 transit_days[2];
83 Money current_payment;
155 #define FOR_ALL_CARGOSPECS_FROM(var, start) for (size_t cargospec_index = start; var = NULL, cargospec_index < CargoSpec::GetArraySize(); cargospec_index++) \ 156 if ((var = CargoSpec::Get(cargospec_index))->IsValid()) 157 #define FOR_ALL_CARGOSPECS(var) FOR_ALL_CARGOSPECS_FROM(var, 0) 159 #define FOR_EACH_SET_CARGO_ID(var, cargo_bits) FOR_EACH_SET_BIT_EX(CargoID, var, uint, cargo_bits) 166 #define FOR_ALL_SORTED_CARGOSPECS(var) for (uint8 index = 0; index < _sorted_cargo_specs_size && (var = _sorted_cargo_specs[index], true) ; index++) 173 #define FOR_ALL_SORTED_STANDARD_CARGOSPECS(var) for (uint8 index = 0; index < _sorted_standard_cargo_specs_size && (var = _sorted_cargo_specs[index], true); index++) const struct GRFFile * grffile
NewGRF where #group belongs to.
Special bit used for livery refit tricks instead of normal cargoes.
CargoID GetCargoIDByLabel(CargoLabel cl)
Get the cargo ID by cargo label.
const CargoSpec * _sorted_cargo_specs[NUM_CARGO]
Cargo specifications sorted alphabetically by name.
uint32 _standard_cargo_mask
Bitmask of real cargo types available.
uint8 weight
Weight of a single unit of this cargo type in 1/16 ton (62.5 kg).
uint8 _sorted_standard_cargo_specs_size
Number of standard cargo specifications stored at the _sorted_cargo_specs array.
bool is_freight
Cargo type is considered to be freight (affects train freight multiplier).
uint32 _cargo_mask
Bitmask of cargo types available.
Specification of a cargo type.
Piece goods (Livestock, Wood, Steel, Paper)
Tindex index
Index of this pool item.
StringID name_single
Name of a single entity of this type of cargo.
Cargo behaves water-like.
StringID abbrev
Two letter abbreviation for this cargo type.
Cargo behaves goods/candy-like.
StringID quantifier
Text for multiple units of cargo of this type.
uint16 classes
Classes of this cargo type.
Types related to cargoes...
StringID name
Name of this type of cargo.
uint16 multiplier
Capacity multiplier for vehicles. (8 fractional bits)
CargoID GetCargoIDByBitnum(uint8 bitnum)
Find the CargoID of a 'bitnum' value.
Covered/Sheltered Freight (Transportation in Box Vans, Silo Wagons, etc.)
TownEffect
Town growth effect when delivering cargo.
Armoured cargo (Valuables, Gold, Diamonds)
Types related to the economy.
No cargo class has been specified.
void InitializeSortedCargoSpecs()
Initialize the list of sorted cargo specifications.
Express cargo (Goods, Food, Candy, but also possible for passengers)
Liquids (Oil, Water, Rubber)
uint8 callback_mask
Bitmask of cargo callbacks that have to be called.
CargoLabel label
Unique label of the cargo type.
#define lengthof(x)
Return the length of an fixed size array.
static bool IsCargoInClass(CargoID c, CargoClass cc)
Does cargo c have cargo class cc?
uint32 StringID
Numeric value that represents a string, independent of the selected language.
Maximal number of cargo types in a game.
Cargo behaves passenger-like.
TownEffect town_effect
The effect that delivering this cargo type has on towns. Also affects destination of subsidies...
SpriteID GetCargoIcon() const
Get sprite for showing cargo of this type.
byte LandscapeID
Landscape type.
uint32 SpriteID
The number of a sprite, without mapping bits and colourtables.
Types related to the landscape.
static CargoSpec * Get(size_t index)
Retrieve cargo details for the given cargo ID.
uint8 _sorted_cargo_specs_size
Number of cargo specifications stored at the _sorted_cargo_specs array (including special cargoes)...
Hazardous cargo (Nuclear Fuel, Explosives, etc.)
static const byte INVALID_CARGO
Constant representing invalid cargo.
uint32 CargoLabel
Globally unique label of a cargo type.
static size_t GetArraySize()
Total number of cargospecs, both valid and invalid.
CargoID Index() const
Determines index of this cargospec.
Types related to strings.
Cargo behaves food/fizzy-drinks-like.
Bulk cargo (Coal, Grain etc., Ores, Fruit)
static CargoSpec array[NUM_CARGO]
Array holding all CargoSpecs.
uint8 bitnum
Cargo bit number, is INVALID_CARGO for a non-used spec.
StringID units_volume
Name of a single unit of cargo of this type.
bool IsValid() const
Tests for validity of this cargospec.
byte CargoID
Cargo slots to indicate a cargo type within a game.
uint16 multipliertowngrowth
Size of the effect.
Refrigerated cargo (Food, Fruit)
SpriteID sprite
Icon to display this cargo type, may be 0xFFF (which means to resolve an action123 chain)...
friend void SetupCargoForClimate(LandscapeID l)
Set up the default cargo types for the given landscape type.
Types related to the graphics and/or input devices.
Dynamic data of a loaded NewGRF.