From 9359c6fc47f6fabddc399d044ea74dc6ebfdfb05 Mon Sep 17 00:00:00 2001 From: truebrain Date: Mon, 19 Dec 2011 20:57:34 +0000 Subject: (svn r23615) -Add: more API functions exposed to NoGo (part 2) --- src/script/api/game/game_basestation.hpp.sq | 34 +++++++++++ src/script/api/game/game_bridge.hpp.sq | 48 ++++++++++++++++ src/script/api/game/game_bridgelist.hpp.sq | 37 ++++++++++++ src/script/api/game/game_cargolist.hpp.sq | 61 ++++++++++++++++++++ src/script/api/game/game_depotlist.hpp.sq | 25 +++++++++ src/script/api/game/game_engine.hpp.sq | 51 +++++++++++++++++ src/script/api/game/game_enginelist.hpp.sq | 25 +++++++++ src/script/api/game/game_rail.hpp.sq | 84 ++++++++++++++++++++++++++++ src/script/api/game/game_railtypelist.hpp.sq | 25 +++++++++ src/script/api/game/game_station.hpp.sq | 61 ++++++++++++++++++++ src/script/api/game/game_stationlist.hpp.sq | 37 ++++++++++++ src/script/api/game/game_subsidy.hpp.sq | 39 +++++++++++++ src/script/api/game/game_subsidylist.hpp.sq | 25 +++++++++ src/script/api/game/game_tilelist.hpp.sq | 66 ++++++++++++++++++++++ src/script/api/game/game_tunnel.hpp.sq | 44 +++++++++++++++ src/script/api/game/game_vehiclelist.hpp.sq | 61 ++++++++++++++++++++ src/script/api/game/game_waypoint.hpp.sq | 42 ++++++++++++++ src/script/api/game/game_waypointlist.hpp.sq | 37 ++++++++++++ 18 files changed, 802 insertions(+) create mode 100644 src/script/api/game/game_basestation.hpp.sq create mode 100644 src/script/api/game/game_bridge.hpp.sq create mode 100644 src/script/api/game/game_bridgelist.hpp.sq create mode 100644 src/script/api/game/game_cargolist.hpp.sq create mode 100644 src/script/api/game/game_depotlist.hpp.sq create mode 100644 src/script/api/game/game_engine.hpp.sq create mode 100644 src/script/api/game/game_enginelist.hpp.sq create mode 100644 src/script/api/game/game_rail.hpp.sq create mode 100644 src/script/api/game/game_railtypelist.hpp.sq create mode 100644 src/script/api/game/game_station.hpp.sq create mode 100644 src/script/api/game/game_stationlist.hpp.sq create mode 100644 src/script/api/game/game_subsidy.hpp.sq create mode 100644 src/script/api/game/game_subsidylist.hpp.sq create mode 100644 src/script/api/game/game_tilelist.hpp.sq create mode 100644 src/script/api/game/game_tunnel.hpp.sq create mode 100644 src/script/api/game/game_vehiclelist.hpp.sq create mode 100644 src/script/api/game/game_waypoint.hpp.sq create mode 100644 src/script/api/game/game_waypointlist.hpp.sq (limited to 'src/script/api/game') 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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_basestation.hpp" +#include "../template/template_basestation.hpp.sq" + + +template <> const char *GetClassName() { return "GSBaseStation"; } + +void SQGSBaseStation_Register(Squirrel *engine) +{ + DefSQClass SQGSBaseStation("GSBaseStation"); + SQGSBaseStation.PreRegister(engine); + SQGSBaseStation.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_bridge.hpp" +#include "../template/template_bridge.hpp.sq" + + +template <> const char *GetClassName() { return "GSBridge"; } + +void SQGSBridge_Register(Squirrel *engine) +{ + DefSQClass SQGSBridge("GSBridge"); + SQGSBridge.PreRegister(engine); + SQGSBridge.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_bridgelist.hpp" +#include "../template/template_bridgelist.hpp.sq" + + +template <> const char *GetClassName() { return "GSBridgeList"; } + +void SQGSBridgeList_Register(Squirrel *engine) +{ + DefSQClass SQGSBridgeList("GSBridgeList"); + SQGSBridgeList.PreRegister(engine, "GSList"); + SQGSBridgeList.AddConstructor(engine, "x"); + + SQGSBridgeList.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSBridgeList_Length"; } + +void SQGSBridgeList_Length_Register(Squirrel *engine) +{ + DefSQClass SQGSBridgeList_Length("GSBridgeList_Length"); + SQGSBridgeList_Length.PreRegister(engine, "GSList"); + SQGSBridgeList_Length.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_cargolist.hpp" +#include "../template/template_cargolist.hpp.sq" + + +template <> const char *GetClassName() { return "GSCargoList"; } + +void SQGSCargoList_Register(Squirrel *engine) +{ + DefSQClass SQGSCargoList("GSCargoList"); + SQGSCargoList.PreRegister(engine, "GSList"); + SQGSCargoList.AddConstructor(engine, "x"); + + SQGSCargoList.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSCargoList_IndustryAccepting"; } + +void SQGSCargoList_IndustryAccepting_Register(Squirrel *engine) +{ + DefSQClass SQGSCargoList_IndustryAccepting("GSCargoList_IndustryAccepting"); + SQGSCargoList_IndustryAccepting.PreRegister(engine, "GSList"); + SQGSCargoList_IndustryAccepting.AddConstructor(engine, "xi"); + + SQGSCargoList_IndustryAccepting.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSCargoList_IndustryProducing"; } + +void SQGSCargoList_IndustryProducing_Register(Squirrel *engine) +{ + DefSQClass SQGSCargoList_IndustryProducing("GSCargoList_IndustryProducing"); + SQGSCargoList_IndustryProducing.PreRegister(engine, "GSList"); + SQGSCargoList_IndustryProducing.AddConstructor(engine, "xi"); + + SQGSCargoList_IndustryProducing.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSCargoList_StationAccepting"; } + +void SQGSCargoList_StationAccepting_Register(Squirrel *engine) +{ + DefSQClass SQGSCargoList_StationAccepting("GSCargoList_StationAccepting"); + SQGSCargoList_StationAccepting.PreRegister(engine, "GSList"); + SQGSCargoList_StationAccepting.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_depotlist.hpp" +#include "../template/template_depotlist.hpp.sq" + + +template <> const char *GetClassName() { return "GSDepotList"; } + +void SQGSDepotList_Register(Squirrel *engine) +{ + DefSQClass SQGSDepotList("GSDepotList"); + SQGSDepotList.PreRegister(engine, "GSList"); + SQGSDepotList.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_engine.hpp" +#include "../template/template_engine.hpp.sq" + + +template <> const char *GetClassName() { return "GSEngine"; } + +void SQGSEngine_Register(Squirrel *engine) +{ + DefSQClass SQGSEngine("GSEngine"); + SQGSEngine.PreRegister(engine); + SQGSEngine.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_enginelist.hpp" +#include "../template/template_enginelist.hpp.sq" + + +template <> const char *GetClassName() { return "GSEngineList"; } + +void SQGSEngineList_Register(Squirrel *engine) +{ + DefSQClass SQGSEngineList("GSEngineList"); + SQGSEngineList.PreRegister(engine, "GSList"); + SQGSEngineList.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_rail.hpp" +#include "../template/template_rail.hpp.sq" + + +template <> const char *GetClassName() { return "GSRail"; } + +void SQGSRail_Register(Squirrel *engine) +{ + DefSQClass SQGSRail("GSRail"); + SQGSRail.PreRegister(engine); + SQGSRail.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_railtypelist.hpp" +#include "../template/template_railtypelist.hpp.sq" + + +template <> const char *GetClassName() { return "GSRailTypeList"; } + +void SQGSRailTypeList_Register(Squirrel *engine) +{ + DefSQClass SQGSRailTypeList("GSRailTypeList"); + SQGSRailTypeList.PreRegister(engine, "GSList"); + SQGSRailTypeList.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_station.hpp" +#include "../template/template_station.hpp.sq" + + +template <> const char *GetClassName() { return "GSStation"; } + +void SQGSStation_Register(Squirrel *engine) +{ + DefSQClass SQGSStation("GSStation"); + SQGSStation.PreRegister(engine, "GSBaseStation"); + SQGSStation.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_stationlist.hpp" +#include "../template/template_stationlist.hpp.sq" + + +template <> const char *GetClassName() { return "GSStationList"; } + +void SQGSStationList_Register(Squirrel *engine) +{ + DefSQClass SQGSStationList("GSStationList"); + SQGSStationList.PreRegister(engine, "GSList"); + SQGSStationList.AddConstructor(engine, "xi"); + + SQGSStationList.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSStationList_Vehicle"; } + +void SQGSStationList_Vehicle_Register(Squirrel *engine) +{ + DefSQClass SQGSStationList_Vehicle("GSStationList_Vehicle"); + SQGSStationList_Vehicle.PreRegister(engine, "GSList"); + SQGSStationList_Vehicle.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_subsidy.hpp" +#include "../template/template_subsidy.hpp.sq" + + +template <> const char *GetClassName() { return "GSSubsidy"; } + +void SQGSSubsidy_Register(Squirrel *engine) +{ + DefSQClass SQGSSubsidy("GSSubsidy"); + SQGSSubsidy.PreRegister(engine); + SQGSSubsidy.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_subsidylist.hpp" +#include "../template/template_subsidylist.hpp.sq" + + +template <> const char *GetClassName() { return "GSSubsidyList"; } + +void SQGSSubsidyList_Register(Squirrel *engine) +{ + DefSQClass SQGSSubsidyList("GSSubsidyList"); + SQGSSubsidyList.PreRegister(engine, "GSList"); + SQGSSubsidyList.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_tilelist.hpp" +#include "../template/template_tilelist.hpp.sq" + + +template <> const char *GetClassName() { return "GSTileList"; } + +void SQGSTileList_Register(Squirrel *engine) +{ + DefSQClass SQGSTileList("GSTileList"); + SQGSTileList.PreRegister(engine, "GSList"); + SQGSTileList.AddConstructor(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() { return "GSTileList_IndustryAccepting"; } + +void SQGSTileList_IndustryAccepting_Register(Squirrel *engine) +{ + DefSQClass SQGSTileList_IndustryAccepting("GSTileList_IndustryAccepting"); + SQGSTileList_IndustryAccepting.PreRegister(engine, "GSTileList"); + SQGSTileList_IndustryAccepting.AddConstructor(engine, "xii"); + + SQGSTileList_IndustryAccepting.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSTileList_IndustryProducing"; } + +void SQGSTileList_IndustryProducing_Register(Squirrel *engine) +{ + DefSQClass SQGSTileList_IndustryProducing("GSTileList_IndustryProducing"); + SQGSTileList_IndustryProducing.PreRegister(engine, "GSTileList"); + SQGSTileList_IndustryProducing.AddConstructor(engine, "xii"); + + SQGSTileList_IndustryProducing.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSTileList_StationType"; } + +void SQGSTileList_StationType_Register(Squirrel *engine) +{ + DefSQClass SQGSTileList_StationType("GSTileList_StationType"); + SQGSTileList_StationType.PreRegister(engine, "GSTileList"); + SQGSTileList_StationType.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_tunnel.hpp" +#include "../template/template_tunnel.hpp.sq" + + +template <> const char *GetClassName() { return "GSTunnel"; } + +void SQGSTunnel_Register(Squirrel *engine) +{ + DefSQClass SQGSTunnel("GSTunnel"); + SQGSTunnel.PreRegister(engine); + SQGSTunnel.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_vehiclelist.hpp" +#include "../template/template_vehiclelist.hpp.sq" + + +template <> const char *GetClassName() { return "GSVehicleList"; } + +void SQGSVehicleList_Register(Squirrel *engine) +{ + DefSQClass SQGSVehicleList("GSVehicleList"); + SQGSVehicleList.PreRegister(engine, "GSList"); + SQGSVehicleList.AddConstructor(engine, "x"); + + SQGSVehicleList.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSVehicleList_Station"; } + +void SQGSVehicleList_Station_Register(Squirrel *engine) +{ + DefSQClass SQGSVehicleList_Station("GSVehicleList_Station"); + SQGSVehicleList_Station.PreRegister(engine, "GSList"); + SQGSVehicleList_Station.AddConstructor(engine, "xi"); + + SQGSVehicleList_Station.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSVehicleList_Depot"; } + +void SQGSVehicleList_Depot_Register(Squirrel *engine) +{ + DefSQClass SQGSVehicleList_Depot("GSVehicleList_Depot"); + SQGSVehicleList_Depot.PreRegister(engine, "GSList"); + SQGSVehicleList_Depot.AddConstructor(engine, "xi"); + + SQGSVehicleList_Depot.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSVehicleList_SharedOrders"; } + +void SQGSVehicleList_SharedOrders_Register(Squirrel *engine) +{ + DefSQClass SQGSVehicleList_SharedOrders("GSVehicleList_SharedOrders"); + SQGSVehicleList_SharedOrders.PreRegister(engine, "GSList"); + SQGSVehicleList_SharedOrders.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_waypoint.hpp" +#include "../template/template_waypoint.hpp.sq" + + +template <> const char *GetClassName() { return "GSWaypoint"; } + +void SQGSWaypoint_Register(Squirrel *engine) +{ + DefSQClass SQGSWaypoint("GSWaypoint"); + SQGSWaypoint.PreRegister(engine, "GSBaseStation"); + SQGSWaypoint.AddConstructor(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 . + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_waypointlist.hpp" +#include "../template/template_waypointlist.hpp.sq" + + +template <> const char *GetClassName() { return "GSWaypointList"; } + +void SQGSWaypointList_Register(Squirrel *engine) +{ + DefSQClass SQGSWaypointList("GSWaypointList"); + SQGSWaypointList.PreRegister(engine, "GSList"); + SQGSWaypointList.AddConstructor(engine, "xi"); + + SQGSWaypointList.PostRegister(engine); +} + + +template <> const char *GetClassName() { return "GSWaypointList_Vehicle"; } + +void SQGSWaypointList_Vehicle_Register(Squirrel *engine) +{ + DefSQClass SQGSWaypointList_Vehicle("GSWaypointList_Vehicle"); + SQGSWaypointList_Vehicle.PreRegister(engine, "GSList"); + SQGSWaypointList_Vehicle.AddConstructor(engine, "xi"); + + SQGSWaypointList_Vehicle.PostRegister(engine); +} -- cgit v1.2.3-70-g09d2