mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 13:45:09 +00:00
Allow to place doors at usable nodes with sneak-click
This commit is contained in:
parent
63e25b4e09
commit
4bb1fad63d
1 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,8 @@ function mcl_doors:register_door(name, def)
|
|||
end
|
||||
local ptu = pointed_thing.under
|
||||
local nu = minetest.get_node(ptu)
|
||||
if minetest.registered_nodes[nu.name].on_rightclick then
|
||||
-- Pointed thing's rightclick action takes precedence, unless player holds down the sneak key
|
||||
if minetest.registered_nodes[nu.name].on_rightclick and not placer:get_player_control().sneak then
|
||||
return minetest.registered_nodes[nu.name].on_rightclick(ptu, nu, placer, itemstack)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue