You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local wear=0
local divide=0
for i=0,5 do
local add=player:get_inventory({type="detached", name=name.."_armor"}):get_stack("armor",i):get_wear()
if not (add == 0) then
divide=divide+1
end
wear=wear+add
end
formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
formspec = formspec:gsub("armor_level", armor.def[name].level)
formspec = formspec:gsub("armor_wear", 100-((math.floor(wear/(divide*65535)*1000+0.5)/10) or "0").."")
BTW, wear bar would be nice too.
Note you also have to change :
👍 Keep up the good work !!! Great mods !!!
The text was updated successfully, but these errors were encountered: