From 75191490c2933303fe43136862097b58a6a0a6b7 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Sun, 19 Mar 2017 18:52:51 +0000 Subject: [PATCH] Use api call to get player skin --- 3d_armor/init.lua | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/3d_armor/init.lua b/3d_armor/init.lua index f0e9ecd..3d67f45 100644 --- a/3d_armor/init.lua +++ b/3d_armor/init.lua @@ -271,33 +271,13 @@ minetest.register_on_joinplayer(function(player) water = 0, radiation = 0, } + local skin = armor:get_player_skin(name) armor.textures[name] = { - skin = armor.default_skin..".png", + skin = skin..".png", armor = "3d_armor_trans.png", wielditem = "3d_armor_trans.png", preview = armor.default_skin.."_preview.png", } - if armor.skin_mod == "skins" then - local skin = skins.skins[name] - if skin and skins.get_type(skin) == skins.type.MODEL then - armor.textures[name].skin = skin..".png" - end - elseif armor.skin_mod == "simple_skins" then - local skin = skins.skins[name] - if skin then - armor.textures[name].skin = skin..".png" - end - elseif armor.skin_mod == "u_skins" then - local skin = u_skins.u_skins[name] - if skin and u_skins.get_type(skin) == u_skins.type.MODEL then - armor.textures[name].skin = skin..".png" - end - elseif armor.skin_mod == "wardrobe" then - local skin = wardrobe.playerSkins[name] - if skin then - armor.textures[name].skin = skin - end - end local texture_path = minetest.get_modpath("player_textures") if texture_path then local dir_list = minetest.get_dir_list(texture_path.."/textures")