Remove vertical expansion on standing lamp

use new API function to handle the second-node air
This commit is contained in:
kilbith 2015-01-24 18:25:30 +01:00 committed by Vanessa Ezekowitz
parent 9ffe942e61
commit fc436a1a1c

View File

@ -367,15 +367,12 @@ local function reg_lamp(suffix, nxt, tilesuffix, light, color)
}, },
selection_box = slamp_cbox, selection_box = slamp_cbox,
collision_box = slamp_cbox, collision_box = slamp_cbox,
on_place = function(itemstack, placer, pointed_thing)
return homedecor.place_vertically(itemstack, placer, pointed_thing,
"homedecor:standing_lamp"..lampcolor.."_"..suffix)
end,
on_punch = function(pos, node, puncher) on_punch = function(pos, node, puncher)
node.name = "homedecor:standing_lamp"..lampcolor.."_"..repl[suffix] node.name = "homedecor:standing_lamp"..lampcolor.."_"..repl[suffix]
minetest.set_node(pos, node) minetest.set_node(pos, node)
nodeupdate(pos) nodeupdate(pos)
end, end,
expand = { top="air" },
}) })
-- "bottom" in the node name is obsolete now, as "top" node doesn't exist anymore. -- "bottom" in the node name is obsolete now, as "top" node doesn't exist anymore.