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/ai/ai_event_types.hpp.sq | |
parent | 66a37e28a69411f4666158cce03c6fd29e9a15e1 (diff) | |
download | openttd-8dc553a039ae1b706bd8fd6086b0eeb966695054.tar.xz |
(svn r24290) -Add: [Script] ScriptEventExclusiveTransportRights.
Diffstat (limited to 'src/script/api/ai/ai_event_types.hpp.sq')
-rw-r--r-- | src/script/api/ai/ai_event_types.hpp.sq | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_event_types.hpp.sq b/src/script/api/ai/ai_event_types.hpp.sq index d40ab240a..3cc936115 100644 --- a/src/script/api/ai/ai_event_types.hpp.sq +++ b/src/script/api/ai/ai_event_types.hpp.sq @@ -377,3 +377,17 @@ void SQAIEventCompanyTown_Register(Squirrel *engine) SQAIEventCompanyTown.PostRegister(engine); } + + +template <> const char *GetClassName<ScriptEventExclusiveTransportRights, ST_AI>() { return "AIEventExclusiveTransportRights"; } + +void SQAIEventExclusiveTransportRights_Register(Squirrel *engine) +{ + DefSQClass<ScriptEventExclusiveTransportRights, ST_AI> SQAIEventExclusiveTransportRights("AIEventExclusiveTransportRights"); + SQAIEventExclusiveTransportRights.PreRegister(engine, "AIEventCompanyTown"); + SQAIEventExclusiveTransportRights.AddConstructor<void (ScriptEventExclusiveTransportRights::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii"); + + SQAIEventExclusiveTransportRights.DefSQStaticMethod(engine, &ScriptEventExclusiveTransportRights::Convert, "Convert", 2, ".x"); + + SQAIEventExclusiveTransportRights.PostRegister(engine); +} |