Doors: Allow the screwdriver to rotate doors around y-axis.

Keep other axis' disabled to prevent the hidden placeholder node to become irremovable to players.
This commit is contained in:
Tim 2016-08-02 20:10:57 +02:00
parent 6c83ea0b48
commit 60cf3f85b6

@ -374,9 +374,7 @@ function doors.register(name, def)
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
nodeupdate({x = pos.x, y = pos.y + 1, z = pos.z}) nodeupdate({x = pos.x, y = pos.y + 1, z = pos.z})
end end
def.on_rotate = function(pos, node, user, mode, new_param2) def.on_rotate = screwdriver and screwdriver.rotate_simple or false
return false
end
if def.protected then if def.protected then
def.can_dig = can_dig_door def.can_dig = can_dig_door