summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-10-12 23:07:48 -0600
committerFaceDeer <derksenmobile@gmail.com>2017-10-12 23:07:48 -0600
commit1aa88e526437aeffc4ca846fa7039d1a22225ad0 (patch)
tree11946936b922c9789ebb7ce58330cea857fc7d01
parentd582f106aa4f1be3bda41113a4893c39d35223a7 (diff)
allow digtrons to dig undefined nodes without crashingorigin/more_technic
-rw-r--r--util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.lua b/util.lua
index 07d41ba..05c6c79 100644
--- a/util.lua
+++ b/util.lua
@@ -46,7 +46,7 @@ digtron.mark_diggable = function(pos, nodes_dug)
end
local targetdef = minetest.registered_nodes[target.name]
- if targetdef.can_dig == nil or targetdef.can_dig(pos, player) then
+ if targetdef == nil or targetdef.can_dig == nil or targetdef.can_dig(pos, player) then
nodes_dug:set(pos.x, pos.y, pos.z, true)
if target.name ~= "air" then
local in_known_group = false