mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 17:35:37 +02:00
Minor script api fixes/cleanups
This commit is contained in:
@@ -182,10 +182,7 @@ void ServerScripting::InitializeAsync(lua_State *L, int top)
|
||||
LuaSettings::Register(L);
|
||||
|
||||
// globals data
|
||||
lua_getglobal(L, "core");
|
||||
luaL_checktype(L, -1, LUA_TTABLE);
|
||||
auto *data = ModApiBase::getServer(L)->m_async_globals_data.get();
|
||||
script_unpack(L, data);
|
||||
lua_setfield(L, -2, "transferred_globals");
|
||||
lua_pop(L, 1); // pop 'core'
|
||||
lua_setfield(L, top, "transferred_globals");
|
||||
}
|
||||
|
Reference in New Issue
Block a user