1
0
mirror of https://github.com/MinetestForFun/mff_hud.git synced 2024-12-22 16:50:34 +01:00

Use a configuration key to decide if we show the health bar

This commit is contained in:
LeMagnesium 2015-10-21 22:33:04 +02:00
parent f7ccec1446
commit ec979b6dcd

View File

@ -1,9 +1,10 @@
local hotbar_size = minetest.setting_get("hotbar_size") or 16
local health_visible = minetest.setting_getbool("hotbar_health_visible") or false
minetest.register_on_joinplayer(function(player)
player:hud_set_hotbar_itemcount(hotbar_size)
player:hud_set_flags({crosshair = true, hotbar = true, healthbar = true, wielditem = true, breathbar = true})
player:hud_set_flags({crosshair = true, hotbar = true, healthbar = health_visible, wielditem = true, breathbar = true})
player:hud_set_hotbar_image("hud_hotbar.png")
player:hud_set_hotbar_selected_image("hud_hotbar_selected.png")
end)