From e0212f8d367cac7827bd9f90a88b44f85173ece4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 21 Jul 2017 23:23:50 +0200 Subject: [PATCH] Pixel-perfect player image in inventory --- mods/HUD/mcl_inventory/creative.lua | 5 ++--- mods/HUD/mcl_inventory/init.lua | 5 ++--- .../mcl_inventory/textures/crafting_player2d.png | Bin 569 -> 0 bytes 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 mods/HUD/mcl_inventory/textures/crafting_player2d.png diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index 248737c4f..a52885fe1 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -226,15 +226,14 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz -- Show armor and player image local show_armor = minetest.get_modpath("3d_armor") - -- TODO: Use player.png to allow for custom skins - local img = "crafting_player2d.png" + local img = "player.png" local player_preview = "image[3.9,1.4;1.2333,2.4666;"..img.."]" if show_armor and armor.textures[playername] and armor.textures[playername].preview then img = armor.textures[playername].preview local s1 = img:find("character_preview") if s1 ~= nil then s1 = img:sub(s1+21) - img = "crafting_player2d.png"..s1 + img = "player.png"..s1 end player_preview = "image[3.9,1.4;1.2333,2.4666;"..img.."]" end diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index d06462e77..fcecc0c8f 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -49,15 +49,14 @@ local function set_inventory(player, armor_change_only) local player_name = player:get_player_name() -- Show armor and player image - -- TODO: Use player.png to allow for custom skins - local img = "crafting_player2d.png" + local img = "player.png" local player_preview = "image[0.6,0.2;2,4;"..img.."]" if show_armor and armor.textures[player_name] and armor.textures[player_name].preview then img = armor.textures[player_name].preview local s1 = img:find("character_preview") if s1 ~= nil then s1 = img:sub(s1+21) - img = "crafting_player2d.png"..s1 + img = "player.png"..s1 end player_preview = "image[1.1,0.2;2,4;"..img.."]" end diff --git a/mods/HUD/mcl_inventory/textures/crafting_player2d.png b/mods/HUD/mcl_inventory/textures/crafting_player2d.png deleted file mode 100644 index 176588a3dd7cd66a036dd03ea9b44ee0dd8e442f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 569 zcmeAS@N?(olHy`uVBq!ia0vp^4Gav73>?frmXCVhR3K#&;1l8sqzx4%LL3d8^p!VN zCGYRdJ2$7{_WB8n)5B((nl@zwx9FL8>Z?RM8ZLIUsfzQ=RyCa2nw{-uduCqU%tdAW zK>ds*L4Lsu4$p3+0okiPT^vIy7~kGL*tc3iruAde(|fBfZTs@~eyLb`sn9d|T)c>QY%BZ1!)7tVz@W3tj!AE zt#xgk*;WntpCHfvVXKJhu3EWl@y{pBvD`p`hV4}=`=dfi=AUO|V0dt<;cV1ZciZS( zP{xGGyr88_A>6v3bVVlHuUYQ#oxmIh0DEK z4KhVuK|B6yfU9f2&Z?-$oys8he_`v;R^NRTMrNbcDHBo54HT=bsDt#~m=fxv$@%~{gyAf}%OkO%;VEklDh!wYuNr*R8q1SXh) Oq&!{yT-G@yGywpTDZ&{5