From 6c70e0295a89a0ec0468a6326daa20a9adb359cf Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Fri, 1 Mar 2013 17:40:26 +0100 Subject: [PATCH] Dont place doors if node under it has on_rightclick --- mods/doors/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 5a139cef..0de6d18a 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -41,6 +41,13 @@ function doors:register_door(name, def) if not pointed_thing.type == "node" then return itemstack end + + local ptu = pointed_thing.under + local nu = minetest.env:get_node(ptu) + if minetest.registered_nodes[nu.name].on_rightclick then + return minetest.registered_nodes[nu.name].on_rightclick(ptu, nu, placer, itemstack) + end + local pt = pointed_thing.above local pt2 = {x=pt.x, y=pt.y, z=pt.z} pt2.y = pt2.y+1