diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 21:03:17 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 21:03:17 +0000 |
commit | 3ada3b9cc5b63a593c2b2655aafedbcbdedcd041 (patch) | |
tree | 0b51e7b529ea4eabc3cd74a3a6b749a6526bca32 /src/script/api/game | |
parent | 084f4e6aacc9b3ad8f6ac319a55027307cfa5f00 (diff) | |
download | openttd-3ada3b9cc5b63a593c2b2655aafedbcbdedcd041.tar.xz |
(svn r23630) -Add: a Goal GUI to show your current goals
Diffstat (limited to 'src/script/api/game')
-rw-r--r-- | src/script/api/game/game_goal.hpp.sq | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/script/api/game/game_goal.hpp.sq b/src/script/api/game/game_goal.hpp.sq new file mode 100644 index 000000000..54b1c6aeb --- /dev/null +++ b/src/script/api/game/game_goal.hpp.sq @@ -0,0 +1,36 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. + */ + +/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */ + +#include "../script_goal.hpp" +#include "../template/template_goal.hpp.sq" + + +template <> const char *GetClassName<ScriptGoal, ST_GS>() { return "GSGoal"; } + +void SQGSGoal_Register(Squirrel *engine) +{ + DefSQClass<ScriptGoal, ST_GS> SQGSGoal("GSGoal"); + 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.PostRegister(engine); +} |