| OpenTTD
    | 
Defines the data structure for an airport. More...
#include <newgrf_airport.h>
| Public Member Functions | |
| bool | IsAvailable () const | 
| Check whether this airport is available to build. | |
| byte | GetIndex () const | 
| Get the index of this spec. | |
| Static Public Member Functions | |
| static const AirportSpec * | Get (byte type) | 
| Retrieve airport spec for the given airport. | |
| static AirportSpec * | GetWithoutOverride (byte type) | 
| Retrieve airport spec for the given airport. | |
| static void | ResetAirports () | 
| This function initializes the airportspec array. | |
| Data Fields | |
| struct AirportFTAClass * | fsm | 
| the finite statemachine for the default airports | |
| const AirportTileTable *const * | table | 
| list of the tiles composing the airport | |
| Direction * | rotation | 
| the rotation of each tiletable | |
| byte | num_table | 
| number of elements in the table | |
| const HangarTileTable * | depot_table | 
| gives the position of the depots on the airports | |
| byte | nof_depots | 
| the number of hangar tiles in this airport | |
| byte | size_x | 
| size of airport in x direction | |
| byte | size_y | 
| size of airport in y direction | |
| byte | noise_level | 
| noise that this airport generates | |
| byte | catchment | 
| catchment area of this airport | |
| Year | min_year | 
| first year the airport is available | |
| Year | max_year | 
| last year the airport is available | |
| StringID | name | 
| name of this airport | |
| TTDPAirportType | ttd_airport_type | 
| ttdpatch airport type (Small/Large/Helipad/Oilrig) | |
| AirportClassID | cls_id | 
| the class to which this airport type belongs | |
| SpriteID | preview_sprite | 
| preview sprite for this airport | |
| uint16 | maintenance_cost | 
| maintenance cost multiplier | |
| bool | enabled | 
| Entity still available (by default true). Newgrf can disable it, though. | |
| struct GRFFileProps | grf_prop | 
| Properties related to the grf file. | |
| Static Public Attributes | |
| static AirportSpec | dummy = AS_GENERIC(&_airportfta_dummy, NULL, _default_airports_rotation, 0, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, 0, ATP_TTDP_LARGE, APC_BEGIN, STR_NULL, 0, false) | 
| The dummy airport. | |
| Static Private Attributes | |
| static AirportSpec | specs [NUM_AIRPORTS] | 
| Specs of the airports. | |
Defines the data structure for an airport.
Definition at line 100 of file newgrf_airport.h.
| 
 | static | 
Retrieve airport spec for the given airport.
If an override is available it is returned.
| type | index of airport | 
Definition at line 87 of file newgrf_airport.cpp.
References enabled, OverrideManagerBase::GetSubstituteID(), grf_prop, lengthof, GRFFileProps::override, and specs.
Referenced by AirportResolverObject::AirportResolverObject(), CmdBuildAirport(), GetAirport(), Airport::GetSpec(), and BuildAirportWindow::UpdateWidgetSize().
| 
 | inline | 
Get the index of this spec.
Definition at line 130 of file newgrf_airport.h.
Referenced by GetAirportTextCallback().
| 
 | static | 
Retrieve airport spec for the given airport.
Even if an override is available the base spec is returned.
| type | index of airport | 
Definition at line 106 of file newgrf_airport.cpp.
References lengthof, and specs.
Referenced by AirportChangeInfo(), and BindAirportSpecs().
| bool AirportSpec::IsAvailable | ( | ) | const | 
Check whether this airport is available to build.
Definition at line 113 of file newgrf_airport.cpp.
References _cur_year, _settings_game, enabled, max_year, min_year, StationSettings::never_expire_airports, and GameSettings::station.
Referenced by CmdBuildAirport(), BuildAirportWindow::DrawWidget(), BuildAirportWindow::OnClick(), and BuildAirportWindow::SelectFirstAvailableAirport().
| 
 | staticprivate | 
Specs of the airports.
Airport specifications.
Definition at line 139 of file newgrf_airport.h.
Referenced by Get(), GetIndex(), GetWithoutOverride(), and ResetAirports().
 1.8.1.2
 1.8.1.2