summaryrefslogtreecommitdiff
path: root/src/script/scripting_game.cpp
diff options
context:
space:
mode:
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;
}