diff options
Diffstat (limited to 'src/scripting')
-rw-r--r-- | src/scripting/lua.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 273bdf42..9eca2df6 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -2239,8 +2239,9 @@ LuaScript::LuaScript(): { "announce", &announce }, { NULL, NULL } }; - luaL_register(mRootState, "mana", callbacks); - lua_pop(mRootState, 1); // pop the 'mana' table + lua_pushvalue(mRootState, LUA_GLOBALSINDEX); + luaL_register(mRootState, NULL, callbacks); + lua_pop(mRootState, 1); // pop the globals table static luaL_Reg const members_ItemClass[] = { { "on", &item_class_on }, |