From 1aa88e526437aeffc4ca846fa7039d1a22225ad0 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Thu, 12 Oct 2017 23:07:48 -0600 Subject: allow digtrons to dig undefined nodes without crashing --- util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3