diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-10-21 22:29:18 -0600 |
---|---|---|
committer | FaceDeer <derksenmobile@gmail.com> | 2017-10-21 22:29:18 -0600 |
commit | 94ccab9c391f0a08e9382220112a9546a108d3fd (patch) | |
tree | f5dab01bbf6e1e277694f190cb48518600499a87 /util_execute_cycle.lua | |
parent | e93ff0595617ebfb7b4498519538c38787a9aa16 (diff) |
add automation option to item ejector
Diffstat (limited to 'util_execute_cycle.lua')
-rw-r--r-- | util_execute_cycle.lua | 10 |
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 |