summaryrefslogtreecommitdiff
path: root/src/script
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/script
parent492c96d2145841ff24713422ee08d1560c0616ef (diff)
downloadopenttd-d03bbdd4acc3fb160c29a5bc03d202bb89b008a2.tar.xz
(svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs)
Diffstat (limited to 'src/script')
-rw-r--r--src/script/squirrel.hpp1
-rw-r--r--src/script/squirrel_helper.hpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/script/squirrel.hpp b/src/script/squirrel.hpp
index 9dd8b3e4f..163d9b655 100644
--- a/src/script/squirrel.hpp
+++ b/src/script/squirrel.hpp
@@ -58,6 +58,7 @@ protected:
public:
friend class AIScanner;
friend class AIInstance;
+ friend class AIController;
friend void squirrel_register_std(Squirrel *engine);
Squirrel();
diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp
index 29deba674..a5a242539 100644
--- a/src/script/squirrel_helper.hpp
+++ b/src/script/squirrel_helper.hpp
@@ -92,6 +92,7 @@ namespace SQConvert {
template <> inline int Return<char *> (HSQUIRRELVM vm, char *res) { if (res == NULL) sq_pushnull(vm); else { sq_pushstring(vm, OTTD2SQ(res), -1); free(res); } return 1; }
template <> inline int Return<const char *>(HSQUIRRELVM vm, const char *res) { if (res == NULL) sq_pushnull(vm); else { sq_pushstring(vm, OTTD2SQ(res), -1); } return 1; }
template <> inline int Return<void *> (HSQUIRRELVM vm, void *res) { sq_pushuserpointer(vm, res); return 1; }
+ template <> inline int Return<HSQOBJECT> (HSQUIRRELVM vm, HSQOBJECT res) { sq_pushobject(vm, res); return 1; }
/**
* To get a param from squirrel, we call this function. It converts to the right format.