Fix sign being able to destroy block when building

This commit is contained in:
Wuzzy 2017-02-21 23:05:57 +01:00
parent 89e3115753
commit 27ee14b291

View File

@ -211,6 +211,12 @@ minetest.register_node("signs:sign_wall", {
y = under.y - above.y,
z = under.z - above.z}
-- Only build when it's legal
local abovenodedef = minetest.registered_nodes[minetest.get_node(above)]
if not abovenodedef or abovenodedef.buildable_to == false then
return itemstack
end
local wdir = minetest.dir_to_wallmounted(dir)
local placer_pos = placer:getpos()