diff options
author | frosch <frosch@openttd.org> | 2012-05-26 14:16:38 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-26 14:16:38 +0000 |
commit | 8dc553a039ae1b706bd8fd6086b0eeb966695054 (patch) | |
tree | f0f93ed762aea9df072fbcee68fb6700c5a43c09 /src/script/api/game | |
parent | 66a37e28a69411f4666158cce03c6fd29e9a15e1 (diff) | |
download | openttd-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.sq | 1 | ||||
-rw-r--r-- | src/script/api/game/game_event_types.hpp.sq | 14 |
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); +} |