mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-27 03:37:31 +01:00
Close formspecs when double chest breaks
This commit is contained in:
parent
79a3eb23a7
commit
c6efa8a626
@ -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 New Issue
Block a user