summaryrefslogtreecommitdiff
path: root/util_execute_cycle.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 /util_execute_cycle.lua
parente93ff0595617ebfb7b4498519538c38787a9aa16 (diff)
add automation option to item ejector
Diffstat (limited to 'util_execute_cycle.lua')
-rw-r--r--util_execute_cycle.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/util_execute_cycle.lua b/util_execute_cycle.lua
index de0ad1a..3997395 100644
--- a/util_execute_cycle.lua
+++ b/util_execute_cycle.lua
@@ -319,6 +319,16 @@ digtron.execute_dig_cycle = function(pos, clicker)
minetest.log(string.format("%s has builder group but is missing execute_build method! This is an error in mod programming, file a bug.", targetdef.name))
end
end
+
+ for k, location in pairs(layout.auto_ejectors) do
+ local target = minetest.get_node(location.pos)
+ local targetdef = minetest.registered_nodes[target.name]
+ if targetdef.execute_eject ~= nil then
+ targetdef.execute_eject(location.pos, target, clicker)
+ else
+ minetest.log(string.format("%s has an ejector group but is missing execute_eject method! This is an error in mod programming, file a bug.", targetdef.name))
+ end
+ end
local status_text = ""
if strange_failure then