fix metadata loss on rotate

use swap_node() instead of set_node() so locked chests can be used again after rotation
This commit is contained in:
Thomas Rudin 2018-11-27 20:47:37 +01:00
parent f37b21e632
commit f2fff77e90

@ -122,7 +122,7 @@ end
-- when they are updated. -- when they are updated.
function pipeworks.on_rotate(pos, node, user, mode, new_param2) function pipeworks.on_rotate(pos, node, user, mode, new_param2)
node.param2 = new_param2 node.param2 = new_param2
minetest.set_node(pos, node) minetest.swap_node(pos, node)
pipeworks.scan_for_tube_objects(pos) pipeworks.scan_for_tube_objects(pos)
return true return true
end end