diff options
author | truebrain <truebrain@openttd.org> | 2012-01-03 16:36:24 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2012-01-03 16:36:24 +0000 |
commit | 34d90da509a27c4abe35c11d7f034b1e386cd968 (patch) | |
tree | 552a11c264ee5b26ad849818f50f45bf9927735c /src/script/api/game/game_event_types.hpp.sq | |
parent | 18ac3f2bd89aa11fefa64bdada287a72937ab8d5 (diff) | |
download | openttd-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.sq | 17 |
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); +} |