From ec979b6dcdfe3ad0fd40ca6e4d08c4780427d14c Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Wed, 21 Oct 2015 22:33:04 +0200 Subject: [PATCH] Use a configuration key to decide if we show the health bar --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5b0d2d4..7b52933 100644 --- a/init.lua +++ b/init.lua @@ -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)