New heart textures

This commit is contained in:
Jean-Patrick Guerrero 2021-01-24 03:51:42 +01:00
parent 46c5a6fc42
commit 2e05628048
4 changed files with 6 additions and 2 deletions

View File

@ -1838,14 +1838,18 @@ local function get_ctn_content(fs, data, player, xoffset, yoffset, ctn_len, awar
local hp = damage_enabled and (data.hp or player:get_hp()) or 20
local half = ceil((hp / 2) % 1)
local hearts = (hp / 2) + half
local heart_size = 0.35
local heart_hgt = yoffset + 0.7
for i = 1, 10 do
fs(fmt("image", xoffset + ((i - 1) * 0.4), yoffset + 0.7, 0.4, 0.4, PNG.heart_grey))
fs(fmt("image", xoffset + ((i - 1) * (heart_size + 0.1)), heart_hgt,
heart_size, heart_size, 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,
fs(fmt("image", xoffset + ((i - 1) * (heart_size + 0.1)), heart_hgt,
heart_size, heart_size,
(half == 1 and i == floor(hearts)) and PNG.heart_half or PNG.heart))
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB