mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-03-14 20:01:24 +00:00
fix crash from default.chest.register_chest
This commit is contained in:
parent
16c663f87e
commit
a43a6bcdef
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue