mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-12-22 12:22:22 +01:00
add formspec auto-upgrade when layout is read
This commit is contained in:
parent
ade365df1b
commit
3bc0eb82fa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user