summaryrefslogtreecommitdiff
path: root/src/script/api/game
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:57:23 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:57:23 +0000
commit436cf09923d881f3c11c8a4b6262c0a89ad1ee73 (patch)
tree8c96fbae532958e5cecfd0370387f26fcb837037 /src/script/api/game
parent1616961ea2c1fa84c41d7df9af535fbb190d2c41 (diff)
downloadopenttd-436cf09923d881f3c11c8a4b6262c0a89ad1ee73.tar.xz
(svn r23614) -Add: more API functions exposed to NoGo (part 1)
Diffstat (limited to 'src/script/api/game')
-rw-r--r--src/script/api/game/game_airport.hpp.sq55
-rw-r--r--src/script/api/game/game_base.hpp.sq32
-rw-r--r--src/script/api/game/game_cargo.hpp.sq52
-rw-r--r--src/script/api/game/game_company.hpp.sq53
-rw-r--r--src/script/api/game/game_date.hpp.sq31
-rw-r--r--src/script/api/game/game_gamesettings.hpp.sq28
-rw-r--r--src/script/api/game/game_industry.hpp.sq49
-rw-r--r--src/script/api/game/game_industrylist.hpp.sq49
-rw-r--r--src/script/api/game/game_industrytype.hpp.sq41
-rw-r--r--src/script/api/game/game_industrytypelist.hpp.sq25
-rw-r--r--src/script/api/game/game_infrastructure.hpp.sq39
-rw-r--r--src/script/api/game/game_map.hpp.sq39
-rw-r--r--src/script/api/game/game_marine.hpp.sq43
-rw-r--r--src/script/api/game/game_road.hpp.sq66
-rw-r--r--src/script/api/game/game_signlist.hpp.sq25
-rw-r--r--src/script/api/game/game_tile.hpp.sq109
-rw-r--r--src/script/api/game/game_town.hpp.sq63
-rw-r--r--src/script/api/game/game_townlist.hpp.sq37
-rw-r--r--src/script/api/game/game_vehicle.hpp.sq134
19 files changed, 970 insertions, 0 deletions
diff --git a/src/script/api/game/game_airport.hpp.sq b/src/script/api/game/game_airport.hpp.sq
new file mode 100644
index 000000000..fe4d993e8
--- /dev/null
+++ b/src/script/api/game/game_airport.hpp.sq
@@ -0,0 +1,55 @@
+/* $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_airport.hpp"
+#include "../template/template_airport.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptAirport, ST_GS>() { return "GSAirport"; }
+
+void SQGSAirport_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptAirport, ST_GS> SQGSAirport("GSAirport");
+ SQGSAirport.PreRegister(engine);
+ SQGSAirport.AddConstructor<void (ScriptAirport::*)(), 1>(engine, "x");
+
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_SMALL, "AT_SMALL");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_LARGE, "AT_LARGE");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_METROPOLITAN, "AT_METROPOLITAN");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INTERNATIONAL, "AT_INTERNATIONAL");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_COMMUTER, "AT_COMMUTER");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INTERCON, "AT_INTERCON");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELIPORT, "AT_HELIPORT");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELISTATION, "AT_HELISTATION");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_HELIDEPOT, "AT_HELIDEPOT");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::AT_INVALID, "AT_INVALID");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::PT_HELICOPTER, "PT_HELICOPTER");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::PT_SMALL_PLANE, "PT_SMALL_PLANE");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::PT_BIG_PLANE, "PT_BIG_PLANE");
+ SQGSAirport.DefSQConst(engine, ScriptAirport::PT_INVALID, "PT_INVALID");
+
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsValidAirportType, "IsValidAirportType", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportInformationAvailable, "IsAirportInformationAvailable", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetPrice, "GetPrice", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsHangarTile, "IsHangarTile", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::IsAirportTile, "IsAirportTile", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportWidth, "GetAirportWidth", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportHeight, "GetAirportHeight", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportCoverageRadius, "GetAirportCoverageRadius", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNumHangars, "GetNumHangars", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetHangarOfAirport, "GetHangarOfAirport", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetAirportType, "GetAirportType", 2, ".i");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNoiseLevelIncrease, "GetNoiseLevelIncrease", 3, ".ii");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetNearestTown, "GetNearestTown", 3, ".ii");
+ SQGSAirport.DefSQStaticMethod(engine, &ScriptAirport::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
+
+ SQGSAirport.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_base.hpp.sq b/src/script/api/game/game_base.hpp.sq
new file mode 100644
index 000000000..0301b0547
--- /dev/null
+++ b/src/script/api/game/game_base.hpp.sq
@@ -0,0 +1,32 @@
+/* $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_base.hpp"
+#include "../template/template_base.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptBase, ST_GS>() { return "GSBase"; }
+
+void SQGSBase_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptBase, ST_GS> SQGSBase("GSBase");
+ SQGSBase.PreRegister(engine);
+ SQGSBase.AddConstructor<void (ScriptBase::*)(), 1>(engine, "x");
+
+ SQGSBase.DefSQStaticMethod(engine, &ScriptBase::Rand, "Rand", 1, ".");
+ SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandItem, "RandItem", 2, ".i");
+ SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandRange, "RandRange", 2, ".i");
+ SQGSBase.DefSQStaticMethod(engine, &ScriptBase::RandRangeItem, "RandRangeItem", 3, ".ii");
+ SQGSBase.DefSQStaticMethod(engine, &ScriptBase::Chance, "Chance", 3, ".ii");
+ SQGSBase.DefSQStaticMethod(engine, &ScriptBase::ChanceItem, "ChanceItem", 4, ".iii");
+
+ SQGSBase.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_cargo.hpp.sq b/src/script/api/game/game_cargo.hpp.sq
new file mode 100644
index 000000000..188c732a8
--- /dev/null
+++ b/src/script/api/game/game_cargo.hpp.sq
@@ -0,0 +1,52 @@
+/* $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_cargo.hpp"
+#include "../template/template_cargo.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptCargo, ST_GS>() { return "GSCargo"; }
+
+void SQGSCargo_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptCargo, ST_GS> SQGSCargo("GSCargo");
+ SQGSCargo.PreRegister(engine);
+ SQGSCargo.AddConstructor<void (ScriptCargo::*)(), 1>(engine, "x");
+
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_PASSENGERS, "CC_PASSENGERS");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_MAIL, "CC_MAIL");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_EXPRESS, "CC_EXPRESS");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_ARMOURED, "CC_ARMOURED");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_BULK, "CC_BULK");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_PIECE_GOODS, "CC_PIECE_GOODS");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_LIQUID, "CC_LIQUID");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_REFRIGERATED, "CC_REFRIGERATED");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_HAZARDOUS, "CC_HAZARDOUS");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CC_COVERED, "CC_COVERED");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::TE_NONE, "TE_NONE");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::TE_PASSENGERS, "TE_PASSENGERS");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::TE_MAIL, "TE_MAIL");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::TE_GOODS, "TE_GOODS");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::TE_WATER, "TE_WATER");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::TE_FOOD, "TE_FOOD");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CT_AUTO_REFIT, "CT_AUTO_REFIT");
+ SQGSCargo.DefSQConst(engine, ScriptCargo::CT_NO_REFIT, "CT_NO_REFIT");
+
+ SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidCargo, "IsValidCargo", 2, ".i");
+ SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsValidTownEffect, "IsValidTownEffect", 2, ".i");
+ SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoLabel, "GetCargoLabel", 2, ".i");
+ SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::IsFreight, "IsFreight", 2, ".i");
+ SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::HasCargoClass, "HasCargoClass", 3, ".ii");
+ SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetTownEffect, "GetTownEffect", 2, ".i");
+ SQGSCargo.DefSQStaticMethod(engine, &ScriptCargo::GetCargoIncome, "GetCargoIncome", 4, ".iii");
+
+ SQGSCargo.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_company.hpp.sq b/src/script/api/game/game_company.hpp.sq
new file mode 100644
index 000000000..957d68355
--- /dev/null
+++ b/src/script/api/game/game_company.hpp.sq
@@ -0,0 +1,53 @@
+/* $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_company.hpp"
+#include "../template/template_company.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptCompany, ST_GS>() { return "GSCompany"; }
+
+void SQGSCompany_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptCompany, ST_GS> SQGSCompany("GSCompany");
+ SQGSCompany.PreRegister(engine);
+ SQGSCompany.AddConstructor<void (ScriptCompany::*)(), 1>(engine, "x");
+
+ SQGSCompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE");
+ SQGSCompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID");
+
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetName, "GetName", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentName, "GetPresidentName", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetPresidentGender, "GetPresidentGender", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanAmount, "GetLoanAmount", 1, ".");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetMaxLoanAmount, "GetMaxLoanAmount", 1, ".");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetLoanInterval, "GetLoanInterval", 1, ".");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetBankBalance, "GetBankBalance", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyIncome, "GetQuarterlyIncome", 3, ".ii");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyExpenses, "GetQuarterlyExpenses", 3, ".ii");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCargoDelivered, "GetQuarterlyCargoDelivered", 3, ".ii");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyPerformanceRating, "GetQuarterlyPerformanceRating", 3, ".ii");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetQuarterlyCompanyValue, "GetQuarterlyCompanyValue", 3, ".ii");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetCompanyHQ, "GetCompanyHQ", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewStatus, "GetAutoRenewStatus", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i");
+ SQGSCompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i");
+
+ SQGSCompany.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_date.hpp.sq b/src/script/api/game/game_date.hpp.sq
new file mode 100644
index 000000000..d78ed624d
--- /dev/null
+++ b/src/script/api/game/game_date.hpp.sq
@@ -0,0 +1,31 @@
+/* $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_date.hpp"
+#include "../template/template_date.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptDate, ST_GS>() { return "GSDate"; }
+
+void SQGSDate_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptDate, ST_GS> SQGSDate("GSDate");
+ SQGSDate.PreRegister(engine);
+ SQGSDate.AddConstructor<void (ScriptDate::*)(), 1>(engine, "x");
+
+ SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetCurrentDate, "GetCurrentDate", 1, ".");
+ SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetYear, "GetYear", 2, ".i");
+ SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetMonth, "GetMonth", 2, ".i");
+ SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetDayOfMonth, "GetDayOfMonth", 2, ".i");
+ SQGSDate.DefSQStaticMethod(engine, &ScriptDate::GetDate, "GetDate", 4, ".iii");
+
+ SQGSDate.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_gamesettings.hpp.sq b/src/script/api/game/game_gamesettings.hpp.sq
new file mode 100644
index 000000000..13e1b06dd
--- /dev/null
+++ b/src/script/api/game/game_gamesettings.hpp.sq
@@ -0,0 +1,28 @@
+/* $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_gamesettings.hpp"
+#include "../template/template_gamesettings.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptGameSettings, ST_GS>() { return "GSGameSettings"; }
+
+void SQGSGameSettings_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptGameSettings, ST_GS> SQGSGameSettings("GSGameSettings");
+ SQGSGameSettings.PreRegister(engine);
+ SQGSGameSettings.AddConstructor<void (ScriptGameSettings::*)(), 1>(engine, "x");
+
+ SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::IsValid, "IsValid", 2, "..");
+ SQGSGameSettings.DefSQStaticMethod(engine, &ScriptGameSettings::GetValue, "GetValue", 2, "..");
+
+ SQGSGameSettings.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_industry.hpp.sq b/src/script/api/game/game_industry.hpp.sq
new file mode 100644
index 000000000..5d50c90fa
--- /dev/null
+++ b/src/script/api/game/game_industry.hpp.sq
@@ -0,0 +1,49 @@
+/* $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_industry.hpp"
+#include "../template/template_industry.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptIndustry, ST_GS>() { return "GSIndustry"; }
+
+void SQGSIndustry_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptIndustry, ST_GS> SQGSIndustry("GSIndustry");
+ SQGSIndustry.PreRegister(engine);
+ SQGSIndustry.AddConstructor<void (ScriptIndustry::*)(), 1>(engine, "x");
+
+ SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_NOT_ACCEPTED, "CAS_NOT_ACCEPTED");
+ SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_ACCEPTED, "CAS_ACCEPTED");
+ SQGSIndustry.DefSQConst(engine, ScriptIndustry::CAS_TEMP_REFUSED, "CAS_TEMP_REFUSED");
+
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryCount, "GetIndustryCount", 1, ".");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsValidIndustry, "IsValidIndustry", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryID, "GetIndustryID", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetName, "GetName", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsCargoAccepted, "IsCargoAccepted", 3, ".ii");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetStockpiledCargo, "GetStockpiledCargo", 3, ".ii");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransported, "GetLastMonthTransported", 3, ".ii");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetLocation, "GetLocation", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetAmountOfStationsAround, "GetAmountOfStationsAround", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasHeliport, "HasHeliport", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetHeliportLocation, "GetHeliportLocation", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::HasDock, "HasDock", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetDockLocation, "GetDockLocation", 2, ".i");
+ SQGSIndustry.DefSQStaticMethod(engine, &ScriptIndustry::GetIndustryType, "GetIndustryType", 2, ".i");
+
+ SQGSIndustry.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_industrylist.hpp.sq b/src/script/api/game/game_industrylist.hpp.sq
new file mode 100644
index 000000000..fbfc5347b
--- /dev/null
+++ b/src/script/api/game/game_industrylist.hpp.sq
@@ -0,0 +1,49 @@
+/* $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_industrylist.hpp"
+#include "../template/template_industrylist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptIndustryList, ST_GS>() { return "GSIndustryList"; }
+
+void SQGSIndustryList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptIndustryList, ST_GS> SQGSIndustryList("GSIndustryList");
+ SQGSIndustryList.PreRegister(engine, "GSList");
+ SQGSIndustryList.AddConstructor<void (ScriptIndustryList::*)(), 1>(engine, "x");
+
+ SQGSIndustryList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptIndustryList_CargoAccepting, ST_GS>() { return "GSIndustryList_CargoAccepting"; }
+
+void SQGSIndustryList_CargoAccepting_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptIndustryList_CargoAccepting, ST_GS> SQGSIndustryList_CargoAccepting("GSIndustryList_CargoAccepting");
+ SQGSIndustryList_CargoAccepting.PreRegister(engine, "GSList");
+ SQGSIndustryList_CargoAccepting.AddConstructor<void (ScriptIndustryList_CargoAccepting::*)(CargoID cargo_id), 2>(engine, "xi");
+
+ SQGSIndustryList_CargoAccepting.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptIndustryList_CargoProducing, ST_GS>() { return "GSIndustryList_CargoProducing"; }
+
+void SQGSIndustryList_CargoProducing_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptIndustryList_CargoProducing, ST_GS> SQGSIndustryList_CargoProducing("GSIndustryList_CargoProducing");
+ SQGSIndustryList_CargoProducing.PreRegister(engine, "GSList");
+ SQGSIndustryList_CargoProducing.AddConstructor<void (ScriptIndustryList_CargoProducing::*)(CargoID cargo_id), 2>(engine, "xi");
+
+ SQGSIndustryList_CargoProducing.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_industrytype.hpp.sq b/src/script/api/game/game_industrytype.hpp.sq
new file mode 100644
index 000000000..537411ec1
--- /dev/null
+++ b/src/script/api/game/game_industrytype.hpp.sq
@@ -0,0 +1,41 @@
+/* $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_industrytype.hpp"
+#include "../template/template_industrytype.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptIndustryType, ST_GS>() { return "GSIndustryType"; }
+
+void SQGSIndustryType_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptIndustryType, ST_GS> SQGSIndustryType("GSIndustryType");
+ SQGSIndustryType.PreRegister(engine);
+ SQGSIndustryType.AddConstructor<void (ScriptIndustryType::*)(), 1>(engine, "x");
+
+ SQGSIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_UNKNOWN, "INDUSTRYTYPE_UNKNOWN");
+ SQGSIndustryType.DefSQConst(engine, ScriptIndustryType::INDUSTRYTYPE_TOWN, "INDUSTRYTYPE_TOWN");
+
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsValidIndustryType, "IsValidIndustryType", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetName, "GetName", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetProducedCargo, "GetProducedCargo", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetAcceptedCargo, "GetAcceptedCargo", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsRawIndustry, "IsRawIndustry", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::ProductionCanIncrease, "ProductionCanIncrease", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::GetConstructionCost, "GetConstructionCost", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanBuildIndustry, "CanBuildIndustry", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::CanProspectIndustry, "CanProspectIndustry", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::IsBuiltOnWater, "IsBuiltOnWater", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasHeliport, "HasHeliport", 2, ".i");
+ SQGSIndustryType.DefSQStaticMethod(engine, &ScriptIndustryType::HasDock, "HasDock", 2, ".i");
+
+ SQGSIndustryType.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_industrytypelist.hpp.sq b/src/script/api/game/game_industrytypelist.hpp.sq
new file mode 100644
index 000000000..d2ee7d28d
--- /dev/null
+++ b/src/script/api/game/game_industrytypelist.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_industrytypelist.hpp"
+#include "../template/template_industrytypelist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptIndustryTypeList, ST_GS>() { return "GSIndustryTypeList"; }
+
+void SQGSIndustryTypeList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptIndustryTypeList, ST_GS> SQGSIndustryTypeList("GSIndustryTypeList");
+ SQGSIndustryTypeList.PreRegister(engine, "GSList");
+ SQGSIndustryTypeList.AddConstructor<void (ScriptIndustryTypeList::*)(), 1>(engine, "x");
+
+ SQGSIndustryTypeList.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_infrastructure.hpp.sq b/src/script/api/game/game_infrastructure.hpp.sq
new file mode 100644
index 000000000..9608013b1
--- /dev/null
+++ b/src/script/api/game/game_infrastructure.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_infrastructure.hpp"
+#include "../template/template_infrastructure.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptInfrastructure, ST_GS>() { return "GSInfrastructure"; }
+
+void SQGSInfrastructure_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptInfrastructure, ST_GS> SQGSInfrastructure("GSInfrastructure");
+ SQGSInfrastructure.PreRegister(engine);
+ SQGSInfrastructure.AddConstructor<void (ScriptInfrastructure::*)(), 1>(engine, "x");
+
+ SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_RAIL, "INFRASTRUCTURE_RAIL");
+ SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_SIGNALS, "INFRASTRUCTURE_SIGNALS");
+ SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_ROAD, "INFRASTRUCTURE_ROAD");
+ SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_CANAL, "INFRASTRUCTURE_CANAL");
+ SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_STATION, "INFRASTRUCTURE_STATION");
+ SQGSInfrastructure.DefSQConst(engine, ScriptInfrastructure::INFRASTRUCTURE_AIRPORT, "INFRASTRUCTURE_AIRPORT");
+
+ SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRailPieceCount, "GetRailPieceCount", 3, ".ii");
+ SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetRoadPieceCount, "GetRoadPieceCount", 3, ".ii");
+ SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetInfrastructurePieceCount, "GetInfrastructurePieceCount", 3, ".ii");
+ SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRailCosts, "GetMonthlyRailCosts", 3, ".ii");
+ SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyRoadCosts, "GetMonthlyRoadCosts", 3, ".ii");
+ SQGSInfrastructure.DefSQStaticMethod(engine, &ScriptInfrastructure::GetMonthlyInfrastructureCosts, "GetMonthlyInfrastructureCosts", 3, ".ii");
+
+ SQGSInfrastructure.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_map.hpp.sq b/src/script/api/game/game_map.hpp.sq
new file mode 100644
index 000000000..e43edb146
--- /dev/null
+++ b/src/script/api/game/game_map.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_map.hpp"
+#include "../template/template_map.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptMap, ST_GS>() { return "GSMap"; }
+
+void SQGSMap_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptMap, ST_GS> SQGSMap("GSMap");
+ SQGSMap.PreRegister(engine);
+ SQGSMap.AddConstructor<void (ScriptMap::*)(), 1>(engine, "x");
+
+ SQGSMap.DefSQConst(engine, ScriptMap::TILE_INVALID, "TILE_INVALID");
+
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::IsValidTile, "IsValidTile", 2, ".i");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSize, "GetMapSize", 1, ".");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeX, "GetMapSizeX", 1, ".");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetMapSizeY, "GetMapSizeY", 1, ".");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileX, "GetTileX", 2, ".i");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileY, "GetTileY", 2, ".i");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::GetTileIndex, "GetTileIndex", 3, ".ii");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceManhattan, "DistanceManhattan", 3, ".ii");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceMax, "DistanceMax", 3, ".ii");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceSquare, "DistanceSquare", 3, ".ii");
+ SQGSMap.DefSQStaticMethod(engine, &ScriptMap::DistanceFromEdge, "DistanceFromEdge", 2, ".i");
+
+ SQGSMap.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_marine.hpp.sq b/src/script/api/game/game_marine.hpp.sq
new file mode 100644
index 000000000..76d7032f2
--- /dev/null
+++ b/src/script/api/game/game_marine.hpp.sq
@@ -0,0 +1,43 @@
+/* $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_marine.hpp"
+#include "../template/template_marine.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptMarine, ST_GS>() { return "GSMarine"; }
+
+void SQGSMarine_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptMarine, ST_GS> SQGSMarine("GSMarine");
+ SQGSMarine.PreRegister(engine);
+ SQGSMarine.AddConstructor<void (ScriptMarine::*)(), 1>(engine, "x");
+
+ SQGSMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_BASE, "ERR_MARINE_BASE");
+ SQGSMarine.DefSQConst(engine, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER");
+ SQGSMarine.DefSQConst(engine, ScriptMarine::BT_DOCK, "BT_DOCK");
+ SQGSMarine.DefSQConst(engine, ScriptMarine::BT_DEPOT, "BT_DEPOT");
+ SQGSMarine.DefSQConst(engine, ScriptMarine::BT_BUOY, "BT_BUOY");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_MUST_BE_BUILT_ON_WATER, ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER);
+
+ ScriptError::RegisterErrorMapString(ScriptMarine::ERR_MARINE_MUST_BE_BUILT_ON_WATER, "ERR_MARINE_MUST_BE_BUILT_ON_WATER");
+
+ SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsWaterDepotTile, "IsWaterDepotTile", 2, ".i");
+ SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsDockTile, "IsDockTile", 2, ".i");
+ SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsBuoyTile, "IsBuoyTile", 2, ".i");
+ SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsLockTile, "IsLockTile", 2, ".i");
+ SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::IsCanalTile, "IsCanalTile", 2, ".i");
+ SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::AreWaterTilesConnected, "AreWaterTilesConnected", 3, ".ii");
+ SQGSMarine.DefSQStaticMethod(engine, &ScriptMarine::GetBuildCost, "GetBuildCost", 2, ".i");
+
+ SQGSMarine.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_road.hpp.sq b/src/script/api/game/game_road.hpp.sq
new file mode 100644
index 000000000..5dd857ded
--- /dev/null
+++ b/src/script/api/game/game_road.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_road.hpp"
+#include "../template/template_road.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptRoad, ST_GS>() { return "GSRoad"; }
+
+void SQGSRoad_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptRoad, ST_GS> SQGSRoad("GSRoad");
+ SQGSRoad.PreRegister(engine);
+ SQGSRoad.AddConstructor<void (ScriptRoad::*)(), 1>(engine, "x");
+
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_BASE, "ERR_ROAD_BASE");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_ROAD, "ROADTYPE_ROAD");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_TRAM, "ROADTYPE_TRAM");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ROADTYPE_INVALID, "ROADTYPE_INVALID");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_BUS, "ROADVEHTYPE_BUS");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::ROADVEHTYPE_TRUCK, "ROADVEHTYPE_TRUCK");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::BT_ROAD, "BT_ROAD");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::BT_DEPOT, "BT_DEPOT");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::BT_BUS_STOP, "BT_BUS_STOP");
+ SQGSRoad.DefSQConst(engine, ScriptRoad::BT_TRUCK_STOP, "BT_TRUCK_STOP");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_ROAD_WORKS_IN_PROGRESS, ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS);
+ ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_DIRECTION, ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION);
+ ScriptError::RegisterErrorMap(STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD, ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD);
+ ScriptError::RegisterErrorMap(STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION, ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS);
+
+ ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_WORKS_IN_PROGRESS, "ERR_ROAD_WORKS_IN_PROGRESS");
+ ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION, "ERR_ROAD_DRIVE_THROUGH_WRONG_DIRECTION");
+ ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD, "ERR_ROAD_CANNOT_BUILD_ON_TOWN_ROAD");
+ ScriptError::RegisterErrorMapString(ScriptRoad::ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS, "ERR_ROAD_ONE_WAY_ROADS_CANNOT_HAVE_JUNCTIONS");
+
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadVehicleTypeForCargo, "GetRoadVehicleTypeForCargo", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadTile, "IsRoadTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadDepotTile, "IsRoadDepotTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsRoadStationTile, "IsRoadStationTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::IsDriveThroughRoadStationTile, "IsDriveThroughRoadStationTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetCurrentRoadType, "GetCurrentRoadType", 1, ".");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::SetCurrentRoadType, "SetCurrentRoadType", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::HasRoadType, "HasRoadType", 3, ".ii");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::AreRoadTilesConnected, "AreRoadTilesConnected", 3, ".ii");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetNeighbourRoadCount, "GetNeighbourRoadCount", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadDepotFrontTile, "GetRoadDepotFrontTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetRoadStationFrontTile, "GetRoadStationFrontTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetDriveThroughBackTile, "GetDriveThroughBackTile", 2, ".i");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetBuildCost, "GetBuildCost", 3, ".ii");
+ SQGSRoad.DefSQStaticMethod(engine, &ScriptRoad::GetMaintenanceCostFactor, "GetMaintenanceCostFactor", 2, ".i");
+
+ SQGSRoad.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_signlist.hpp.sq b/src/script/api/game/game_signlist.hpp.sq
new file mode 100644
index 000000000..9fc7ed7f2
--- /dev/null
+++ b/src/script/api/game/game_signlist.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_signlist.hpp"
+#include "../template/template_signlist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptSignList, ST_GS>() { return "GSSignList"; }
+
+void SQGSSignList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptSignList, ST_GS> SQGSSignList("GSSignList");
+ SQGSSignList.PreRegister(engine, "GSList");
+ SQGSSignList.AddConstructor<void (ScriptSignList::*)(), 1>(engine, "x");
+
+ SQGSSignList.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_tile.hpp.sq b/src/script/api/game/game_tile.hpp.sq
new file mode 100644
index 000000000..53e02578b
--- /dev/null
+++ b/src/script/api/game/game_tile.hpp.sq
@@ -0,0 +1,109 @@
+/* $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_tile.hpp"
+#include "../template/template_tile.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptTile, ST_GS>() { return "GSTile"; }
+
+void SQGSTile_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTile, ST_GS> SQGSTile("GSTile");
+ SQGSTile.PreRegister(engine);
+ SQGSTile.AddConstructor<void (ScriptTile::*)(), 1>(engine, "x");
+
+ SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_BASE, "ERR_TILE_BASE");
+ SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
+ SQGSTile.DefSQConst(engine, ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
+ SQGSTile.DefSQConst(engine, ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
+ SQGSTile.DefSQConst(engine, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
+ SQGSTile.DefSQConst(engine, ScriptTile::CORNER_W, "CORNER_W");
+ SQGSTile.DefSQConst(engine, ScriptTile::CORNER_S, "CORNER_S");
+ SQGSTile.DefSQConst(engine, ScriptTile::CORNER_E, "CORNER_E");
+ SQGSTile.DefSQConst(engine, ScriptTile::CORNER_N, "CORNER_N");
+ SQGSTile.DefSQConst(engine, ScriptTile::CORNER_INVALID, "CORNER_INVALID");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_FLAT, "SLOPE_FLAT");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_W, "SLOPE_W");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_S, "SLOPE_S");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_E, "SLOPE_E");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_N, "SLOPE_N");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP, "SLOPE_STEEP");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NW, "SLOPE_NW");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_SW, "SLOPE_SW");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_SE, "SLOPE_SE");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NE, "SLOPE_NE");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_EW, "SLOPE_EW");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NS, "SLOPE_NS");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_ELEVATED, "SLOPE_ELEVATED");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_NWS, "SLOPE_NWS");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_WSE, "SLOPE_WSE");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_SEN, "SLOPE_SEN");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_ENW, "SLOPE_ENW");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_W, "SLOPE_STEEP_W");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_S, "SLOPE_STEEP_S");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_E, "SLOPE_STEEP_E");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_STEEP_N, "SLOPE_STEEP_N");
+ SQGSTile.DefSQConst(engine, ScriptTile::SLOPE_INVALID, "SLOPE_INVALID");
+ SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_RAIL, "TRANSPORT_RAIL");
+ SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_ROAD, "TRANSPORT_ROAD");
+ SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_WATER, "TRANSPORT_WATER");
+ SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_AIR, "TRANSPORT_AIR");
+ SQGSTile.DefSQConst(engine, ScriptTile::TRANSPORT_INVALID, "TRANSPORT_INVALID");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_FOUNDATION, "BT_FOUNDATION");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_TERRAFORM, "BT_TERRAFORM");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_BUILD_TREES, "BT_BUILD_TREES");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_GRASS, "BT_CLEAR_GRASS");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROUGH, "BT_CLEAR_ROUGH");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_ROCKY, "BT_CLEAR_ROCKY");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_FIELDS, "BT_CLEAR_FIELDS");
+ SQGSTile.DefSQConst(engine, ScriptTile::BT_CLEAR_HOUSE, "BT_CLEAR_HOUSE");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_HIGH);
+ ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_AT_SEA_LEVEL, ScriptTile::ERR_TILE_TOO_LOW);
+ ScriptError::RegisterErrorMap(STR_ERROR_ALREADY_LEVELLED, ScriptTile::ERR_AREA_ALREADY_FLAT);
+ ScriptError::RegisterErrorMap(STR_ERROR_EXCAVATION_WOULD_DAMAGE, ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE);
+
+ ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_HIGH, "ERR_TILE_TOO_HIGH");
+ ScriptError::RegisterErrorMapString(ScriptTile::ERR_TILE_TOO_LOW, "ERR_TILE_TOO_LOW");
+ ScriptError::RegisterErrorMapString(ScriptTile::ERR_AREA_ALREADY_FLAT, "ERR_AREA_ALREADY_FLAT");
+ ScriptError::RegisterErrorMapString(ScriptTile::ERR_EXCAVATION_WOULD_DAMAGE, "ERR_EXCAVATION_WOULD_DAMAGE");
+
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsBuildableRectangle, "IsBuildableRectangle", 4, ".iii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsWaterTile, "IsWaterTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsCoastTile, "IsCoastTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsStationTile, "IsStationTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsSteepSlope, "IsSteepSlope", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsHalftileSlope, "IsHalftileSlope", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::HasTreeOnTile, "HasTreeOnTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsFarmTile, "IsFarmTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsRockTile, "IsRockTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsRoughTile, "IsRoughTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsSnowTile, "IsSnowTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsDesertTile, "IsDesertTile", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetSlope, "GetSlope", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetComplementSlope, "GetComplementSlope", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetMinHeight, "GetMinHeight", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetMaxHeight, "GetMaxHeight", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetCornerHeight, "GetCornerHeight", 3, ".ii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetOwner, "GetOwner", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::HasTransportType, "HasTransportType", 3, ".ii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetCargoAcceptance, "GetCargoAcceptance", 6, ".iiiii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetCargoProduction, "GetCargoProduction", 6, ".iiiii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetTownAuthority, "GetTownAuthority", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetClosestTown, "GetClosestTown", 2, ".i");
+ SQGSTile.DefSQStaticMethod(engine, &ScriptTile::GetBuildCost, "GetBuildCost", 2, ".i");
+
+ SQGSTile.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_town.hpp.sq b/src/script/api/game/game_town.hpp.sq
new file mode 100644
index 000000000..ef20b0418
--- /dev/null
+++ b/src/script/api/game/game_town.hpp.sq
@@ -0,0 +1,63 @@
+/* $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_town.hpp"
+#include "../template/template_town.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptTown, ST_GS>() { return "GSTown"; }
+
+void SQGSTown_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTown, ST_GS> SQGSTown("GSTown");
+ SQGSTown.PreRegister(engine);
+ SQGSTown.AddConstructor<void (ScriptTown::*)(), 1>(engine, "x");
+
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_NONE, "TOWN_RATING_NONE");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_APPALLING, "TOWN_RATING_APPALLING");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_POOR, "TOWN_RATING_VERY_POOR");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_POOR, "TOWN_RATING_POOR");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_MEDIOCRE, "TOWN_RATING_MEDIOCRE");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_GOOD, "TOWN_RATING_GOOD");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_VERY_GOOD, "TOWN_RATING_VERY_GOOD");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_EXCELLENT, "TOWN_RATING_EXCELLENT");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_OUTSTANDING, "TOWN_RATING_OUTSTANDING");
+ SQGSTown.DefSQConst(engine, ScriptTown::TOWN_RATING_INVALID, "TOWN_RATING_INVALID");
+ SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_ORIGINAL, "ROAD_LAYOUT_ORIGINAL");
+ SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_BETTER_ROADS, "ROAD_LAYOUT_BETTER_ROADS");
+ SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_2x2, "ROAD_LAYOUT_2x2");
+ SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_3x3, "ROAD_LAYOUT_3x3");
+ SQGSTown.DefSQConst(engine, ScriptTown::ROAD_LAYOUT_INVALID, "ROAD_LAYOUT_INVALID");
+
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetTownCount, "GetTownCount", 1, ".");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::IsValidTown, "IsValidTown", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetName, "GetName", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetPopulation, "GetPopulation", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetHouseCount, "GetHouseCount", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLocation, "GetLocation", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthProduction, "GetLastMonthProduction", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthSupplied, "GetLastMonthSupplied", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthTransportedPercentage, "GetLastMonthTransportedPercentage", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetLastMonthReceived, "GetLastMonthReceived", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetCargoGoal, "GetCargoGoal", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetGrowthRate, "GetGrowthRate", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceManhattanToTile, "GetDistanceManhattanToTile", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetDistanceSquareToTile, "GetDistanceSquareToTile", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::IsWithinTownInfluence, "IsWithinTownInfluence", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::IsCity, "IsCity", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRoadReworkDuration, "GetRoadReworkDuration", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetExclusiveRightsDuration, "GetExclusiveRightsDuration", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRating, "GetRating", 3, ".ii");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetAllowedNoise, "GetAllowedNoise", 2, ".i");
+ SQGSTown.DefSQStaticMethod(engine, &ScriptTown::GetRoadLayout, "GetRoadLayout", 2, ".i");
+
+ SQGSTown.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_townlist.hpp.sq b/src/script/api/game/game_townlist.hpp.sq
new file mode 100644
index 000000000..a0d8c7f1d
--- /dev/null
+++ b/src/script/api/game/game_townlist.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_townlist.hpp"
+#include "../template/template_townlist.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptTownList, ST_GS>() { return "GSTownList"; }
+
+void SQGSTownList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTownList, ST_GS> SQGSTownList("GSTownList");
+ SQGSTownList.PreRegister(engine, "GSList");
+ SQGSTownList.AddConstructor<void (ScriptTownList::*)(), 1>(engine, "x");
+
+ SQGSTownList.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptTownEffectList, ST_GS>() { return "GSTownEffectList"; }
+
+void SQGSTownEffectList_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptTownEffectList, ST_GS> SQGSTownEffectList("GSTownEffectList");
+ SQGSTownEffectList.PreRegister(engine, "GSList");
+ SQGSTownEffectList.AddConstructor<void (ScriptTownEffectList::*)(), 1>(engine, "x");
+
+ SQGSTownEffectList.PostRegister(engine);
+}
diff --git a/src/script/api/game/game_vehicle.hpp.sq b/src/script/api/game/game_vehicle.hpp.sq
new file mode 100644
index 000000000..9652335e3
--- /dev/null
+++ b/src/script/api/game/game_vehicle.hpp.sq
@@ -0,0 +1,134 @@
+/* $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_vehicle.hpp"
+#include "../template/template_vehicle.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptVehicle, ST_GS>() { return "GSVehicle"; }
+
+void SQGSVehicle_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptVehicle, ST_GS> SQGSVehicle("GSVehicle");
+ SQGSVehicle.PreRegister(engine);
+ SQGSVehicle.AddConstructor<void (ScriptVehicle::*)(), 1>(engine, "x");
+
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BASE, "ERR_VEHICLE_BASE");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_RAIL, "VT_RAIL");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_ROAD, "VT_ROAD");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_WATER, "VT_WATER");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_AIR, "VT_AIR");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VT_INVALID, "VT_INVALID");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_RUNNING, "VS_RUNNING");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_STOPPED, "VS_STOPPED");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_IN_DEPOT, "VS_IN_DEPOT");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_AT_STATION, "VS_AT_STATION");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_BROKEN, "VS_BROKEN");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_CRASHED, "VS_CRASHED");
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VS_INVALID, "VS_INVALID");
+
+ SQGSVehicle.DefSQConst(engine, ScriptVehicle::VEHICLE_INVALID, "VEHICLE_INVALID");
+
+ ScriptError::RegisterErrorMap(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME, ScriptVehicle::ERR_VEHICLE_TOO_MANY);
+ ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ ScriptError::RegisterErrorMap(STR_ERROR_SHIP_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ ScriptError::RegisterErrorMap(STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE, ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_TRAIN, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_SHIP, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_BUY_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED);
+ ScriptError::RegisterErrorMap(STR_ERROR_DEPOT_WRONG_DEPOT_TYPE, ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR, ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_STOP_START_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS, ScriptVehicle::ERR_VEHICLE_CANNOT_TURN);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_TRAIN, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_SHIP, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
+ ScriptError::RegisterErrorMap(STR_ERROR_CAN_T_REFIT_AIRCRAFT, ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT);
+ ScriptError::RegisterErrorMap(STR_ERROR_VEHICLE_IS_DESTROYED, ScriptVehicle::ERR_VEHICLE_IS_DESTROYED);
+ ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_MUST_BE_STOPPED_INSIDE_HANGAR, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT, ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT);
+ ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT, ScriptVehicle::ERR_VEHICLE_IN_FLIGHT);
+ ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_START_NO_POWER, ScriptVehicle::ERR_VEHICLE_NO_POWER);
+ ScriptError::RegisterErrorMap(STR_ERROR_TRAIN_TOO_LONG, ScriptVehicle::ERR_VEHICLE_TOO_LONG);
+
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_MANY, "ERR_VEHICLE_TOO_MANY");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_AVAILABLE, "ERR_VEHICLE_NOT_AVAILABLE");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_BUILD_DISABLED, "ERR_VEHICLE_BUILD_DISABLED");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_WRONG_DEPOT, "ERR_VEHICLE_WRONG_DEPOT");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT, "ERR_VEHICLE_CANNOT_SEND_TO_DEPOT");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_START_STOP, "ERR_VEHICLE_CANNOT_START_STOP");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_TURN, "ERR_VEHICLE_CANNOT_TURN");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_CANNOT_REFIT, "ERR_VEHICLE_CANNOT_REFIT");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IS_DESTROYED, "ERR_VEHICLE_IS_DESTROYED");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NOT_IN_DEPOT, "ERR_VEHICLE_NOT_IN_DEPOT");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_IN_FLIGHT, "ERR_VEHICLE_IN_FLIGHT");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_NO_POWER, "ERR_VEHICLE_NO_POWER");
+ ScriptError::RegisterErrorMapString(ScriptVehicle::ERR_VEHICLE_TOO_LONG, "ERR_VEHICLE_TOO_LONG");
+
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetNumWagons, "GetNumWagons", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetName, "GetName", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLocation, "GetLocation", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetEngineType, "GetEngineType", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonEngineType, "GetWagonEngineType", 3, ".ii");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetUnitNumber, "GetUnitNumber", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAge, "GetAge", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetWagonAge, "GetWagonAge", 3, ".ii");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaxAge, "GetMaxAge", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetAgeLeft, "GetAgeLeft", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentSpeed, "GetCurrentSpeed", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetState, "GetState", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRunningCost, "GetRunningCost", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitThisYear, "GetProfitThisYear", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetProfitLastYear, "GetProfitLastYear", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCurrentValue, "GetCurrentValue", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetVehicleType, "GetVehicleType", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRoadType, "GetRoadType", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsInDepot, "IsInDepot", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsStoppedInDepot, "IsStoppedInDepot", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetRefitCapacity, "GetRefitCapacity", 3, ".ii");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCapacity, "GetCapacity", 3, ".ii");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetLength, "GetLength", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetCargoLoad, "GetCargoLoad", 3, ".ii");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetGroupID, "GetGroupID", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::IsArticulated, "IsArticulated", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::HasSharedOrders, "HasSharedOrders", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetReliability, "GetReliability", 2, ".i");
+ SQGSVehicle.DefSQStaticMethod(engine, &ScriptVehicle::GetMaximumOrderDistance, "GetMaximumOrderDistance", 2, ".i");
+
+ SQGSVehicle.PostRegister(engine);
+}