Fix potential missing texture bug

This commit is contained in:
stujones11 2017-03-26 22:46:51 +01:00
parent 11ce84873b
commit fe9664589a

@ -191,8 +191,8 @@ armor.set_player_armor = function(self, player)
end end
local item = stack:get_name() local item = stack:get_name()
local tex = def.texture or item:gsub("%:", "_") local tex = def.texture or item:gsub("%:", "_")
local prev = def.preview or tex.."_preview"
tex = tex:gsub(".png$", "") tex = tex:gsub(".png$", "")
local prev = def.preview or tex.."_preview"
prev = prev:gsub(".png$", "") prev = prev:gsub(".png$", "")
texture = texture.."^"..tex..".png" texture = texture.."^"..tex..".png"
preview = preview.."^"..prev..".png" preview = preview.."^"..prev..".png"