Remove FPS from being next to the version string
[oweals/minetest.git] / src / script / scripting_game.cpp
index 12baac032b94f3efc6c1c18c4782ddf82cc19700..e716bc979489bc357617ec2f2d8f4cce73ff95d8 100644 (file)
@@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "scripting_game.h"
+#include "server.h"
 #include "log.h"
 #include "cpp_api/s_internal.h"
 #include "lua_api/l_base.h"
@@ -50,14 +51,9 @@ GameScripting::GameScripting(Server* server)
 
        //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);
@@ -70,6 +66,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;
 }
 
@@ -98,3 +98,8 @@ void GameScripting::InitializeModApi(lua_State *L, int top)
        ObjectRef::Register(L);
        LuaSettings::Register(L);
 }
+
+void log_deprecated(std::string message)
+{
+       log_deprecated(NULL,message);
+}