make sure any expansion node is being replaced with air if it's buildable_to and no other second node is being used as replacement

This commit is contained in:
Tim 2015-01-22 17:41:58 +01:00 committed by Vanessa Ezekowitz
parent 8f0c7c20c6
commit fefb3f9f20
1 changed files with 1 additions and 4 deletions

View File

@ -26,10 +26,7 @@ local function stack(itemstack, placer, fdir, pos, def, pos2, node1, node2)
if is_buildable_to(placer_name, pos, def, pos2) then
local fdir = fdir or minetest.dir_to_facedir(placer:get_look_dir())
minetest.set_node(pos, { name = node1, param2 = fdir })
if node2 then
minetest.set_node(pos2, { name = node2, param2 = fdir })
end
minetest.set_node(pos2, { name = node2 or "air", param2 = node2 and fdir or nil })
-- temporary check if this is a locked node to set its infotext
local nodename = itemstack:get_name()