Make damage touch ignore non-pointables
This commit is contained in:
parent
2625f61fd1
commit
8a04c5163b
@ -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, ...)
|
||||
|
Loading…
x
Reference in New Issue
Block a user