summaryrefslogtreecommitdiff
path: root/src/script/api/game
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-05-26 14:16:38 +0000
committerfrosch <frosch@openttd.org>2012-05-26 14:16:38 +0000
commit8dc553a039ae1b706bd8fd6086b0eeb966695054 (patch)
treef0f93ed762aea9df072fbcee68fb6700c5a43c09 /src/script/api/game
parent66a37e28a69411f4666158cce03c6fd29e9a15e1 (diff)
downloadopenttd-8dc553a039ae1b706bd8fd6086b0eeb966695054.tar.xz
(svn r24290) -Add: [Script] ScriptEventExclusiveTransportRights.
Diffstat (limited to 'src/script/api/game')
-rw-r--r--src/script/api/game/game_event.hpp.sq1
-rw-r--r--src/script/api/game/game_event_types.hpp.sq14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/script/api/game/game_event.hpp.sq b/src/script/api/game/game_event.hpp.sq
index 396295530..6ac785672 100644
--- a/src/script/api/game/game_event.hpp.sq
+++ b/src/script/api/game/game_event.hpp.sq
@@ -48,6 +48,7 @@ void SQGSEvent_Register(Squirrel *engine)
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ADMIN_PORT, "ET_ADMIN_PORT");
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK, "ET_WINDOW_WIDGET_CLICK");
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER, "ET_GOAL_QUESTION_ANSWER");
+ SQGSEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS");
SQGSEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x");
diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq
index 6faacba44..3a97a7d7e 100644
--- a/src/script/api/game/game_event_types.hpp.sq
+++ b/src/script/api/game/game_event_types.hpp.sq
@@ -282,3 +282,17 @@ void SQGSEventCompanyTown_Register(Squirrel *engine)
SQGSEventCompanyTown.PostRegister(engine);
}
+
+
+template <> const char *GetClassName<ScriptEventExclusiveTransportRights, ST_GS>() { return "GSEventExclusiveTransportRights"; }
+
+void SQGSEventExclusiveTransportRights_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptEventExclusiveTransportRights, ST_GS> SQGSEventExclusiveTransportRights("GSEventExclusiveTransportRights");
+ SQGSEventExclusiveTransportRights.PreRegister(engine, "GSEventCompanyTown");
+ SQGSEventExclusiveTransportRights.AddConstructor<void (ScriptEventExclusiveTransportRights::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii");
+
+ SQGSEventExclusiveTransportRights.DefSQStaticMethod(engine, &ScriptEventExclusiveTransportRights::Convert, "Convert", 2, ".x");
+
+ SQGSEventExclusiveTransportRights.PostRegister(engine);
+}