1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-12-27 11:10:39 +01:00

Reduce skin_mod visibility (#53)

This commit is contained in:
Jordan Irwin 2021-07-13 11:50:22 -07:00 committed by GitHub
parent 38fc2cff2b
commit ac7615212b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -529,12 +529,14 @@ armor.remove_all = function(self, player)
self:save_armor_inventory(player) self:save_armor_inventory(player)
end end
local skin_mod
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 (skin_mod == "skins" or 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 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" and wardrobe.playerSkins and wardrobe.playerSkins[name] then elseif skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
return wardrobe.playerSkins[name] return wardrobe.playerSkins[name]
end end
return armor.default_skin..".png" return armor.default_skin..".png"
@ -678,5 +680,5 @@ end
-- --
-- Useful for skin mod forks that do not use the same name. -- Useful for skin mod forks that do not use the same name.
armor.set_skin_mod = function(mod) armor.set_skin_mod = function(mod)
armor.skin_mod = mod skin_mod = mod
end end

View File

@ -96,7 +96,7 @@ for _, mod in pairs(skin_mods) do
armor:add_preview(fn) armor:add_preview(fn)
end end
end end
armor.skin_mod = mod armor.set_skin_mod(mod)
end end
end end
if not minetest.get_modpath("moreores") then if not minetest.get_modpath("moreores") then