summaryrefslogtreecommitdiff
path: root/src/script/api/ai/ai_event.hpp.sq
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-11-29 23:29:20 +0000
committertruebrain <truebrain@openttd.org>2011-11-29 23:29:20 +0000
commit7158aaea3100fbae72c75645800592117375f897 (patch)
tree30b4f0058553c0246ea3c5d773972bbafedac5b7 /src/script/api/ai/ai_event.hpp.sq
parente60747a6043d42b872d02ba667f99187b5d3f1d7 (diff)
downloadopenttd-7158aaea3100fbae72c75645800592117375f897.tar.xz
(svn r23373) -Add: move the AI API to script/api/ai, and move the Squirrel C++ glue templates to script/api/template
Diffstat (limited to 'src/script/api/ai/ai_event.hpp.sq')
-rw-r--r--src/script/api/ai/ai_event.hpp.sq66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_event.hpp.sq b/src/script/api/ai/ai_event.hpp.sq
new file mode 100644
index 000000000..b30e38e19
--- /dev/null
+++ b/src/script/api/ai/ai_event.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_event.hpp"
+#include "../template/template_event.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptEvent, ST_AI>() { return "AIEvent"; }
+
+void SQAIEvent_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptEvent, ST_AI> SQAIEvent("AIEvent");
+ SQAIEvent.PreRegister(engine);
+ SQAIEvent.AddConstructor<void (ScriptEvent::*)(ScriptEvent::ScriptEventType type), 2>(engine, "xi");
+
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_INVALID, "AI_ET_INVALID");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_TEST, "AI_ET_TEST");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_OFFER, "AI_ET_SUBSIDY_OFFER");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_OFFER_EXPIRED, "AI_ET_SUBSIDY_OFFER_EXPIRED");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_AWARDED, "AI_ET_SUBSIDY_AWARDED");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_SUBSIDY_EXPIRED, "AI_ET_SUBSIDY_EXPIRED");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_ENGINE_PREVIEW, "AI_ET_ENGINE_PREVIEW");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_NEW, "AI_ET_COMPANY_NEW");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_IN_TROUBLE, "AI_ET_COMPANY_IN_TROUBLE");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_ASK_MERGER, "AI_ET_COMPANY_ASK_MERGER");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_MERGER, "AI_ET_COMPANY_MERGER");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_COMPANY_BANKRUPT, "AI_ET_COMPANY_BANKRUPT");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_CRASHED, "AI_ET_VEHICLE_CRASHED");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_LOST, "AI_ET_VEHICLE_LOST");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_WAITING_IN_DEPOT, "AI_ET_VEHICLE_WAITING_IN_DEPOT");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_VEHICLE_UNPROFITABLE, "AI_ET_VEHICLE_UNPROFITABLE");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_INDUSTRY_OPEN, "AI_ET_INDUSTRY_OPEN");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_INDUSTRY_CLOSE, "AI_ET_INDUSTRY_CLOSE");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_ENGINE_AVAILABLE, "AI_ET_ENGINE_AVAILABLE");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_STATION_FIRST_VEHICLE, "AI_ET_STATION_FIRST_VEHICLE");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_DISASTER_ZEPPELINER_CRASHED, "AI_ET_DISASTER_ZEPPELINER_CRASHED");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_DISASTER_ZEPPELINER_CLEARED, "AI_ET_DISASTER_ZEPPELINER_CLEARED");
+ SQAIEvent.DefSQConst(engine, ScriptEvent::AI_ET_TOWN_FOUNDED, "AI_ET_TOWN_FOUNDED");
+
+ SQAIEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x");
+
+ SQAIEvent.PostRegister(engine);
+}
+
+
+template <> const char *GetClassName<ScriptEventController, ST_AI>() { return "AIEventController"; }
+
+void SQAIEventController_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptEventController, ST_AI> SQAIEventController("AIEventController");
+ SQAIEventController.PreRegister(engine);
+ SQAIEventController.AddConstructor<void (ScriptEventController::*)(), 1>(engine, "x");
+
+ SQAIEventController.DefSQStaticMethod(engine, &ScriptEventController::IsEventWaiting, "IsEventWaiting", 1, ".");
+ SQAIEventController.DefSQStaticMethod(engine, &ScriptEventController::GetNextEvent, "GetNextEvent", 1, ".");
+
+ SQAIEventController.PostRegister(engine);
+}