mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-23 01:12:21 +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
|
||||
|
||||
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"
|
||||
elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then
|
||||
return u_skins.u_skins[name]..".png"
|
||||
elseif self.skin_mod == "wardrobe" then
|
||||
local skins = wardrobe.playerSkins or {}
|
||||
if skins[name] then
|
||||
return skins[name]
|
||||
end
|
||||
elseif self.skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
|
||||
return wardrobe.playerSkins[name]
|
||||
end
|
||||
return armor.default_skin..".png"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user