(svn r15489) -Change [API CHANGE]: Remove AIAirport::AirportAvailable. AIAirport::IsValidAirportType now only returns true for available AirportTypes.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
/* static */ bool AIAirport::IsValidAirportType(AirportType type)
|
||||
{
|
||||
return type >= AT_SMALL && type <= AT_HELISTATION;
|
||||
return type >= AT_SMALL && type <= AT_HELISTATION && HasBit(::GetValidAirports(), type);
|
||||
}
|
||||
|
||||
/* static */ bool AIAirport::IsHangarTile(TileIndex tile)
|
||||
@@ -28,13 +28,6 @@
|
||||
return ::IsTileType(tile, MP_STATION) && ::IsAirport(tile);
|
||||
}
|
||||
|
||||
/* static */ bool AIAirport::AirportAvailable(AirportType type)
|
||||
{
|
||||
if (!IsValidAirportType(type)) return false;
|
||||
|
||||
return HasBit(::GetValidAirports(), type);
|
||||
}
|
||||
|
||||
/* static */ int32 AIAirport::GetAirportWidth(AirportType type)
|
||||
{
|
||||
if (!IsValidAirportType(type)) return -1;
|
||||
|
||||
Reference in New Issue
Block a user