Use add_wear_by_uses to fix incorrect uses counts (#2959)

This commit is contained in:
Wuzzy 2022-06-04 16:43:21 +00:00 committed by GitHub
parent b4392aeb1f
commit d7dd15782c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -141,7 +141,7 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses)
end
if not minetest.is_creative_enabled(player_name) then
itemstack:add_wear(65535 / ((uses or 200) - 1))
itemstack:add_wear_by_uses(uses or 200)
end
return itemstack