|
@@ -93,13 +93,13 @@
|
|
|
if (!::IsTileType(tile, MP_STATION)) return -1;
|
|
|
|
|
|
const Station *st = ::Station::GetByTile(tile);
|
|
|
if (st->owner != _current_company) return -1;
|
|
|
if ((st->facilities & FACIL_AIRPORT) == 0) return -1;
|
|
|
|
|
|
return st->GetAirportSpec()->nof_depots;
|
|
|
return st->airport.GetSpec()->nof_depots;
|
|
|
}
|
|
|
|
|
|
/* static */ TileIndex AIAirport::GetHangarOfAirport(TileIndex tile)
|
|
|
{
|
|
|
if (!::IsValidTile(tile)) return INVALID_TILE;
|
|
|
if (!::IsTileType(tile, MP_STATION)) return INVALID_TILE;
|
|
@@ -117,13 +117,13 @@
|
|
|
if (!AITile::IsStationTile(tile)) return AT_INVALID;
|
|
|
|
|
|
StationID station_id = ::GetStationIndex(tile);
|
|
|
|
|
|
if (!AIStation::HasStationType(station_id, AIStation::STATION_AIRPORT)) return AT_INVALID;
|
|
|
|
|
|
return (AirportType)::Station::Get(station_id)->airport_type;
|
|
|
return (AirportType)::Station::Get(station_id)->airport.type;
|
|
|
}
|
|
|
|
|
|
|
|
|
/* static */ int AIAirport::GetNoiseLevelIncrease(TileIndex tile, AirportType type)
|
|
|
{
|
|
|
extern Town *AirportGetNearestTown(const AirportSpec *as, TileIndex airport_tile);
|