Update: Translations from eints
[openttd-github.git] / src / script / api / ai / ai_controller.hpp.sq
blobd37cb75b51c36b814fbfd30c6aa1df710da8bc11
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::AI>() { return "AIController"; }
12 void SQAIController_Register(Squirrel *engine)
14 DefSQClass<ScriptController, ScriptType::AI> SQAIController("AIController");
15 SQAIController.PreRegister(engine);
17 SQAIController.DefSQStaticMethod(engine, &ScriptController::GetTick, "GetTick", 1, ".");
18 SQAIController.DefSQStaticMethod(engine, &ScriptController::GetOpsTillSuspend, "GetOpsTillSuspend", 1, ".");
19 SQAIController.DefSQStaticMethod(engine, &ScriptController::SetCommandDelay, "SetCommandDelay", 2, ".i");
20 SQAIController.DefSQStaticMethod(engine, &ScriptController::Sleep, "Sleep", 2, ".i");
21 SQAIController.DefSQStaticMethod(engine, &ScriptController::Break, "Break", 2, ".s");
22 SQAIController.DefSQStaticMethod(engine, &ScriptController::GetSetting, "GetSetting", 2, ".s");
23 SQAIController.DefSQStaticMethod(engine, &ScriptController::GetVersion, "GetVersion", 1, ".");
24 SQAIController.DefSQStaticMethod(engine, &ScriptController::Print, "Print", 3, ".bs");
26 SQAIController.PostRegister(engine);
28 /* Register the import statement to the global scope */
29 SQAIController.DefSQStaticMethod(engine, &ScriptController::Import, "import", 4, ".ssi");