Make damage touch ignore non-pointables

This commit is contained in:
Aaron Suen 2020-05-26 20:52:54 -04:00
parent 2625f61fd1
commit 8a04c5163b

View File

@ -14,7 +14,8 @@ local function toolcandig(wield, node)
end
nodecore.register_on_register_item(function(_, def)
local dmg = def.groups and def.groups.damage_touch
local dmg = def.pointable ~= false and def.groups
and def.groups.damage_touch
if not (dmg and dmg > 0) then return end
def.on_punch = def.on_punch or function(pos, node, puncher, ...)