mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-12-22 20:32:22 +01:00
allow digtrons to dig undefined nodes without crashing
This commit is contained in:
parent
d582f106aa
commit
1aa88e5264
2
util.lua
2
util.lua
@ -46,7 +46,7 @@ digtron.mark_diggable = function(pos, nodes_dug)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local targetdef = minetest.registered_nodes[target.name]
|
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)
|
nodes_dug:set(pos.x, pos.y, pos.z, true)
|
||||||
if target.name ~= "air" then
|
if target.name ~= "air" then
|
||||||
local in_known_group = false
|
local in_known_group = false
|
||||||
|
Loading…
Reference in New Issue
Block a user