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 zcmXX?T}V@L96i_NRn*xK6q(XiW>&MzP)X9-WJ_0buIsjRnuUhSRuZKmx6qqtCBZg| zJuIZr7ST4hB*=)hX_zn37ttaVtOs3VU?o_zS|9wQ-_!4K4u^Bjm_}X8PZOpA;4ACo z3;+(Gkjev~Dl*#uRB2RN1%T3xxmww-nv#NhY{&Fi&x>(x;jY!yrMH)t4|g|?>?~83 zY;KX2x@1*so6=NRY9BS3)YZ>!4BDOj764Q)qi%#W@~#u0yh^!DJ3y^0JT`m9`J=1t z%Zr}ZQ)|E8_vLi;Wkp0CofnpV_NSVs!z1nI_A<=1gE4=?Y3cdM1EdZvei}e-rnP~_ z%pM?=tc*Frt-CV;pt;Z%9x~}eC-Mo}Vhi88TJCPHH;M_I2(V3qCoBI^Zrv0k0nnO0 zxz1;73~YbvueiTe6end9^nl?C>%Q%ZFY%71lUW|HZi_+N>v%~4AD(j04dL4AmQ!T8 zS?c_fIeIZdO#K<%pBR0ZZUPX^nM@Aq%FbLWSq1QFhnVFb_Bj_lcjk@jlK|-uCw%in z5$D(M2k?U@7pW4(n}qSX?_3gqAQdv|_s#osD>2tM{qG|iVqW4R5=)MK)hHB}VvnKu zVFAg%Mqic`1?EUDmNRC14YL%fN=_G?@Hi{~1LS1^_~H-%cr*!M#z8qhXB;@|A_Bo5 mdfWB96!NO;0B9O$fIEa}O7?Qw&3u8if>26@TJEnoKKvJwDZ&{5