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/game/game_event_types.hpp.sq | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/script/api/game') diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq index 727e90bb1..6faacba44 100644 --- a/src/script/api/game/game_event_types.hpp.sq +++ b/src/script/api/game/game_event_types.hpp.sq @@ -266,3 +266,19 @@ void SQGSEventGoalQuestionAnswer_Register(Squirrel *engine) SQGSEventGoalQuestionAnswer.PostRegister(engine); } + + +template <> const char *GetClassName() { return "GSEventCompanyTown"; } + +void SQGSEventCompanyTown_Register(Squirrel *engine) +{ + DefSQClass SQGSEventCompanyTown("GSEventCompanyTown"); + SQGSEventCompanyTown.PreRegister(engine, "GSEvent"); + + SQGSEventCompanyTown.DefSQStaticMethod(engine, &ScriptEventCompanyTown::Convert, "Convert", 2, ".x"); + + SQGSEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetCompanyID, "GetCompanyID", 1, "x"); + SQGSEventCompanyTown.DefSQMethod(engine, &ScriptEventCompanyTown::GetTownID, "GetTownID", 1, "x"); + + SQGSEventCompanyTown.PostRegister(engine); +} -- cgit v1.2.3-70-g09d2