Skip to content

Commit

Permalink
fix crash from default.chest.register_chest
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tour-ist authored and sfan5 committed Apr 7, 2024
1 parent 16c663f commit a43a6bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mods/default/chests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a43a6bc

Please sign in to comment.