diff options
Diffstat (limited to 'src/cargo_type.h')
-rw-r--r-- | src/cargo_type.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cargo_type.h b/src/cargo_type.h index 1eca0edff..79d1c84f4 100644 --- a/src/cargo_type.h +++ b/src/cargo_type.h @@ -70,6 +70,11 @@ enum CargoType { CT_INVALID = 0xFF, ///< Invalid cargo type. }; +/** Test whether cargo type is not CT_INVALID */ +inline bool IsCargoTypeValid(CargoType t) { return t != CT_INVALID; } +/** Test whether cargo type is not CT_INVALID */ +inline bool IsCargoIDValid(CargoID t) { return t != CT_INVALID; } + typedef uint64 CargoTypes; static const CargoTypes ALL_CARGOTYPES = (CargoTypes)UINT64_MAX; |