diff options
author | frosch <frosch@openttd.org> | 2021-04-30 17:35:32 +0200 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2021-05-13 23:28:43 +0200 |
commit | 9f8d0b1bee104471aff1a5e318b2a92bc235d934 (patch) | |
tree | fc0ff5fa0ae9e6eba562b07a02f1d5cc9876d056 /src/cargotype.h | |
parent | a9ff296c3d608f04a14cd604a94531f5b42b2061 (diff) | |
download | openttd-9f8d0b1bee104471aff1a5e318b2a92bc235d934.tar.xz |
Fix: Resolve cargo-types of default vehicles via their cargo label.
Default vehicles now behave as if they had a cargo translation table. This fixes default vehicles carrying seemingly random cargos, if NewGRF industry sets are present.
This behavior is disabled, when a NewGRF touches any of the cargo-type or refitting properties. In that case it's up to the NewGRF to define its own cargo translation table.
Diffstat (limited to 'src/cargotype.h')
-rw-r--r-- | src/cargotype.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cargotype.h b/src/cargotype.h index 4a295f1ae..e411d5312 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -177,6 +177,7 @@ extern CargoTypes _standard_cargo_mask; void SetupCargoForClimate(LandscapeID l); CargoID GetCargoIDByLabel(CargoLabel cl); CargoID GetCargoIDByBitnum(uint8 bitnum); +CargoID GetDefaultCargoID(LandscapeID l, CargoType ct); void InitializeSortedCargoSpecs(); extern std::vector<const CargoSpec *> _sorted_cargo_specs; |