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_goal.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_goal.hpp.sq')
-rw-r--r-- | src/script/api/game/game_goal.hpp.sq | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/src/script/api/game/game_goal.hpp.sq b/src/script/api/game/game_goal.hpp.sq index 54b1c6aeb..22ed685b6 100644 --- a/src/script/api/game/game_goal.hpp.sq +++ b/src/script/api/game/game_goal.hpp.sq @@ -21,16 +21,36 @@ void SQGSGoal_Register(Squirrel *engine) SQGSGoal.PreRegister(engine); SQGSGoal.AddConstructor<void (ScriptGoal::*)(), 1>(engine, "x"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GOAL_INVALID, "GOAL_INVALID"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_NONE, "GT_NONE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TILE, "GT_TILE"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_INDUSTRY, "GT_INDUSTRY"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TOWN, "GT_TOWN"); - SQGSGoal.DefSQConst(engine, ScriptGoal::GT_COMPANY, "GT_COMPANY"); - - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsValidGoal, "IsValidGoal", 2, ".i"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::New, "New", 5, ".i.ii"); - SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Remove, "Remove", 2, ".i"); + SQGSGoal.DefSQConst(engine, ScriptGoal::GOAL_INVALID, "GOAL_INVALID"); + SQGSGoal.DefSQConst(engine, ScriptGoal::GT_NONE, "GT_NONE"); + SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TILE, "GT_TILE"); + SQGSGoal.DefSQConst(engine, ScriptGoal::GT_INDUSTRY, "GT_INDUSTRY"); + SQGSGoal.DefSQConst(engine, ScriptGoal::GT_TOWN, "GT_TOWN"); + SQGSGoal.DefSQConst(engine, ScriptGoal::GT_COMPANY, "GT_COMPANY"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CANCEL, "BUTTON_CANCEL"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_OK, "BUTTON_OK"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_NO, "BUTTON_NO"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_YES, "BUTTON_YES"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_DECLINE, "BUTTON_DECLINE"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_ACCEPT, "BUTTON_ACCEPT"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_IGNORE, "BUTTON_IGNORE"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_RETRY, "BUTTON_RETRY"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_PREVIOUS, "BUTTON_PREVIOUS"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_NEXT, "BUTTON_NEXT"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_STOP, "BUTTON_STOP"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_START, "BUTTON_START"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_GO, "BUTTON_GO"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CONTINUE, "BUTTON_CONTINUE"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_RESTART, "BUTTON_RESTART"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_POSTPONE, "BUTTON_POSTPONE"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_SURRENDER, "BUTTON_SURRENDER"); + SQGSGoal.DefSQConst(engine, ScriptGoal::BUTTON_CLOSE, "BUTTON_CLOSE"); + + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::IsValidGoal, "IsValidGoal", 2, ".i"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::New, "New", 5, ".i.ii"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Remove, "Remove", 2, ".i"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::Question, "Question", 5, ".ii.i"); + SQGSGoal.DefSQStaticMethod(engine, &ScriptGoal::CloseQuestion, "CloseQuestion", 2, ".i"); SQGSGoal.PostRegister(engine); } |