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 #include "../../cargotype.h"
00017 #include "../../cargo_type.h"
00018
00023 class ScriptCargo : public ScriptObject {
00024 public:
00028 enum CargoClass {
00029
00030 CC_PASSENGERS = ::CC_PASSENGERS,
00031 CC_MAIL = ::CC_MAIL,
00032 CC_EXPRESS = ::CC_EXPRESS,
00033 CC_ARMOURED = ::CC_ARMOURED,
00034 CC_BULK = ::CC_BULK,
00035 CC_PIECE_GOODS = ::CC_PIECE_GOODS,
00036 CC_LIQUID = ::CC_LIQUID,
00037 CC_REFRIGERATED = ::CC_REFRIGERATED,
00038 CC_HAZARDOUS = ::CC_HAZARDOUS,
00039 CC_COVERED = ::CC_COVERED,
00040 };
00041
00045 enum TownEffect {
00046
00047 TE_NONE = ::TE_NONE,
00048 TE_PASSENGERS = ::TE_PASSENGERS,
00049 TE_MAIL = ::TE_MAIL,
00050 TE_GOODS = ::TE_GOODS,
00051 TE_WATER = ::TE_WATER,
00052 TE_FOOD = ::TE_FOOD,
00053 };
00054
00058 enum SpecialCargoID {
00059
00060 CT_AUTO_REFIT = ::CT_AUTO_REFIT,
00061 CT_NO_REFIT = ::CT_NO_REFIT,
00062 };
00063
00069 static bool IsValidCargo(CargoID cargo_type);
00070
00076 static bool IsValidTownEffect(TownEffect towneffect_type);
00077
00086 static char *GetCargoLabel(CargoID cargo_type);
00087
00096 static bool IsFreight(CargoID cargo_type);
00097
00105 static bool HasCargoClass(CargoID cargo_type, CargoClass cargo_class);
00106
00113 static TownEffect GetTownEffect(CargoID cargo_type);
00114
00124 static Money GetCargoIncome(CargoID cargo_type, uint32 distance, uint32 days_in_transit);
00125 };
00126
00127 #endif