mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Minor script api fixes/cleanups
This commit is contained in:
parent
5b6bc8a12b
commit
524d446757
11 changed files with 37 additions and 36 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue