From d4f7de464007dfc4d8842f21625a0ca00a1c8218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Mart=C3=ADnez?= Date: Fri, 22 Mar 2013 14:37:44 -0300 Subject: [PATCH] fix wrong check for protection on node placement --- signs_lib.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/signs_lib.lua b/signs_lib.lua index 2a672b6..09504a3 100644 --- a/signs_lib.lua +++ b/signs_lib.lua @@ -144,11 +144,6 @@ minetest.register_node(":default:sign_wall", { itemstack:take_item() return itemstack elseif wdir == 1 then - local def = minetest.registered_nodes[minetest.env:get_node(pointed_thing.above).name] - if homedecor_node_is_owned(pointed_thing.above, placer) - or (not def.buildable_to) then - return - end minetest.env:add_node(above, {name = "signs:sign_yard", param2 = fdir}) sign_info = signs_yard[fdir + 1] else @@ -156,6 +151,12 @@ minetest.register_node(":default:sign_wall", { sign_info = signs[fdir + 1] end + local def = minetest.registered_nodes[minetest.env:get_node(pointed_thing.above).name] + if homedecor_node_is_owned(pointed_thing.above, placer) + or (not def.buildable_to) then + return + end + local text = minetest.env:add_entity({x = above.x + sign_info.delta.x, y = above.y + sign_info.delta.y, z = above.z + sign_info.delta.z}, "signs:text")