Simplify previous commit

This commit is contained in:
stujones11 2015-12-04 20:36:42 +00:00
parent 64ec3dcf93
commit 991d2955e0

View File

@ -171,10 +171,7 @@ armor.set_player_armor = function(self, player)
if v == false then if v == false then
local level = def.groups["armor_"..k] local level = def.groups["armor_"..k]
if level then if level then
local texture = def.texture local texture = def.texture or item:gsub("%:", "_")
if not texture then
texture = item:gsub("%:", "_")
end
table.insert(textures, texture..".png") table.insert(textures, texture..".png")
preview = preview.."^"..texture.."_preview.png" preview = preview.."^"..texture.."_preview.png"
armor_level = armor_level + level armor_level = armor_level + level