summaryrefslogtreecommitdiff
path: root/src/script/api/script_station.hpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-04-17 19:43:18 +0000
committermichi_cc <michi_cc@openttd.org>2012-04-17 19:43:18 +0000
commitaa47d6c7f2b18d5277ed8d1e47f078e6d73bc6b9 (patch)
treec9dfb4e1826ddbef58cc31872029e49d18c9d9bd /src/script/api/script_station.hpp
parentaf6a33bd1c191f1fcb60f85d8c2c38eca6db4cc5 (diff)
downloadopenttd-aa47d6c7f2b18d5277ed8d1e47f078e6d73bc6b9.tar.xz
(svn r24127) -Feature [FS#1497]: Allow closing airports for incoming aircraft. (Based on patch by cirdan)
Diffstat (limited to 'src/script/api/script_station.hpp')
-rw-r--r--src/script/api/script_station.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/script/api/script_station.hpp b/src/script/api/script_station.hpp
index 268a0bce4..bb5d22c1b 100644
--- a/src/script/api/script_station.hpp
+++ b/src/script/api/script_station.hpp
@@ -172,6 +172,24 @@ public:
* towns grow, towns change. So don't depend on this value too much.
*/
static TownID GetNearestTown(StationID station_id);
+
+ /**
+ * Get the open/closed state of an airport.
+ * @param station_id The airport to look at.
+ * @pre IsValidStation(station_id).
+ * @pre HasStationType(station_id, STATION_AIRPORT).
+ * @return True if the airport is currently closed to incoming traffic.
+ */
+ static bool IsAirportClosed(StationID station_id);
+
+ /**
+ * Toggle the open/closed state of an airport.
+ * @param station_id The airport to modify.
+ * @pre IsValidStation(station_id).
+ * @pre HasStationType(station_id, STATION_AIRPORT).
+ * @return True if the state could be toggled.
+ */
+ static bool OpenCloseAirport(StationID station_id);
};
DECLARE_ENUM_AS_BIT_SET(ScriptStation::StationType)