diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2018-07-01 14:19:34 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2018-07-01 14:19:34 +0100 |
commit | 04ae3502a571370f68b2ab820e5233117d9a7aaa (patch) | |
tree | fd32bb59fc057455e5898000793f52bc705f8ec4 | |
parent | 40416aa4fdf8cb12c3212e064af3c4d0f6c3a3f8 (diff) |
toolrank check bugfix
-rw-r--r-- | api.lua | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2430,7 +2430,10 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) end if tr then - weapon:add_wear(toolranks.new_afteruse(weapon, hitter, nil, {wear = wear})) + if weapon:get_definition() + and weapon:get_definition().original_description then + weapon:add_wear(toolranks.new_afteruse(weapon, hitter, nil, {wear = wear})) + end else weapon:add_wear(wear) end |