# ai_airport.hpp

Go to the documentation of this file.

    00001 /* $Id: ai_airport.hpp 16902 2009-07-21 17:17:20Z rubidium $ */
    00002
    00005 #ifndef AI_AIRPORT_HPP
    00006 #define AI_AIRPORT_HPP
    00007
    00008 #include "ai_object.hpp"
    00009
    00013 class AIAirport : public AIObject {
    00014 public:
    00015   static const char *GetClassName() { return "AIAirport"; }
    00016
    00020   enum AirportType {
    00021     /* Note: the values _are_ important as they represent an in-game value */
    00022     AT_SMALL         =   0,
    00023     AT_LARGE         =   1,
    00024     AT_METROPOLITAN  =   3,
    00025     AT_INTERNATIONAL =   4,
    00026     AT_COMMUTER      =   5,
    00027     AT_INTERCON      =   7,
    00028
    00029     /* Next are the airports which only have helicopter platforms */
    00030     AT_HELIPORT      =   2,
    00031     AT_HELISTATION   =   8,
    00032     AT_HELIDEPOT     =   6,
    00033
    00034     AT_INVALID       = 255,
    00035   };
    00036
    00040   enum PlaneType {
    00041     /* Note: the values _are_ important as they represent an in-game value */
    00042     PT_HELICOPTER    =   0,
    00043     PT_SMALL_PLANE   =   1,
    00044     PT_BIG_PLANE     =   3,
    00045
    00046     PT_INVALID       =  -1,
    00047   };
    00048
    00054   static bool IsValidAirportType(AirportType type);
    00055
    00061   static Money GetPrice(AirportType type);
    00062
    00069   static bool IsHangarTile(TileIndex tile);
    00070
    00077   static bool IsAirportTile(TileIndex tile);
    00078
    00084   static int32 GetAirportWidth(AirportType type);
    00085
    00091   static int32 GetAirportHeight(AirportType type);
    00092
    00098   static int32 GetAirportCoverageRadius(AirportType type);
    00099
    00106   static int32 GetNumHangars(TileIndex tile);
    00107
    00118   static TileIndex GetHangarOfAirport(TileIndex tile);
    00119
    00135   static bool BuildAirport(TileIndex tile, AirportType type, StationID station_id);
    00136
    00144   static bool RemoveAirport(TileIndex tile);
    00145
    00153   static AirportType GetAirportType(TileIndex tile);
    00154
    00163   static int GetNoiseLevelIncrease(TileIndex tile, AirportType type);
    00164
    00172   static TownID GetNearestTown(TileIndex tile, AirportType type);
    00173 };
    00174
    00175 #endif /* AI_AIRPORT_HPP */