summaryrefslogtreecommitdiff
path: root/src/script/api/game
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-05-26 14:16:45 +0000
committerfrosch <frosch@openttd.org>2012-05-26 14:16:45 +0000
commit95d3d6fdef7feed7eb9f543751424797d78346d2 (patch)
treea7386a60208c0a8f8ff422deb3953abc454e670a /src/script/api/game
parent8dc553a039ae1b706bd8fd6086b0eeb966695054 (diff)
downloadopenttd-95d3d6fdef7feed7eb9f543751424797d78346d2.tar.xz
(svn r24291) -Add: [Script] ScriptEventRoadReconstruction.
Diffstat (limited to 'src/script/api/game')
-rw-r--r--src/script/api/game/game_event.hpp.sq1
-rw-r--r--src/script/api/game/game_event_types.hpp.sq14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/script/api/game/game_event.hpp.sq b/src/script/api/game/game_event.hpp.sq
index 6ac785672..53b9b2ce9 100644
--- a/src/script/api/game/game_event.hpp.sq
+++ b/src/script/api/game/game_event.hpp.sq
@@ -49,6 +49,7 @@ void SQGSEvent_Register(Squirrel *engine)
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_WINDOW_WIDGET_CLICK, "ET_WINDOW_WIDGET_CLICK");
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_GOAL_QUESTION_ANSWER, "ET_GOAL_QUESTION_ANSWER");
SQGSEvent.DefSQConst(engine, ScriptEvent::ET_EXCLUSIVE_TRANSPORT_RIGHTS, "ET_EXCLUSIVE_TRANSPORT_RIGHTS");
+ SQGSEvent.DefSQConst(engine, ScriptEvent::ET_ROAD_RECONSTRUCTION, "ET_ROAD_RECONSTRUCTION");
SQGSEvent.DefSQMethod(engine, &ScriptEvent::GetEventType, "GetEventType", 1, "x");
diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq
index 3a97a7d7e..56acdd30f 100644
--- a/src/script/api/game/game_event_types.hpp.sq
+++ b/src/script/api/game/game_event_types.hpp.sq
@@ -296,3 +296,17 @@ void SQGSEventExclusiveTransportRights_Register(Squirrel *engine)
SQGSEventExclusiveTransportRights.PostRegister(engine);
}
+
+
+template <> const char *GetClassName<ScriptEventRoadReconstruction, ST_GS>() { return "GSEventRoadReconstruction"; }
+
+void SQGSEventRoadReconstruction_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptEventRoadReconstruction, ST_GS> SQGSEventRoadReconstruction("GSEventRoadReconstruction");
+ SQGSEventRoadReconstruction.PreRegister(engine, "GSEventCompanyTown");
+ SQGSEventRoadReconstruction.AddConstructor<void (ScriptEventRoadReconstruction::*)(ScriptCompany::CompanyID company, TownID town), 3>(engine, "xii");
+
+ SQGSEventRoadReconstruction.DefSQStaticMethod(engine, &ScriptEventRoadReconstruction::Convert, "Convert", 2, ".x");
+
+ SQGSEventRoadReconstruction.PostRegister(engine);
+}