Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SCRIPT_CARGO_HPP
00013 #define SCRIPT_CARGO_HPP
00014
00015 #include "script_object.hpp"
00016
00021 class ScriptCargo : public ScriptObject {
00022 public:
00026 enum CargoClass {
00027 CC_PASSENGERS = 1 << 0,
00028 CC_MAIL = 1 << 1,
00029 CC_EXPRESS = 1 << 2,
00030 CC_ARMOURED = 1 << 3,
00031 CC_BULK = 1 << 4,
00032 CC_PIECE_GOODS = 1 << 5,
00033 CC_LIQUID = 1 << 6,
00034 CC_REFRIGERATED = 1 << 7,
00035 CC_HAZARDOUS = 1 << 8,
00036 CC_COVERED = 1 << 9,
00037 };
00038
00042 enum TownEffect {
00043 TE_NONE = 0,
00044 TE_PASSENGERS = 1,
00045 TE_MAIL = 2,
00046 TE_GOODS = 3,
00047 TE_WATER = 4,
00048 TE_FOOD = 5,
00049 };
00050
00054 enum SpecialCargoID {
00055 CT_AUTO_REFIT = 0xFD,
00056 CT_NO_REFIT = 0xFE,
00057 };
00058
00064 static bool IsValidCargo(CargoID cargo_type);
00065
00071 static bool IsValidTownEffect(TownEffect towneffect_type);
00072
00081 static char *GetCargoLabel(CargoID cargo_type);
00082
00091 static bool IsFreight(CargoID cargo_type);
00092
00100 static bool HasCargoClass(CargoID cargo_type, CargoClass cargo_class);
00101
00108 static TownEffect GetTownEffect(CargoID cargo_type);
00109
00119 static Money GetCargoIncome(CargoID cargo_type, uint32 distance, uint32 days_in_transit);
00120 };
00121
00122 #endif