rewrite the node stacking/expansion code, preventing a crash building on unknown nodes, and reduce table lookups and overall code

This commit is contained in:
Tim
2015-01-22 15:19:50 +01:00
committed by Vanessa Ezekowitz
parent b4b281d9ea
commit 0a0c558c3a
4 changed files with 88 additions and 177 deletions

View File

@@ -456,7 +456,7 @@ local function reg_lamp(suffix, nxt, tilesuffix, light, color)
selection_box = slamp_cbox,
collision_box = slamp_cbox,
on_place = function(itemstack, placer, pointed_thing)
return homedecor.place_twonode_vertical(itemstack, placer, pointed_thing,
return homedecor.place_vertically(itemstack, placer, pointed_thing,
"homedecor:standing_lamp"..lampcolor.."_"..suffix)
end,
on_punch = function(pos, node, puncher)