0
0
Fork 0

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
1 changed files with 6 additions and 0 deletions

View File

@ -211,6 +211,12 @@ minetest.register_node("signs:sign_wall", {
y = under.y - above.y, y = under.y - above.y,
z = under.z - above.z} 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 wdir = minetest.dir_to_wallmounted(dir)
local placer_pos = placer:getpos() local placer_pos = placer:getpos()