mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-17 22:09:34 +01:00
Close formspecs when double chest breaks
This commit is contained in:
parent
79a3eb23a7
commit
c6efa8a626
1 changed files with 6 additions and 0 deletions
|
@ -220,6 +220,9 @@ minetest.register_node("mcl_chests:"..basename.."_left", {
|
|||
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_right" then
|
||||
return
|
||||
end
|
||||
for pl=1, #players do
|
||||
minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..p.x.."_"..p.y.."_"..p.z)
|
||||
end
|
||||
minetest.swap_node(p, { name = "mcl_chests:"..basename, param2 = param2 })
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
|
@ -341,6 +344,9 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
|
|||
if not p or minetest.get_node(p).name ~= "mcl_chests:"..basename.."_left" then
|
||||
return
|
||||
end
|
||||
for pl=1, #players do
|
||||
minetest.close_formspec(players[pl]:get_player_name(), "mcl_chests:"..formspec_basename.."_"..p.x.."_"..p.y.."_"..p.z)
|
||||
end
|
||||
minetest.swap_node(p, { name = "mcl_chests:"..basename, param2 = param2 })
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
|
|
Loading…
Reference in a new issue