From 030c921485315eb05d6d0062140c5c8326f42477 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sat, 16 Jan 2021 04:09:45 +0100 Subject: [PATCH] Improve HP display --- init.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 5f2274f..7d67b65 100644 --- a/init.lua +++ b/init.lua @@ -1826,10 +1826,15 @@ local function get_ctn_content(fs, data, player, xoffset, yoffset, ctn_len, awar local hearts = (hp / 2) + half local yextra = 5.6 - for i = 1, hearts do - fs(fmt("image", xoffset + ((i - 1) * 0.4), yoffset + 0.7, 0.4, 0.4, - (half == 1 and i == floor(hearts)) and PNG.heart_half or - (damage_enabled and PNG.heart or PNG.heart_grey))) + for i = 1, 10 do + fs(fmt("image", xoffset + ((i - 1) * 0.4), yoffset + 0.7, 0.4, 0.4, PNG.heart_grey)) + end + + if damage_enabled then + for i = 1, hearts do + fs(fmt("image", xoffset + ((i - 1) * 0.4), yoffset + 0.7, 0.4, 0.4, + (half == 1 and i == floor(hearts)) and PNG.heart_half or PNG.heart)) + end end fs(fmt("list[current_player;craft;%f,%f;3,3;]", xoffset, yoffset + 1.45),