aboutsummaryrefslogtreecommitdiff
path: root/src/script/scripting_game.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-04-27 17:55:49 -0400
committerShadowNinja <shadowninja@minetest.net>2014-05-07 17:14:23 -0400
commit1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528 (patch)
tree8c1e2c708f567656684e89faee4f7c8e6c5ec673 /src/script/scripting_game.cpp
parentfef2729fd0945601e6772780514ee55fec35b068 (diff)
downloadminetest-1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528.tar.gz
minetest-1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528.tar.bz2
minetest-1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528.zip
Organize builtin into subdirectories
Diffstat (limited to 'src/script/scripting_game.cpp')
-rw-r--r--src/script/scripting_game.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/script/scripting_game.cpp b/src/script/scripting_game.cpp
index b2c2150c6..fccd10722 100644
--- a/src/script/scripting_game.cpp
+++ b/src/script/scripting_game.cpp
@@ -18,6 +18,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "scripting_game.h"
+#include "server.h"
+#include "filesys.h"
#include "log.h"
#include "cpp_api/s_internal.h"
#include "lua_api/l_base.h"
@@ -54,6 +56,9 @@ GameScripting::GameScripting(Server* server)
SCRIPTAPI_PRECHECKHEADER
+ lua_pushstring(L, DIR_DELIM);
+ lua_setglobal(L, "DIR_DELIM");
+
// Create the main minetest table
lua_newtable(L);
lua_setglobal(L, "minetest");
@@ -70,6 +75,10 @@ GameScripting::GameScripting(Server* server)
InitializeModApi(L, top);
lua_pop(L, 1);
+ // Push builtin initialization type
+ lua_pushstring(L, "game");
+ lua_setglobal(L, "INIT");
+
infostream << "SCRIPTAPI: Initialized game modules" << std::endl;
}