Skip to content

Commit

Permalink
Doors: Allow the screwdriver to rotate doors around y-axis.
Browse files Browse the repository at this point in the history
Keep other axis' disabled to prevent the hidden placeholder node to become irremovable to players.
  • Loading branch information
t4im committed Aug 5, 2016
1 parent 6c83ea0 commit 60cf3f8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mods/doors/init.lua
Expand Up @@ -374,9 +374,7 @@ function doors.register(name, def)
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
nodeupdate({x = pos.x, y = pos.y + 1, z = pos.z})
end
def.on_rotate = function(pos, node, user, mode, new_param2)
return false
end
def.on_rotate = screwdriver and screwdriver.rotate_simple or false
if def.protected then
def.can_dig = can_dig_door
Expand Down

1 comment on commit 60cf3f8

@jhcole
Copy link
Contributor

@jhcole jhcole commented on 60cf3f8 Sep 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing the screwdriver to rotate the door like this, fails to rotate the 'Hidden Door Segment' that is in the hinge of the top half of the door. For players, this segment causes unexpected collision with a hidden object (see #1290).

Please sign in to comment.