summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2015-02-04 18:00:02 +0100
committerWuzzy <almikes@aol.com>2015-02-04 18:00:02 +0100
commitf046592824e8c481eb839912eef0e7fa298345cd (patch)
treecf6576febcee63beeb5891ea47829f03de34ab9b
parent895028086c645b8767c7c624e7395f1757b3d277 (diff)
Move custom hudbars down by 1 iff damage disabled
-rw-r--r--init.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 39a78a2..19d82d1 100644
--- a/init.lua
+++ b/init.lua
@@ -41,9 +41,15 @@ end
HUD_CUSTOM_POS_LEFT = HUD_HEALTH_POS
HUD_CUSTOM_POS_RIGHT = HUD_AIR_POS
+
HUD_CUSTOM_VMARGIN = 24
-HUD_CUSTOM_START_OFFSET_LEFT = {x=HUD_HEALTH_OFFSET.x, y=HUD_HEALTH_OFFSET.y - HUD_CUSTOM_VMARGIN}
-HUD_CUSTOM_START_OFFSET_RIGHT = {x=HUD_AIR_OFFSET.x, y=HUD_AIR_OFFSET.y - HUD_CUSTOM_VMARGIN}
+if minetest.setting_getbool("enable_damage") then
+ HUD_CUSTOM_START_OFFSET_LEFT = {x=HUD_HEALTH_OFFSET.x, y=HUD_HEALTH_OFFSET.y - HUD_CUSTOM_VMARGIN}
+ HUD_CUSTOM_START_OFFSET_RIGHT = {x=HUD_AIR_OFFSET.x, y=HUD_AIR_OFFSET.y - HUD_CUSTOM_VMARGIN}
+else
+ HUD_CUSTOM_START_OFFSET_LEFT = {x=HUD_HEALTH_OFFSET.x, y=HUD_HEALTH_OFFSET.y }
+ HUD_CUSTOM_START_OFFSET_RIGHT = {x=HUD_AIR_OFFSET.x, y=HUD_AIR_OFFSET.y }
+end
HUD_TICK = 0.1