*/
#include "scripting_game.h"
+#include "server.h"
#include "log.h"
#include "cpp_api/s_internal.h"
#include "lua_api/l_base.h"
//TODO add security
- luaL_openlibs(getStack());
-
SCRIPTAPI_PRECHECKHEADER
- // Create the main minetest table
- lua_newtable(L);
- lua_setglobal(L, "minetest");
- lua_getglobal(L, "minetest");
+ lua_getglobal(L, "core");
int top = lua_gettop(L);
lua_newtable(L);
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;
}