src/ai/api/ai_station.hpp
branchnoai
changeset 9670 820b77e19bb3
parent 9666 5765eb70736d
child 9696 4384ed3de1f0
equal deleted inserted replaced
9669:366771e15a2c 9670:820b77e19bb3
    10 /**
    10 /**
    11  * Class that handles all station related functions.
    11  * Class that handles all station related functions.
    12  */
    12  */
    13 class AIStation : public AIObject {
    13 class AIStation : public AIObject {
    14 public:
    14 public:
       
    15 	/**
       
    16 	 * Type of stations known in the game.
       
    17 	 */
       
    18 	enum StationType {
       
    19 		STATION_ANY        = 0x00,
       
    20 		STATION_TRAIN      = 0x01,
       
    21 		STATION_TRUCK_STOP = 0x02,
       
    22 		STATION_BUS_STOP   = 0x04,
       
    23 		STATION_AIRPORT    = 0x08,
       
    24 		STATION_DOCK       = 0x10,
       
    25 	};
       
    26 
    15 	/**
    27 	/**
    16 	 * The name of the class, needed by several sub-processes.
    28 	 * The name of the class, needed by several sub-processes.
    17 	 */
    29 	 */
    18 	static const char *GetClassName() { return "AIStation"; }
    30 	static const char *GetClassName() { return "AIStation"; }
    19 
    31 
    57 	 * @pre IsValidStation(station_id).
    69 	 * @pre IsValidStation(station_id).
    58 	 * @pre IsValidCargo(cargo_id).
    70 	 * @pre IsValidCargo(cargo_id).
    59 	 * @return the rating in percent of the cargo on the station.
    71 	 * @return the rating in percent of the cargo on the station.
    60 	 */
    72 	 */
    61 	static int32 GetCargoRating(StationID station_id, CargoID cargo_id);
    73 	static int32 GetCargoRating(StationID station_id, CargoID cargo_id);
       
    74 
       
    75 	/**
       
    76 	 * Get the coverage radius of this type of station.
       
    77 	 * @param type the type of station.
       
    78 	 * @return the radius in tiles.
       
    79 	 */
       
    80 	static int32 GetCoverageRadius(AIStation::StationType type);
    62 };
    81 };
       
    82 DECLARE_ENUM_AS_BIT_SET(AIStation::StationType);
    63 
    83 
    64 #endif /* AI_STATION_HPP */
    84 #endif /* AI_STATION_HPP */