Skip to content

Commit

Permalink
Fix for minetest-mods#75 (Digtron digs nodes which are marked as 'dig…
Browse files Browse the repository at this point in the history
…gable = false')
  • Loading branch information
joe7575 committed Dec 14, 2020
1 parent 843dbd2 commit 488ecc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ digtron.mark_diggable = function(pos, nodes_dug, player)
end

local targetdef = minetest.registered_nodes[target.name]

if targetdef.diggable == false then return 0 end

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
Expand Down

0 comments on commit 488ecc2

Please sign in to comment.