Update: Translations from eints
[openttd-github.git] / src / script / api / game / game_controller.hpp.sq
blobcbf61b89cd79fbabd3b22b9a99a8c4bb2b6d264c
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
8 #include "../script_controller.hpp"
10 template <> const char *GetClassName<ScriptController, ScriptType::GS>() { return "GSController"; }
12 void SQGSController_Register(Squirrel *engine)
14 DefSQClass<ScriptController, ScriptType::GS> SQGSController("GSController");
15 SQGSController.PreRegister(engine);
17 SQGSController.DefSQStaticMethod(engine, &ScriptController::GetTick, "GetTick", 1, ".");
18 SQGSController.DefSQStaticMethod(engine, &ScriptController::GetOpsTillSuspend, "GetOpsTillSuspend", 1, ".");
19 SQGSController.DefSQStaticMethod(engine, &ScriptController::SetCommandDelay, "SetCommandDelay", 2, ".i");
20 SQGSController.DefSQStaticMethod(engine, &ScriptController::Sleep, "Sleep", 2, ".i");
21 SQGSController.DefSQStaticMethod(engine, &ScriptController::Break, "Break", 2, ".s");
22 SQGSController.DefSQStaticMethod(engine, &ScriptController::GetSetting, "GetSetting", 2, ".s");
23 SQGSController.DefSQStaticMethod(engine, &ScriptController::GetVersion, "GetVersion", 1, ".");
24 SQGSController.DefSQStaticMethod(engine, &ScriptController::Print, "Print", 3, ".bs");
26 SQGSController.PostRegister(engine);
28 /* Register the import statement to the global scope */
29 SQGSController.DefSQStaticMethod(engine, &ScriptController::Import, "import", 4, ".ssi");