summaryrefslogtreecommitdiff
path: root/src/script/api/game
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:57:34 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:57:34 +0000
commit9359c6fc47f6fabddc399d044ea74dc6ebfdfb05 (patch)
tree0e29635b5f349432059dc99b36df10aac24981f8 /src/script/api/game
parent436cf09923d881f3c11c8a4b6262c0a89ad1ee73 (diff)
downloadopenttd-9359c6fc47f6fabddc399d044ea74dc6ebfdfb05.tar.xz
(svn r23615) -Add: more API functions exposed to NoGo (part 2)
Diffstat (limited to 'src/script/api/game')
-rw-r--r--src/script/api/game/game_basestation.hpp.sq34
-rw-r--r--src/script/api/game/game_bridge.hpp.sq48
-rw-r--r--src/script/api/game/game_bridgelist.hpp.sq37
-rw-r--r--src/script/api/game/game_cargolist.hpp.sq61
-rw-r--r--src/script/api/game/game_depotlist.hpp.sq25
-rw-r--r--src/script/api/game/game_engine.hpp.sq51
-rw-r--r--src/script/api/game/game_enginelist.hpp.sq25
-rw-r--r--src/script/api/game/game_rail.hpp.sq84
-rw-r--r--src/script/api/game/game_railtypelist.hpp.sq25
-rw-r--r--src/script/api/game/game_station.hpp.sq61
-rw-r--r--src/script/api/game/game_stationlist.hpp.sq37
-rw-r--r--src/script/api/game/game_subsidy.hpp.sq39
-rw-r--r--src/script/api/game/game_subsidylist.hpp.sq25
-rw-r--r--src/script/api/game/game_tilelist.hpp.sq66
-rw-r--r--src/script/api/game/game_tunnel.hpp.sq44
-rw-r--r--src/script/api/game/game_vehiclelist.hpp.sq61
-rw-r--r--src/script/api/game/game_waypoint.hpp.sq42
-rw-r--r--src/script/api/game/game_waypointlist.hpp.sq37
18 files changed, 802 insertions, 0 deletions
diff --git a/src/script/api/game/game_basestation.hpp.sq b/src/script/api/game/game_basestation.hpp.sq
new file mode 100644
index 000000000..d20b4c739
--- /dev/null
+++ b/src/script/api/game/game_basestation.hpp.sq
@@ -0,0 +1,34 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_basestation.hpp"
+#include "../template/template_basestation.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptBaseStation, ST_GS>() { return "GSBaseStation"; }
+
+void SQGSBaseStation_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptBaseStation, ST_GS> SQGSBaseStation("GSBaseStation");
+ SQGSBaseStation.PreRegister(engine);
+ SQGSBaseStation.AddConstructor<void (ScriptBaseStation::*)(), 1>(engine, "x");
+
+ SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_NEW, "STATION_NEW");
+ SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_JOIN_ADJACENT, "STATION_JOIN_ADJACENT");
+ SQGSBaseStation.DefSQConst(engine, ScriptBaseStation::STATION_INVALID, "STATION_INVALID");
+
+ SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::IsValidBaseStation, "IsValidBaseStation", 2, ".i");
+ SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetName, "GetName", 2, ".i");
+ SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetLocation, "GetLocation", 2, ".i");
+ SQGSBaseStation.DefSQStaticMethod(engine, &ScriptBaseStation::GetConstructionDate, "GetConstructionDate", 2, ".i");
+
+ SQGSBaseStation.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_bridge.hpp.sq b/src/script/api/game/game_bridge.hpp.sq
new file mode 100644
index 000000000..d4c2d0583
--- /dev/null
+++ b/src/script/api/game/game_bridge.hpp.sq
@@ -0,0 +1,48 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_bridge.hpp"
+#include "../template/template_bridge.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptBridge, ST_GS>() { return "GSBridge"; }
+
+void SQGSBridge_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptBridge, ST_GS> SQGSBridge("GSBridge");
+ SQGSBridge.PreRegister(engine);
+ SQGSBridge.AddConstructor<void (ScriptBridge::*)(), 1>(engine, "x");
+
+ SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_BASE, "ERR_BRIDGE_BASE");
+ SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE");
+ SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER");
+ SQGSBridge.DefSQConst(engine, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE);
+ ScriptError::RegisterErrorMap(STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH, ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER);
+ ScriptError::RegisterErrorMap(STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT, ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT);
+
+ ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_TYPE_UNAVAILABLE, "ERR_BRIDGE_TYPE_UNAVAILABLE");
+ ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_CANNOT_END_IN_WATER, "ERR_BRIDGE_CANNOT_END_IN_WATER");
+ ScriptError::RegisterErrorMapString(ScriptBridge::ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT, "ERR_BRIDGE_HEADS_NOT_ON_SAME_HEIGHT");
+
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsValidBridge, "IsValidBridge", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::IsBridgeTile, "IsBridgeTile", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetBridgeID, "GetBridgeID", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetName, "GetName", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetPrice, "GetPrice", 3, ".ii");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMaxLength, "GetMaxLength", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetMinLength, "GetMinLength", 2, ".i");
+ SQGSBridge.DefSQStaticMethod(engine, &ScriptBridge::GetOtherBridgeEnd, "GetOtherBridgeEnd", 2, ".i");
+
+ SQGSBridge.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_bridgelist.hpp.sq b/src/script/api/game/game_bridgelist.hpp.sq
new file mode 100644
index 000000000..d40c2c1e0
--- /dev/null
+++ b/src/script/api/game/game_bridgelist.hpp.sq
@@ -0,0 +1,37 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_bridgelist.hpp"
+#include "../template/template_bridgelist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptBridgeList, ST_GS>() { return "GSBridgeList"; }
+
+void SQGSBridgeList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptBridgeList, ST_GS> SQGSBridgeList("GSBridgeList");
+ SQGSBridgeList.PreRegister(engine, "GSList");
+ SQGSBridgeList.AddConstructor<void (ScriptBridgeList::*)(), 1>(engine, "x");
+
+ SQGSBridgeList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptBridgeList_Length, ST_GS>() { return "GSBridgeList_Length"; }
+
+void SQGSBridgeList_Length_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptBridgeList_Length, ST_GS> SQGSBridgeList_Length("GSBridgeList_Length");
+ SQGSBridgeList_Length.PreRegister(engine, "GSList");
+ SQGSBridgeList_Length.AddConstructor<void (ScriptBridgeList_Length::*)(uint length), 2>(engine, "xi");
+
+ SQGSBridgeList_Length.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_cargolist.hpp.sq b/src/script/api/game/game_cargolist.hpp.sq
new file mode 100644
index 000000000..00b22b3d7
--- /dev/null
+++ b/src/script/api/game/game_cargolist.hpp.sq
@@ -0,0 +1,61 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_cargolist.hpp"
+#include "../template/template_cargolist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptCargoList, ST_GS>() { return "GSCargoList"; }
+
+void SQGSCargoList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptCargoList, ST_GS> SQGSCargoList("GSCargoList");
+ SQGSCargoList.PreRegister(engine, "GSList");
+ SQGSCargoList.AddConstructor<void (ScriptCargoList::*)(), 1>(engine, "x");
+
+ SQGSCargoList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptCargoList_IndustryAccepting, ST_GS>() { return "GSCargoList_IndustryAccepting"; }
+
+void SQGSCargoList_IndustryAccepting_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptCargoList_IndustryAccepting, ST_GS> SQGSCargoList_IndustryAccepting("GSCargoList_IndustryAccepting");
+ SQGSCargoList_IndustryAccepting.PreRegister(engine, "GSList");
+ SQGSCargoList_IndustryAccepting.AddConstructor<void (ScriptCargoList_IndustryAccepting::*)(IndustryID industry_id), 2>(engine, "xi");
+
+ SQGSCargoList_IndustryAccepting.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptCargoList_IndustryProducing, ST_GS>() { return "GSCargoList_IndustryProducing"; }
+
+void SQGSCargoList_IndustryProducing_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptCargoList_IndustryProducing, ST_GS> SQGSCargoList_IndustryProducing("GSCargoList_IndustryProducing");
+ SQGSCargoList_IndustryProducing.PreRegister(engine, "GSList");
+ SQGSCargoList_IndustryProducing.AddConstructor<void (ScriptCargoList_IndustryProducing::*)(IndustryID industry_id), 2>(engine, "xi");
+
+ SQGSCargoList_IndustryProducing.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptCargoList_StationAccepting, ST_GS>() { return "GSCargoList_StationAccepting"; }
+
+void SQGSCargoList_StationAccepting_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptCargoList_StationAccepting, ST_GS> SQGSCargoList_StationAccepting("GSCargoList_StationAccepting");
+ SQGSCargoList_StationAccepting.PreRegister(engine, "GSList");
+ SQGSCargoList_StationAccepting.AddConstructor<void (ScriptCargoList_StationAccepting::*)(StationID station_id), 2>(engine, "xi");
+
+ SQGSCargoList_StationAccepting.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_depotlist.hpp.sq b/src/script/api/game/game_depotlist.hpp.sq
new file mode 100644
index 000000000..59257cdad
--- /dev/null
+++ b/src/script/api/game/game_depotlist.hpp.sq
@@ -0,0 +1,25 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_depotlist.hpp"
+#include "../template/template_depotlist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptDepotList, ST_GS>() { return "GSDepotList"; }
+
+void SQGSDepotList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptDepotList, ST_GS> SQGSDepotList("GSDepotList");
+ SQGSDepotList.PreRegister(engine, "GSList");
+ SQGSDepotList.AddConstructor<void (ScriptDepotList::*)(ScriptTile::TransportType transport_type), 2>(engine, "xi");
+
+ SQGSDepotList.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_engine.hpp.sq b/src/script/api/game/game_engine.hpp.sq
new file mode 100644
index 000000000..488175547
--- /dev/null
+++ b/src/script/api/game/game_engine.hpp.sq
@@ -0,0 +1,51 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_engine.hpp"
+#include "../template/template_engine.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptEngine, ST_GS>() { return "GSEngine"; }
+
+void SQGSEngine_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptEngine, ST_GS> SQGSEngine("GSEngine");
+ SQGSEngine.PreRegister(engine);
+ SQGSEngine.AddConstructor<void (ScriptEngine::*)(), 1>(engine, "x");
+
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsValidEngine, "IsValidEngine", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsBuildable, "IsBuildable", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetName, "GetName", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCargoType, "GetCargoType", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRefitCargo, "CanRefitCargo", 3, ".ii");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanPullCargo, "CanPullCargo", 3, ".ii");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetCapacity, "GetCapacity", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetReliability, "GetReliability", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPrice, "GetPrice", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxAge, "GetMaxAge", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRunningCost, "GetRunningCost", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPower, "GetPower", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetWeight, "GetWeight", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaxTractiveEffort, "GetMaxTractiveEffort", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetDesignDate, "GetDesignDate", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetVehicleType, "GetVehicleType", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsWagon, "IsWagon", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::CanRunOnRail, "CanRunOnRail", 3, ".ii");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::HasPowerOnRail, "HasPowerOnRail", 3, ".ii");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRoadType, "GetRoadType", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetRailType, "GetRailType", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::IsArticulated, "IsArticulated", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetPlaneType, "GetPlaneType", 2, ".i");
+ SQGSEngine.DefSQStaticMethod(engine, &ScriptEngine::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i");
+
+ SQGSEngine.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_enginelist.hpp.sq b/src/script/api/game/game_enginelist.hpp.sq
new file mode 100644
index 000000000..1f052b833
--- /dev/null
+++ b/src/script/api/game/game_enginelist.hpp.sq
@@ -0,0 +1,25 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_enginelist.hpp"
+#include "../template/template_enginelist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptEngineList, ST_GS>() { return "GSEngineList"; }
+
+void SQGSEngineList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptEngineList, ST_GS> SQGSEngineList("GSEngineList");
+ SQGSEngineList.PreRegister(engine, "GSList");
+ SQGSEngineList.AddConstructor<void (ScriptEngineList::*)(ScriptVehicle::VehicleType vehicle_type), 2>(engine, "xi");
+
+ SQGSEngineList.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_rail.hpp.sq b/src/script/api/game/game_rail.hpp.sq
new file mode 100644
index 000000000..ea900f448
--- /dev/null
+++ b/src/script/api/game/game_rail.hpp.sq
@@ -0,0 +1,84 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_rail.hpp"
+#include "../template/template_rail.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptRail, ST_GS>() { return "GSRail"; }
+
+void SQGSRail_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptRail, ST_GS> SQGSRail("GSRail");
+ SQGSRail.PreRegister(engine);
+ SQGSRail.AddConstructor<void (ScriptRail::*)(), 1>(engine, "x");
+
+ SQGSRail.DefSQConst(engine, ScriptRail::ERR_RAIL_BASE, "ERR_RAIL_BASE");
+ SQGSRail.DefSQConst(engine, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
+ SQGSRail.DefSQConst(engine, ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
+ SQGSRail.DefSQConst(engine, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTYPE_INVALID, "RAILTYPE_INVALID");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SW, "RAILTRACK_NE_SW");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SE, "RAILTRACK_NW_SE");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_NE, "RAILTRACK_NW_NE");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_SW_SE, "RAILTRACK_SW_SE");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NW_SW, "RAILTRACK_NW_SW");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_NE_SE, "RAILTRACK_NE_SE");
+ SQGSRail.DefSQConst(engine, ScriptRail::RAILTRACK_INVALID, "RAILTRACK_INVALID");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL, "SIGNALTYPE_NORMAL");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY, "SIGNALTYPE_ENTRY");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT, "SIGNALTYPE_EXIT");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO, "SIGNALTYPE_COMBO");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS, "SIGNALTYPE_PBS");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_PBS_ONEWAY, "SIGNALTYPE_PBS_ONEWAY");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_TWOWAY, "SIGNALTYPE_TWOWAY");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NORMAL_TWOWAY, "SIGNALTYPE_NORMAL_TWOWAY");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_ENTRY_TWOWAY, "SIGNALTYPE_ENTRY_TWOWAY");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_EXIT_TWOWAY, "SIGNALTYPE_EXIT_TWOWAY");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_COMBO_TWOWAY, "SIGNALTYPE_COMBO_TWOWAY");
+ SQGSRail.DefSQConst(engine, ScriptRail::SIGNALTYPE_NONE, "SIGNALTYPE_NONE");
+ SQGSRail.DefSQConst(engine, ScriptRail::BT_TRACK, "BT_TRACK");
+ SQGSRail.DefSQConst(engine, ScriptRail::BT_SIGNAL, "BT_SIGNAL");
+ SQGSRail.DefSQConst(engine, ScriptRail::BT_DEPOT, "BT_DEPOT");
+ SQGSRail.DefSQConst(engine, ScriptRail::BT_STATION, "BT_STATION");
+ SQGSRail.DefSQConst(engine, ScriptRail::BT_WAYPOINT, "BT_WAYPOINT");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_ON_ONEWAY_ROAD, ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD);
+ ScriptError::RegisterErrorMap(STR_ERROR_NO_SUITABLE_RAILROAD_TRACK, ScriptRail::ERR_UNSUITABLE_TRACK);
+ ScriptError::RegisterErrorMap(STR_ERROR_CROSSING_DISALLOWED, ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING);
+
+ ScriptError::RegisterErrorMapString(ScriptRail::ERR_CROSSING_ON_ONEWAY_ROAD, "ERR_CROSSING_ON_ONEWAY_ROAD");
+ ScriptError::RegisterErrorMapString(ScriptRail::ERR_UNSUITABLE_TRACK, "ERR_UNSUITABLE_TRACK");
+ ScriptError::RegisterErrorMapString(ScriptRail::ERR_RAILTYPE_DISALLOWS_CROSSING, "ERR_RAILTYPE_DISALLOWS_CROSSING");
+
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetName, "GetName", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTile, "IsRailTile", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsLevelCrossingTile, "IsLevelCrossingTile", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailDepotTile, "IsRailDepotTile", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailStationTile, "IsRailStationTile", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailWaypointTile, "IsRailWaypointTile", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::IsRailTypeAvailable, "IsRailTypeAvailable", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetCurrentRailType, "GetCurrentRailType", 1, ".");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::SetCurrentRailType, "SetCurrentRailType", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::TrainCanRunOnRail, "TrainCanRunOnRail", 3, ".ii");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::TrainHasPowerOnRail, "TrainHasPowerOnRail", 3, ".ii");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailType, "GetRailType", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailDepotFrontTile, "GetRailDepotFrontTile", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailStationDirection, "GetRailStationDirection", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetRailTracks, "GetRailTracks", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::AreTilesConnected, "AreTilesConnected", 4, ".iii");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetSignalType, "GetSignalType", 3, ".ii");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetBuildCost, "GetBuildCost", 3, ".ii");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetMaxSpeed, "GetMaxSpeed", 2, ".i");
+ SQGSRail.DefSQStaticMethod(engine, &ScriptRail::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
+
+ SQGSRail.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_railtypelist.hpp.sq b/src/script/api/game/game_railtypelist.hpp.sq
new file mode 100644
index 000000000..caa036aca
--- /dev/null
+++ b/src/script/api/game/game_railtypelist.hpp.sq
@@ -0,0 +1,25 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_railtypelist.hpp"
+#include "../template/template_railtypelist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptRailTypeList, ST_GS>() { return "GSRailTypeList"; }
+
+void SQGSRailTypeList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptRailTypeList, ST_GS> SQGSRailTypeList("GSRailTypeList");
+ SQGSRailTypeList.PreRegister(engine, "GSList");
+ SQGSRailTypeList.AddConstructor<void (ScriptRailTypeList::*)(), 1>(engine, "x");
+
+ SQGSRailTypeList.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_station.hpp.sq b/src/script/api/game/game_station.hpp.sq
new file mode 100644
index 000000000..5aa696794
--- /dev/null
+++ b/src/script/api/game/game_station.hpp.sq
@@ -0,0 +1,61 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_station.hpp"
+#include "../template/template_station.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptStation, ST_GS>() { return "GSStation"; }
+
+void SQGSStation_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptStation, ST_GS> SQGSStation("GSStation");
+ SQGSStation.PreRegister(engine, "GSBaseStation");
+ SQGSStation.AddConstructor<void (ScriptStation::*)(), 1>(engine, "x");
+
+ SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_BASE, "ERR_STATION_BASE");
+ SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION");
+ SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS");
+ SQGSStation.DefSQConst(engine, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN");
+ SQGSStation.DefSQConst(engine, ScriptStation::STATION_TRAIN, "STATION_TRAIN");
+ SQGSStation.DefSQConst(engine, ScriptStation::STATION_TRUCK_STOP, "STATION_TRUCK_STOP");
+ SQGSStation.DefSQConst(engine, ScriptStation::STATION_BUS_STOP, "STATION_BUS_STOP");
+ SQGSStation.DefSQConst(engine, ScriptStation::STATION_AIRPORT, "STATION_AIRPORT");
+ SQGSStation.DefSQConst(engine, ScriptStation::STATION_DOCK, "STATION_DOCK");
+ SQGSStation.DefSQConst(engine, ScriptStation::STATION_ANY, "STATION_ANY");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION);
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION);
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK, ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION);
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_STATIONS_LOADING, ScriptStation::ERR_STATION_TOO_MANY_STATIONS);
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_TRUCK_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS);
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_BUS_STOPS, ScriptStation::ERR_STATION_TOO_MANY_STATIONS);
+ ScriptError::RegisterErrorMap(STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT, ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN);
+
+ ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION, "ERR_STATION_TOO_CLOSE_TO_ANOTHER_STATION");
+ ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS, "ERR_STATION_TOO_MANY_STATIONS");
+ ScriptError::RegisterErrorMapString(ScriptStation::ERR_STATION_TOO_MANY_STATIONS_IN_TOWN, "ERR_STATION_TOO_MANY_STATIONS_IN_TOWN");
+
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::IsValidStation, "IsValidStation", 2, ".i");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetStationID, "GetStationID", 2, ".i");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoWaiting, "GetCargoWaiting", 3, ".ii");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCargoRating, "GetCargoRating", 3, ".ii");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetCoverageRadius, "GetCoverageRadius", 2, ".i");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetStationCoverageRadius, "GetStationCoverageRadius", 2, ".i");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::HasStationType, "HasStationType", 3, ".ii");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::HasRoadType, "HasRoadType", 3, ".ii");
+ SQGSStation.DefSQStaticMethod(engine, &ScriptStation::GetNearestTown, "GetNearestTown", 2, ".i");
+
+ SQGSStation.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_stationlist.hpp.sq b/src/script/api/game/game_stationlist.hpp.sq
new file mode 100644
index 000000000..65138964f
--- /dev/null
+++ b/src/script/api/game/game_stationlist.hpp.sq
@@ -0,0 +1,37 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_stationlist.hpp"
+#include "../template/template_stationlist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptStationList, ST_GS>() { return "GSStationList"; }
+
+void SQGSStationList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptStationList, ST_GS> SQGSStationList("GSStationList");
+ SQGSStationList.PreRegister(engine, "GSList");
+ SQGSStationList.AddConstructor<void (ScriptStationList::*)(ScriptStation::StationType station_type), 2>(engine, "xi");
+
+ SQGSStationList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptStationList_Vehicle, ST_GS>() { return "GSStationList_Vehicle"; }
+
+void SQGSStationList_Vehicle_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptStationList_Vehicle, ST_GS> SQGSStationList_Vehicle("GSStationList_Vehicle");
+ SQGSStationList_Vehicle.PreRegister(engine, "GSList");
+ SQGSStationList_Vehicle.AddConstructor<void (ScriptStationList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi");
+
+ SQGSStationList_Vehicle.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_subsidy.hpp.sq b/src/script/api/game/game_subsidy.hpp.sq
new file mode 100644
index 000000000..bba8abce5
--- /dev/null
+++ b/src/script/api/game/game_subsidy.hpp.sq
@@ -0,0 +1,39 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_subsidy.hpp"
+#include "../template/template_subsidy.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptSubsidy, ST_GS>() { return "GSSubsidy"; }
+
+void SQGSSubsidy_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptSubsidy, ST_GS> SQGSSubsidy("GSSubsidy");
+ SQGSSubsidy.PreRegister(engine);
+ SQGSSubsidy.AddConstructor<void (ScriptSubsidy::*)(), 1>(engine, "x");
+
+ SQGSSubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INDUSTRY, "SPT_INDUSTRY");
+ SQGSSubsidy.DefSQConst(engine, ScriptSubsidy::SPT_TOWN, "SPT_TOWN");
+ SQGSSubsidy.DefSQConst(engine, ScriptSubsidy::SPT_INVALID, "SPT_INVALID");
+
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsValidSubsidy, "IsValidSubsidy", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::IsAwarded, "IsAwarded", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetAwardedTo, "GetAwardedTo", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetExpireDate, "GetExpireDate", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetCargoType, "GetCargoType", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceType, "GetSourceType", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetSourceIndex, "GetSourceIndex", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationType, "GetDestinationType", 2, ".i");
+ SQGSSubsidy.DefSQStaticMethod(engine, &ScriptSubsidy::GetDestinationIndex, "GetDestinationIndex", 2, ".i");
+
+ SQGSSubsidy.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_subsidylist.hpp.sq b/src/script/api/game/game_subsidylist.hpp.sq
new file mode 100644
index 000000000..73dcbd411
--- /dev/null
+++ b/src/script/api/game/game_subsidylist.hpp.sq
@@ -0,0 +1,25 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_subsidylist.hpp"
+#include "../template/template_subsidylist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptSubsidyList, ST_GS>() { return "GSSubsidyList"; }
+
+void SQGSSubsidyList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptSubsidyList, ST_GS> SQGSSubsidyList("GSSubsidyList");
+ SQGSSubsidyList.PreRegister(engine, "GSList");
+ SQGSSubsidyList.AddConstructor<void (ScriptSubsidyList::*)(), 1>(engine, "x");
+
+ SQGSSubsidyList.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_tilelist.hpp.sq b/src/script/api/game/game_tilelist.hpp.sq
new file mode 100644
index 000000000..a4ade9cc5
--- /dev/null
+++ b/src/script/api/game/game_tilelist.hpp.sq
@@ -0,0 +1,66 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_tilelist.hpp"
+#include "../template/template_tilelist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptTileList, ST_GS>() { return "GSTileList"; }
+
+void SQGSTileList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTileList, ST_GS> SQGSTileList("GSTileList");
+ SQGSTileList.PreRegister(engine, "GSList");
+ SQGSTileList.AddConstructor<void (ScriptTileList::*)(), 1>(engine, "x");
+
+ SQGSTileList.DefSQMethod(engine, &ScriptTileList::AddRectangle, "AddRectangle", 3, "xii");
+ SQGSTileList.DefSQMethod(engine, &ScriptTileList::AddTile, "AddTile", 2, "xi");
+ SQGSTileList.DefSQMethod(engine, &ScriptTileList::RemoveRectangle, "RemoveRectangle", 3, "xii");
+ SQGSTileList.DefSQMethod(engine, &ScriptTileList::RemoveTile, "RemoveTile", 2, "xi");
+
+ SQGSTileList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptTileList_IndustryAccepting, ST_GS>() { return "GSTileList_IndustryAccepting"; }
+
+void SQGSTileList_IndustryAccepting_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTileList_IndustryAccepting, ST_GS> SQGSTileList_IndustryAccepting("GSTileList_IndustryAccepting");
+ SQGSTileList_IndustryAccepting.PreRegister(engine, "GSTileList");
+ SQGSTileList_IndustryAccepting.AddConstructor<void (ScriptTileList_IndustryAccepting::*)(IndustryID industry_id, int radius), 3>(engine, "xii");
+
+ SQGSTileList_IndustryAccepting.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptTileList_IndustryProducing, ST_GS>() { return "GSTileList_IndustryProducing"; }
+
+void SQGSTileList_IndustryProducing_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTileList_IndustryProducing, ST_GS> SQGSTileList_IndustryProducing("GSTileList_IndustryProducing");
+ SQGSTileList_IndustryProducing.PreRegister(engine, "GSTileList");
+ SQGSTileList_IndustryProducing.AddConstructor<void (ScriptTileList_IndustryProducing::*)(IndustryID industry_id, int radius), 3>(engine, "xii");
+
+ SQGSTileList_IndustryProducing.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptTileList_StationType, ST_GS>() { return "GSTileList_StationType"; }
+
+void SQGSTileList_StationType_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTileList_StationType, ST_GS> SQGSTileList_StationType("GSTileList_StationType");
+ SQGSTileList_StationType.PreRegister(engine, "GSTileList");
+ SQGSTileList_StationType.AddConstructor<void (ScriptTileList_StationType::*)(StationID station_id, ScriptStation::StationType station_type), 3>(engine, "xii");
+
+ SQGSTileList_StationType.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_tunnel.hpp.sq b/src/script/api/game/game_tunnel.hpp.sq
new file mode 100644
index 000000000..49a6311de
--- /dev/null
+++ b/src/script/api/game/game_tunnel.hpp.sq
@@ -0,0 +1,44 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_tunnel.hpp"
+#include "../template/template_tunnel.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptTunnel, ST_GS>() { return "GSTunnel"; }
+
+void SQGSTunnel_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTunnel, ST_GS> SQGSTunnel("GSTunnel");
+ SQGSTunnel.PreRegister(engine);
+ SQGSTunnel.AddConstructor<void (ScriptTunnel::*)(), 1>(engine, "x");
+
+ SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_BASE, "ERR_TUNNEL_BASE");
+ SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER");
+ SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE");
+ SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY");
+ SQGSTunnel.DefSQConst(engine, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUILD_ON_WATER, ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER);
+ ScriptError::RegisterErrorMap(STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL, ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE);
+ ScriptError::RegisterErrorMap(STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY, ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY);
+ ScriptError::RegisterErrorMap(STR_ERROR_UNABLE_TO_EXCAVATE_LAND, ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE);
+
+ ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER, "ERR_TUNNEL_CANNOT_BUILD_ON_WATER");
+ ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_START_SITE_UNSUITABLE, "ERR_TUNNEL_START_SITE_UNSUITABLE");
+ ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY, "ERR_TUNNEL_ANOTHER_TUNNEL_IN_THE_WAY");
+ ScriptError::RegisterErrorMapString(ScriptTunnel::ERR_TUNNEL_END_SITE_UNSUITABLE, "ERR_TUNNEL_END_SITE_UNSUITABLE");
+
+ SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::IsTunnelTile, "IsTunnelTile", 2, ".i");
+ SQGSTunnel.DefSQStaticMethod(engine, &ScriptTunnel::GetOtherTunnelEnd, "GetOtherTunnelEnd", 2, ".i");
+
+ SQGSTunnel.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_vehiclelist.hpp.sq b/src/script/api/game/game_vehiclelist.hpp.sq
new file mode 100644
index 000000000..c5c6a18a7
--- /dev/null
+++ b/src/script/api/game/game_vehiclelist.hpp.sq
@@ -0,0 +1,61 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_vehiclelist.hpp"
+#include "../template/template_vehiclelist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptVehicleList, ST_GS>() { return "GSVehicleList"; }
+
+void SQGSVehicleList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptVehicleList, ST_GS> SQGSVehicleList("GSVehicleList");
+ SQGSVehicleList.PreRegister(engine, "GSList");
+ SQGSVehicleList.AddConstructor<void (ScriptVehicleList::*)(), 1>(engine, "x");
+
+ SQGSVehicleList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptVehicleList_Station, ST_GS>() { return "GSVehicleList_Station"; }
+
+void SQGSVehicleList_Station_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptVehicleList_Station, ST_GS> SQGSVehicleList_Station("GSVehicleList_Station");
+ SQGSVehicleList_Station.PreRegister(engine, "GSList");
+ SQGSVehicleList_Station.AddConstructor<void (ScriptVehicleList_Station::*)(StationID station_id), 2>(engine, "xi");
+
+ SQGSVehicleList_Station.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptVehicleList_Depot, ST_GS>() { return "GSVehicleList_Depot"; }
+
+void SQGSVehicleList_Depot_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptVehicleList_Depot, ST_GS> SQGSVehicleList_Depot("GSVehicleList_Depot");
+ SQGSVehicleList_Depot.PreRegister(engine, "GSList");
+ SQGSVehicleList_Depot.AddConstructor<void (ScriptVehicleList_Depot::*)(TileIndex tile), 2>(engine, "xi");
+
+ SQGSVehicleList_Depot.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptVehicleList_SharedOrders, ST_GS>() { return "GSVehicleList_SharedOrders"; }
+
+void SQGSVehicleList_SharedOrders_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptVehicleList_SharedOrders, ST_GS> SQGSVehicleList_SharedOrders("GSVehicleList_SharedOrders");
+ SQGSVehicleList_SharedOrders.PreRegister(engine, "GSList");
+ SQGSVehicleList_SharedOrders.AddConstructor<void (ScriptVehicleList_SharedOrders::*)(VehicleID vehicle_id), 2>(engine, "xi");
+
+ SQGSVehicleList_SharedOrders.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_waypoint.hpp.sq b/src/script/api/game/game_waypoint.hpp.sq
new file mode 100644
index 000000000..984e1fa2f
--- /dev/null
+++ b/src/script/api/game/game_waypoint.hpp.sq
@@ -0,0 +1,42 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_waypoint.hpp"
+#include "../template/template_waypoint.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptWaypoint, ST_GS>() { return "GSWaypoint"; }
+
+void SQGSWaypoint_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptWaypoint, ST_GS> SQGSWaypoint("GSWaypoint");
+ SQGSWaypoint.PreRegister(engine, "GSBaseStation");
+ SQGSWaypoint.AddConstructor<void (ScriptWaypoint::*)(), 1>(engine, "x");
+
+ SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_BASE, "ERR_WAYPOINT_BASE");
+ SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT");
+ SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS");
+ SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_RAIL, "WAYPOINT_RAIL");
+ SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_BUOY, "WAYPOINT_BUOY");
+ SQGSWaypoint.DefSQConst(engine, ScriptWaypoint::WAYPOINT_ANY, "WAYPOINT_ANY");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT, ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT);
+ ScriptError::RegisterErrorMap(STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING, ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS);
+
+ ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT, "ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT");
+ ScriptError::RegisterErrorMapString(ScriptWaypoint::ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS, "ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS");
+
+ SQGSWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::IsValidWaypoint, "IsValidWaypoint", 2, ".i");
+ SQGSWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::GetWaypointID, "GetWaypointID", 2, ".i");
+ SQGSWaypoint.DefSQStaticMethod(engine, &ScriptWaypoint::HasWaypointType, "HasWaypointType", 3, ".ii");
+
+ SQGSWaypoint.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_waypointlist.hpp.sq b/src/script/api/game/game_waypointlist.hpp.sq
new file mode 100644
index 000000000..ccb428ce6
--- /dev/null
+++ b/src/script/api/game/game_waypointlist.hpp.sq
@@ -0,0 +1,37 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
+ * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_waypointlist.hpp"
+#include "../template/template_waypointlist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptWaypointList, ST_GS>() { return "GSWaypointList"; }
+
+void SQGSWaypointList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptWaypointList, ST_GS> SQGSWaypointList("GSWaypointList");
+ SQGSWaypointList.PreRegister(engine, "GSList");
+ SQGSWaypointList.AddConstructor<void (ScriptWaypointList::*)(ScriptWaypoint::WaypointType waypoint_type), 2>(engine, "xi");
+
+ SQGSWaypointList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptWaypointList_Vehicle, ST_GS>() { return "GSWaypointList_Vehicle"; }
+
+void SQGSWaypointList_Vehicle_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptWaypointList_Vehicle, ST_GS> SQGSWaypointList_Vehicle("GSWaypointList_Vehicle");
+ SQGSWaypointList_Vehicle.PreRegister(engine, "GSList");
+ SQGSWaypointList_Vehicle.AddConstructor<void (ScriptWaypointList_Vehicle::*)(VehicleID vehicle_id), 2>(engine, "xi");
+
+ SQGSWaypointList_Vehicle.PostRegister(engine);
+}