(svn r24291) -Add: [Script] ScriptEventRoadReconstruction.

This commit is contained in:
frosch
2012-05-26 14:16:45 +00:00
parent 8dc553a039
commit 95d3d6fdef
12 changed files with 68 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ void SQAIEvent_Register(Squirrel *engine)
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK, "ET_WINDOW_WIDGET_CLICK");
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER, "ET_GOAL_QUESTION_ANSWER");
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS");
SQAIEvent.DefSQConst(engine, ScriptEvent::ET_ROAD_RECONSTRUCTION, "ET_ROAD_RECONSTRUCTION");
SQAIEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x");

View File

@@ -391,3 +391,17 @@ void SQAIEventExclusiveTransportRights_Register(Squirrel *engine)
SQAIEventExclusiveTransportRights.PostRegister(engine);
}
template <> const char *GetClassName<ScriptEventRoadReconstruction, ST_AI>() { return "AIEventRoadReconstruction"; }
void SQAIEventRoadReconstruction_Register(Squirrel *engine)
{
DefSQClass<ScriptEventRoadReconstruction, ST_AI> SQAIEventRoadReconstruction("AIEventRoadReconstruction");
SQAIEventRoadReconstruction.PreRegister(engine, "AIEventCompanyTown");
SQAIEventRoadReconstruction.AddConstructor<void (ScriptEventRoadReconstruction::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii");
SQAIEventRoadReconstruction.DefSQStaticMethod(engine, &ScriptEventRoadReconstruction::Convert, "Convert", 2, ".x");
SQAIEventRoadReconstruction.PostRegister(engine);
}