diff options
Diffstat (limited to 'src/cargotype.h')
-rw-r--r-- | src/cargotype.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cargotype.h b/src/cargotype.h index e2574a080..c3bccf791 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -57,5 +57,10 @@ const CargoSpec *GetCargo(CargoID c); /* Get the cargo ID with the cargo label */ CargoID GetCargoIDByLabel(CargoLabel cl); +static inline bool IsCargoInClass(CargoID c, uint16 cc) +{ + return GetCargo(c)->classes & cc; +} + #endif /* CARGOTYPE_H */ |