diff options
Diffstat (limited to 'src/script/clientscripting.cpp')
-rw-r--r-- | src/script/clientscripting.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/script/clientscripting.cpp b/src/script/clientscripting.cpp index ccdcb928d..1b73fdf0d 100644 --- a/src/script/clientscripting.cpp +++ b/src/script/clientscripting.cpp @@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "client.h" #include "cpp_api/s_internal.h" #include "lua_api/l_client.h" +#include "lua_api/l_minimap.h" #include "lua_api/l_storage.h" #include "lua_api/l_sound.h" #include "lua_api/l_util.h" @@ -40,9 +41,14 @@ ClientScripting::ClientScripting(Client *client): lua_getglobal(L, "core"); int top = lua_gettop(L); + lua_newtable(L); + lua_setfield(L, -2, "ui"); + InitializeModApi(L, top); lua_pop(L, 1); + LuaMinimap::create(L, client->getMinimap()); + // Push builtin initialization type lua_pushstring(L, "client"); lua_setglobal(L, "INIT"); @@ -59,4 +65,5 @@ void ClientScripting::InitializeModApi(lua_State *L, int top) LuaItemStack::Register(L); StorageRef::Register(L); + LuaMinimap::Register(L); } |