diff options
author | frosch <frosch@openttd.org> | 2012-05-26 14:16:45 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-26 14:16:45 +0000 |
commit | 95d3d6fdef7feed7eb9f543751424797d78346d2 (patch) | |
tree | a7386a60208c0a8f8ff422deb3953abc454e670a /src/script/api/ai | |
parent | 8dc553a039ae1b706bd8fd6086b0eeb966695054 (diff) | |
download | openttd-95d3d6fdef7feed7eb9f543751424797d78346d2.tar.xz |
(svn r24291) -Add: [Script] ScriptEventRoadReconstruction.
Diffstat (limited to 'src/script/api/ai')
-rw-r--r-- | src/script/api/ai/ai_event.hpp.sq | 1 | ||||
-rw-r--r-- | src/script/api/ai/ai_event_types.hpp.sq | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_event.hpp.sq b/src/script/api/ai/ai_event.hpp.sq index 6eb6de5ba..75098625a 100644 --- a/src/script/api/ai/ai_event.hpp.sq +++ b/src/script/api/ai/ai_event.hpp.sq @@ -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"); diff --git a/src/script/api/ai/ai_event_types.hpp.sq b/src/script/api/ai/ai_event_types.hpp.sq index 3cc936115..f3468d14b 100644 --- a/src/script/api/ai/ai_event_types.hpp.sq +++ b/src/script/api/ai/ai_event_types.hpp.sq @@ -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); +} |