forked from mtcontrib/mobs_redo
toolrank check bugfix
This commit is contained in:
parent
40416aa4fd
commit
04ae3502a5
3
api.lua
3
api.lua
@ -2430,7 +2430,10 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if tr then
|
if tr then
|
||||||
|
if weapon:get_definition()
|
||||||
|
and weapon:get_definition().original_description then
|
||||||
weapon:add_wear(toolranks.new_afteruse(weapon, hitter, nil, {wear = wear}))
|
weapon:add_wear(toolranks.new_afteruse(weapon, hitter, nil, {wear = wear}))
|
||||||
|
end
|
||||||
else
|
else
|
||||||
weapon:add_wear(wear)
|
weapon:add_wear(wear)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user