summaryrefslogtreecommitdiff
path: root/util_execute_cycle.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-13 23:20:59 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-01-13 23:20:59 -0700
commitf0e09f136a40efa7ebf41db880693b67b3f9f628 (patch)
tree2f4da7f7ceddcd3afbf3ca74dc0a0557241f8d29 /util_execute_cycle.lua
parent13c74064be93278460f70e1f3c04a11a8ef4fb5f (diff)
Add dual digger heads for eventual use with diagonal movement
Diffstat (limited to 'util_execute_cycle.lua')
-rw-r--r--util_execute_cycle.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util_execute_cycle.lua b/util_execute_cycle.lua
index 1cd8e2c..e029692 100644
--- a/util_execute_cycle.lua
+++ b/util_execute_cycle.lua
@@ -116,7 +116,7 @@ digtron.execute_dig_cycle = function(pos, clicker)
local targetdef = minetest.registered_nodes[target.name]
if targetdef.execute_dig ~= nil then
local fuel_cost, dropped = targetdef.execute_dig(location.pos, layout.protected, layout.nodes_dug, controlling_coordinate)
- if dropped ~= nil then
+ if table.getn(dropped) > 0 then
for _, itemname in pairs(dropped) do
table.insert(items_dropped, itemname)
end
@@ -230,7 +230,7 @@ digtron.execute_dig_cycle = function(pos, clicker)
local target = minetest.get_node(location.pos)
local targetdef = minetest.registered_nodes[target.name]
if targetdef.damage_creatures ~= nil then
- targetdef.damage_creatures(clicker, location.pos, digtron.find_new_pos(location.pos, target.param2), controlling_coordinate)
+ targetdef.damage_creatures(clicker, location.pos, controlling_coordinate)
end
end
end