(svn r24289) -Add: [Script] Base class for script events involving a company and a town.

This commit is contained in:
frosch
2012-05-26 14:16:32 +00:00
parent 9ad9d72c4a
commit 66a37e28a6
6 changed files with 85 additions and 0 deletions

View File

@@ -361,3 +361,19 @@ void SQAIEventAircraftDestTooFar_Register(Squirrel *engine)
SQAIEventAircraftDestTooFar.PostRegister(engine);
}
template <> const char *GetClassName<ScriptEventCompanyTown, ST_AI>() { return "AIEventCompanyTown"; }
void SQAIEventCompanyTown_Register(Squirrel *engine)
{
DefSQClass<ScriptEventCompanyTown, ST_AI> 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);
}