mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-03-21 15:21:21 +00:00
Fixed doors - rightclick
When the wielded object is a door, call on_rightclick instead of place a door
This commit is contained in:
parent
230747c748
commit
84f50621fd
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ function doors:register_door(name, def)
|
||||||
if not pointed_thing.type == "node" then
|
if not pointed_thing.type == "node" then
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].on_rightclick then
|
||||||
|
minetest.registered_nodes[nn].on_rightclick(pointed_thing.under, n, placer)
|
||||||
|
return
|
||||||
|
end
|
||||||
local pt = pointed_thing.above
|
local pt = pointed_thing.above
|
||||||
local pt2 = {x=pt.x, y=pt.y, z=pt.z}
|
local pt2 = {x=pt.x, y=pt.y, z=pt.z}
|
||||||
pt2.y = pt2.y+1
|
pt2.y = pt2.y+1
|
||||||
|
|
Loading…
Add table
Reference in a new issue