summaryrefslogtreecommitdiff
path: root/src/cargotype.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2021-04-30 17:35:32 +0200
committerfrosch <github@elsenhans.name>2021-05-13 23:28:43 +0200
commit9f8d0b1bee104471aff1a5e318b2a92bc235d934 (patch)
treefc0ff5fa0ae9e6eba562b07a02f1d5cc9876d056 /src/cargotype.h
parenta9ff296c3d608f04a14cd604a94531f5b42b2061 (diff)
downloadopenttd-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.h1
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;