# ai_cargo.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_cargo.hpp 15904 2009-03-30 23:22:13Z rubidium $ */
    00002
    00005 #ifndef AI_CARGO_HPP
    00006 #define AI_CARGO_HPP
    00007
    00008 #include "ai_object.hpp"
    00009
    00013 class AICargo : public AIObject {
    00014 public:
    00015   static const char *GetClassName() { return "AICargo"; }
    00016
    00020   enum CargoClass {
    00021     CC_PASSENGERS   = 1 <<  0,
    00022     CC_MAIL         = 1 <<  1,
    00023     CC_EXPRESS      = 1 <<  2,
    00024     CC_ARMOURED     = 1 <<  3,
    00025     CC_BULK         = 1 <<  4,
    00026     CC_PIECE_GOODS  = 1 <<  5,
    00027     CC_LIQUID       = 1 <<  6,
    00028     CC_REFRIGERATED = 1 <<  7,
    00029     CC_HAZARDOUS    = 1 <<  8,
    00030     CC_COVERED      = 1 <<  9,
    00031   };
    00032
    00036   enum TownEffect {
    00037     TE_NONE       = 0,
    00038     TE_PASSENGERS = 1,
    00039     TE_MAIL       = 2,
    00040     TE_GOODS      = 3,
    00041     TE_WATER      = 4,
    00042     TE_FOOD       = 5,
    00043   };
    00044
    00050   static bool IsValidCargo(CargoID cargo_type);
    00051
    00060   static char *GetCargoLabel(CargoID cargo_type);
    00061
    00070   static bool IsFreight(CargoID cargo_type);
    00071
    00079   static bool HasCargoClass(CargoID cargo_type, CargoClass cargo_class);
    00080
    00087   static TownEffect GetTownEffect(CargoID cargo_type);
    00088
    00098   static Money GetCargoIncome(CargoID cargo_type, uint32 distance, uint32 days_in_transit);
    00099 };
    00100
    00101 #endif /* AI_CARGO_HPP */