mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Introduce builtin_shared and use it to fix #4778
Fixes #4778 which was about the error:
ServerError: Lua: Runtime error from mod '' in callback item_OnPlace():
/usr/local/share/minetest/builtin/game/item.lua:278: attempt to call global 'check_attached_node' (a nil value)
The issue was a regression of commit 649448a2a9
"Rename nodeupdate and nodeupdate_single and make them part of the official API"
This commit is contained in:
parent
5f0dc8e78a
commit
afc48c802a
3 changed files with 13 additions and 5 deletions
|
@ -3,10 +3,14 @@ local scriptpath = core.get_builtin_path()..DIR_DELIM
|
|||
local commonpath = scriptpath.."common"..DIR_DELIM
|
||||
local gamepath = scriptpath.."game"..DIR_DELIM
|
||||
|
||||
-- Shared between builtin files, but
|
||||
-- not exposed to outer context
|
||||
local builtin_shared = {}
|
||||
|
||||
dofile(commonpath.."vector.lua")
|
||||
|
||||
dofile(gamepath.."constants.lua")
|
||||
dofile(gamepath.."item.lua")
|
||||
assert(loadfile(gamepath.."item.lua"))(builtin_shared)
|
||||
dofile(gamepath.."register.lua")
|
||||
|
||||
if core.setting_getbool("profiler.load") then
|
||||
|
@ -21,7 +25,7 @@ dofile(gamepath.."auth.lua")
|
|||
dofile(gamepath.."chatcommands.lua")
|
||||
dofile(gamepath.."static_spawn.lua")
|
||||
dofile(gamepath.."detached_inventory.lua")
|
||||
dofile(gamepath.."falling.lua")
|
||||
assert(loadfile(gamepath.."falling.lua"))(builtin_shared)
|
||||
dofile(gamepath.."features.lua")
|
||||
dofile(gamepath.."voxelarea.lua")
|
||||
dofile(gamepath.."forceloading.lua")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue