diff options
Diffstat (limited to 'class_layout.lua')
-rw-r--r-- | class_layout.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/class_layout.lua b/class_layout.lua index 0aa139e..63ce529 100644 --- a/class_layout.lua +++ b/class_layout.lua @@ -6,9 +6,13 @@ DigtronLayout.__index = DigtronLayout local get_node_image = function(pos, node) local node_image = {node=node, pos={x=pos.x, y=pos.y, z=pos.z}} - node_image.paramtype2 = minetest.registered_nodes[node.name].paramtype2 + local node_def = minetest.registered_nodes[node.name] + node_image.paramtype2 = node_def.paramtype2 local meta = minetest.get_meta(pos) node_image.meta = meta:to_table() + if node_image.meta ~= nil then + node_image.meta.fields.formspec = node_def._digtron_formspec -- causes formspec to be automatically upgraded whenever Digtron moves + end -- Record what kind of thing we've got in a builder node so its facing can be rotated properly if minetest.get_item_group(node.name, "digtron") == 4 then @@ -86,7 +90,7 @@ function DigtronLayout.create(pos, player) self.water_touching = true elseif minetest.get_item_group(node.name, "lava") ~= 0 then self.lava_touching = true - if digtron.lava_impassible == true then + if digtron.config.lava_impassible then self.protected:set(testpos.x, testpos.y, testpos.z, true) end end |