summaryrefslogtreecommitdiff
path: root/upgrades.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-10-21 22:29:18 -0600
committerFaceDeer <derksenmobile@gmail.com>2017-10-21 22:29:18 -0600
commit94ccab9c391f0a08e9382220112a9546a108d3fd (patch)
treef5dab01bbf6e1e277694f190cb48518600499a87 /upgrades.lua
parente93ff0595617ebfb7b4498519538c38787a9aa16 (diff)
add automation option to item ejector
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
})