From 66a37e28a69411f4666158cce03c6fd29e9a15e1 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 26 May 2012 14:16:32 +0000 Subject: (svn r24289) -Add: [Script] Base class for script events involving a company and a town. --- src/script/api/ai/ai_event_types.hpp.sq | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/script/api/ai') diff --git a/src/script/api/ai/ai_event_types.hpp.sq b/src/script/api/ai/ai_event_types.hpp.sq index bb46ed724..d40ab240a 100644 --- a/src/script/api/ai/ai_event_types.hpp.sq +++ b/src/script/api/ai/ai_event_types.hpp.sq @@ -361,3 +361,19 @@ void SQAIEventAircraftDestTooFar_Register(Squirrel *engine) SQAIEventAircraftDestTooFar.PostRegister(engine); } + + +template <> const char *GetClassName() { return "AIEventCompanyTown"; } + +void SQAIEventCompanyTown_Register(Squirrel *engine) +{ + DefSQClass SQAIEventCompanyTown("AIEventCompanyTown"); + SQAIEventCompanyTown.PreRegister(engine, "AIEvent"); + + SQAIEventCompanyTown.DefSQStaticMethod(engine, &ScriptEventCompanyTown::Convert, "Convert", 2, ".x"); + + SQAIEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetCompanyID, "GetCompanyID", 1, "x"); + SQAIEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetTownID, "GetTownID", 1, "x"); + + SQAIEventCompanyTown.PostRegister(engine); +} -- cgit v1.2.3-70-g09d2