summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_controller.hpp.sq
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-11-23 13:39:36 +0000
committertruebrain <truebrain@openttd.org>2011-11-23 13:39:36 +0000
commitd03bbdd4acc3fb160c29a5bc03d202bb89b008a2 (patch)
tree117966d4cd0ba014e4023ed27e6649b74dddd799 /src/ai/api/ai_controller.hpp.sq
parent492c96d2145841ff24713422ee08d1560c0616ef (diff)
downloadopenttd-d03bbdd4acc3fb160c29a5bc03d202bb89b008a2.tar.xz
(svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs)
Diffstat (limited to 'src/ai/api/ai_controller.hpp.sq')
-rw-r--r--src/ai/api/ai_controller.hpp.sq5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ai/api/ai_controller.hpp.sq b/src/ai/api/ai_controller.hpp.sq
index 8a0e70ccd..26b627c7b 100644
--- a/src/ai/api/ai_controller.hpp.sq
+++ b/src/ai/api/ai_controller.hpp.sq
@@ -15,6 +15,7 @@ void SQAIController_Register(Squirrel *engine)
{
DefSQClass <AIController> SQAIController("AIController");
SQAIController.PreRegister(engine);
+
SQAIController.DefSQStaticMethod(engine, &AIController::GetTick, "GetTick", 1, ".");
SQAIController.DefSQStaticMethod(engine, &AIController::GetOpsTillSuspend, "GetOpsTillSuspend", 1, ".");
SQAIController.DefSQStaticMethod(engine, &AIController::SetCommandDelay, "SetCommandDelay", 2, ".i");
@@ -22,5 +23,9 @@ void SQAIController_Register(Squirrel *engine)
SQAIController.DefSQStaticMethod(engine, &AIController::GetSetting, "GetSetting", 2, ".s");
SQAIController.DefSQStaticMethod(engine, &AIController::GetVersion, "GetVersion", 1, ".");
SQAIController.DefSQStaticMethod(engine, &AIController::Print, "Print", 3, ".bs");
+
SQAIController.PostRegister(engine);
+
+ /* Register the import statement to the global scope */
+ SQAIController.DefSQStaticMethod(engine, &AIController::Import, "import", 4, ".ssi");
}