src/aircraft.h
branchNewGRF_ports
changeset 6870 ca3fd1fbe311
parent 6868 7eb395287b3d
child 6872 1c4a4a609f85
--- a/src/aircraft.h	Thu Sep 06 19:42:48 2007 +0000
+++ b/src/aircraft.h	Sat Oct 06 21:16:00 2007 +0000
@@ -34,14 +34,13 @@
 	return (v->subtype & 0x07) <= AIR_AIRCRAFT;
 }
 
-/** Checks if an aircraft is buildable at the tile in question
+/** Checks if an aircraft can use the station in question
  * @param engine The engine to test
- * @param tile The tile where the hangar is
- * @return true if the aircraft can be build
+ * @param st The station
+ * @return true if the aircraft can use the station
  */
-static inline bool IsAircraftBuildableAtStation(EngineID engine, TileIndex tile)
+static inline bool CanAircraftUseStation(EngineID engine, const Station *st)
 {
-	const Station *st = GetStationByTile(tile);
 	const AirportFTAClass *apc = st->Airport();
 	const AircraftVehicleInfo *avi = AircraftVehInfo(engine);
 
@@ -49,6 +48,16 @@
 	return (apc->flags & (avi->subtype & AIR_CTOL ? AirportFTAClass::AIRPLANES : AirportFTAClass::HELICOPTERS)) != 0;
 }
 
+/** Checks if an aircraft can use the station at the tile in question
+ * @param engine The engine to test
+ * @param tile The tile where the station is
+ * @return true if the aircraft can use the station
+ */
+static inline bool CanAircraftUseStation(EngineID engine, TileIndex tile)
+{
+	return CanAircraftUseStation(engine, GetStationByTile(tile));
+}
+
 /**
  * Calculates cargo capacity based on an aircraft's passenger
  * and mail capacities.