Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef SCRIPT_AIRPORT_HPP
00013 #define SCRIPT_AIRPORT_HPP
00014
00015 #include "script_object.hpp"
00016 #include "../../airport.h"
00017
00022 class ScriptAirport : public ScriptObject {
00023 public:
00027 enum AirportType {
00028
00029 AT_SMALL = ::AT_SMALL,
00030 AT_LARGE = ::AT_LARGE,
00031 AT_METROPOLITAN = ::AT_METROPOLITAN,
00032 AT_INTERNATIONAL = ::AT_INTERNATIONAL,
00033 AT_COMMUTER = ::AT_COMMUTER,
00034 AT_INTERCON = ::AT_INTERCON,
00035 AT_HELIPORT = ::AT_HELIPORT,
00036 AT_HELISTATION = ::AT_HELISTATION,
00037 AT_HELIDEPOT = ::AT_HELIDEPOT,
00038 AT_INVALID = ::AT_INVALID,
00039 };
00040
00044 enum PlaneType {
00045
00046 PT_HELICOPTER = 0,
00047 PT_SMALL_PLANE = 1,
00048 PT_BIG_PLANE = 3,
00049
00050 PT_INVALID = -1,
00051 };
00052
00059 static bool IsValidAirportType(AirportType type);
00060
00069 static bool IsAirportInformationAvailable(AirportType type);
00070
00077 static Money GetPrice(AirportType type);
00078
00085 static bool IsHangarTile(TileIndex tile);
00086
00093 static bool IsAirportTile(TileIndex tile);
00094
00101 static int32 GetAirportWidth(AirportType type);
00102
00109 static int32 GetAirportHeight(AirportType type);
00110
00117 static int32 GetAirportCoverageRadius(AirportType type);
00118
00125 static int32 GetNumHangars(TileIndex tile);
00126
00137 static TileIndex GetHangarOfAirport(TileIndex tile);
00138
00155 static bool BuildAirport(TileIndex tile, AirportType type, StationID station_id);
00156
00165 static bool RemoveAirport(TileIndex tile);
00166
00174 static AirportType GetAirportType(TileIndex tile);
00175
00185 static int GetNoiseLevelIncrease(TileIndex tile, AirportType type);
00186
00195 static TownID GetNearestTown(TileIndex tile, AirportType type);
00196
00203 static uint16 GetMaintenanceCostFactor(AirportType type);
00204 };
00205
00206 #endif