From a43a6bcdeff2f6d7656164da2aaa28967dd52e57 Mon Sep 17 00:00:00 2001 From: tour <129965577+a-tour-ist@users.noreply.github.com> Date: Sat, 6 Apr 2024 22:34:20 +0200 Subject: [PATCH] fix crash from default.chest.register_chest --- mods/default/chests.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/default/chests.lua b/mods/default/chests.lua index 1c1ce051..1c97b73a 100644 --- a/mods/default/chests.lua +++ b/mods/default/chests.lua @@ -297,9 +297,10 @@ function default.chest.register_chest(prefixed_name, d) end -- close opened chests on load + local modname, chestname = prefixed_name:match("^(:?.-):(.*)$") minetest.register_lbm({ label = "close opened chests on load", - name = "default:close_" .. prefixed_name:gsub(":", "_") .. "_open", + name = modname .. ":close_" .. chestname .. "_open", nodenames = {prefixed_name .. "_open"}, run_at_every_load = true, action = function(pos, node)