mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-29 15:33:44 +01:00
bugfix and small optimization
This commit is contained in:
parent
2150fcea8d
commit
db8fb5ebd4
@ -376,15 +376,12 @@ armor.damage = function(self, player, index, stack, use)
|
|||||||
end
|
end
|
||||||
|
|
||||||
armor.get_player_skin = function(self, name)
|
armor.get_player_skin = function(self, name)
|
||||||
if self.skin_mod == "skins" or self.skin_mod == "simple_skins" and skins.skins[name] then
|
if (self.skin_mod == "skins" or self.skin_mod == "simple_skins") and skins.skins[name] then
|
||||||
return skins.skins[name]..".png"
|
return skins.skins[name]..".png"
|
||||||
elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then
|
elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then
|
||||||
return u_skins.u_skins[name]..".png"
|
return u_skins.u_skins[name]..".png"
|
||||||
elseif self.skin_mod == "wardrobe" then
|
elseif self.skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
|
||||||
local skins = wardrobe.playerSkins or {}
|
return wardrobe.playerSkins[name]
|
||||||
if skins[name] then
|
|
||||||
return skins[name]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return armor.default_skin..".png"
|
return armor.default_skin..".png"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user