summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_airport.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-02-14 21:16:21 +0000
committeryexo <yexo@openttd.org>2009-02-14 21:16:21 +0000
commit16954ba37806a4510e626d5ceb29f8114c275a3d (patch)
tree0080f4623a8ee03c92d581adb1d7f6de837db053 /src/ai/api/ai_airport.cpp
parentbce1bcb0f27affa6678c3f657c06955afbf4b47b (diff)
downloadopenttd-16954ba37806a4510e626d5ceb29f8114c275a3d.tar.xz
(svn r15489) -Change [API CHANGE]: Remove AIAirport::AirportAvailable. AIAirport::IsValidAirportType now only returns true for available AirportTypes.
Diffstat (limited to 'src/ai/api/ai_airport.cpp')
-rw-r--r--src/ai/api/ai_airport.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ai/api/ai_airport.cpp b/src/ai/api/ai_airport.cpp
index b2b969b82..ed58701c3 100644
--- a/src/ai/api/ai_airport.cpp
+++ b/src/ai/api/ai_airport.cpp
@@ -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;