mirror of
https://github.com/minetest-mods/i3.git
synced 2024-12-29 12:20:41 +01:00
Improve HP display
This commit is contained in:
parent
e931f6121c
commit
030c921485
13
init.lua
13
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 hearts = (hp / 2) + half
|
||||||
local yextra = 5.6
|
local yextra = 5.6
|
||||||
|
|
||||||
for i = 1, hearts do
|
for i = 1, 10 do
|
||||||
fs(fmt("image", xoffset + ((i - 1) * 0.4), yoffset + 0.7, 0.4, 0.4,
|
fs(fmt("image", xoffset + ((i - 1) * 0.4), yoffset + 0.7, 0.4, 0.4, PNG.heart_grey))
|
||||||
(half == 1 and i == floor(hearts)) and PNG.heart_half or
|
end
|
||||||
(damage_enabled and PNG.heart or PNG.heart_grey)))
|
|
||||||
|
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
|
end
|
||||||
|
|
||||||
fs(fmt("list[current_player;craft;%f,%f;3,3;]", xoffset, yoffset + 1.45),
|
fs(fmt("list[current_player;craft;%f,%f;3,3;]", xoffset, yoffset + 1.45),
|
||||||
|
Loading…
Reference in New Issue
Block a user