summaryrefslogtreecommitdiff
path: root/src/script/api/game/game_event_types.hpp.sq
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2012-01-03 16:36:24 +0000
committertruebrain <truebrain@openttd.org>2012-01-03 16:36:24 +0000
commit34d90da509a27c4abe35c11d7f034b1e386cd968 (patch)
tree552a11c264ee5b26ad849818f50f45bf9927735c /src/script/api/game/game_event_types.hpp.sq
parent18ac3f2bd89aa11fefa64bdada287a72937ab8d5 (diff)
downloadopenttd-34d90da509a27c4abe35c11d7f034b1e386cd968.tar.xz
(svn r23731) -Add: add GSGoal::Question(), to ask a question to a(ll) company(ies). It can contain random text, and at most 3 buttons from a collection of 17
Diffstat (limited to 'src/script/api/game/game_event_types.hpp.sq')
-rw-r--r--src/script/api/game/game_event_types.hpp.sq17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/script/api/game/game_event_types.hpp.sq b/src/script/api/game/game_event_types.hpp.sq
index 25734cdaf..727e90bb1 100644
--- a/src/script/api/game/game_event_types.hpp.sq
+++ b/src/script/api/game/game_event_types.hpp.sq
@@ -249,3 +249,20 @@ void SQGSEventWindowWidgetClick_Register(Squirrel *engine)
SQGSEventWindowWidgetClick.PostRegister(engine);
}
+
+
+template <> const char *GetClassName<ScriptEventGoalQuestionAnswer, ST_GS>() { return "GSEventGoalQuestionAnswer"; }
+
+void SQGSEventGoalQuestionAnswer_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptEventGoalQuestionAnswer, ST_GS> SQGSEventGoalQuestionAnswer("GSEventGoalQuestionAnswer");
+ SQGSEventGoalQuestionAnswer.PreRegister(engine, "GSEvent");
+
+ SQGSEventGoalQuestionAnswer.DefSQStaticMethod(engine, &ScriptEventGoalQuestionAnswer::Convert, "Convert", 2, ".x");
+
+ SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetUniqueID, "GetUniqueID", 1, "x");
+ SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetCompany, "GetCompany", 1, "x");
+ SQGSEventGoalQuestionAnswer.DefSQMethod(engine, &ScriptEventGoalQuestionAnswer::GetButton, "GetButton", 1, "x");
+
+ SQGSEventGoalQuestionAnswer.PostRegister(engine);
+}