summaryrefslogtreecommitdiff
path: root/upgrades.lua
diff options
context:
space:
mode:
Diffstat (limited to 'upgrades.lua')
-rw-r--r--upgrades.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/upgrades.lua b/upgrades.lua
index 8f0c6fb..dc19053 100644
--- a/upgrades.lua
+++ b/upgrades.lua
@@ -4,8 +4,10 @@ minetest.register_lbm({
nodenames = {"group:digtron"},
action = function(pos, node)
local node_def = minetest.registered_nodes[node.name]
- local meta = minetest.get_meta(pos)
- meta:set_string("formspec", node_def._digtron_formspec)
+ if node_def._digtron_formspec then
+ local meta = minetest.get_meta(pos)
+ meta:set_string("formspec", node_def._digtron_formspec(pos, meta))
+ end
end
})