From 17919077470d46005bcc498510338e7dd3165b44 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 2 Jul 2017 18:51:40 +0200 Subject: [PATCH] MCL2-specific default HUD bars settings --- mods/HUD/hudbars/default_settings.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/mods/HUD/hudbars/default_settings.lua b/mods/HUD/hudbars/default_settings.lua index d2a325bb9e..539c632b0f 100644 --- a/mods/HUD/hudbars/default_settings.lua +++ b/mods/HUD/hudbars/default_settings.lua @@ -1,4 +1,5 @@ -- (Hardcoded) default settings +-- Some of these settings have been modified for MCL2. hb.settings.max_bar_length = 160 hb.settings.statbar_length = 20 @@ -12,7 +13,8 @@ hb.settings.pos_left.x = hb.load_setting("hudbars_pos_left_x", "number", 0.5) hb.settings.pos_left.y = hb.load_setting("hudbars_pos_left_y", "number", 1) hb.settings.pos_right.x = hb.load_setting("hudbars_pos_right_x", "number", 0.5) hb.settings.pos_right.y = hb.load_setting("hudbars_pos_right_y", "number", 1) -hb.settings.bar_type = hb.load_setting("hudbars_bar_type", "string", "progress_bar", {"progress_bar", "statbar_classic", "statbar_modern"}) +-- Modified in MCL2! +hb.settings.bar_type = hb.load_setting("hudbars_bar_type", "string", "statbar_modern", {"progress_bar", "statbar_classic", "statbar_modern"}) if hb.settings.bar_type == "progress_bar" then hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_offset_left_x", "number", -175) hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_offset_left_y", "number", -86) @@ -24,7 +26,8 @@ else hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_statbar_offset_right_x", "number", 25) hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_statbar_offset_right_y", "number", -90) end -hb.settings.vmargin = hb.load_setting("hudbars_vmargin", "number", 24) +-- Modified in MCL2! +hb.settings.vmargin = hb.load_setting("hudbars_vmargin", "number", 32) hb.settings.tick = hb.load_setting("hudbars_tick", "number", 0.1) -- Experimental setting: Changing this setting is not officially supported, do NOT rely on it! @@ -43,6 +46,11 @@ if sorting ~= nil then hb.settings.sorting_reverse[tonumber(v)] = k end else - hb.settings.sorting = { ["health"] = 0, ["breath"] = 1 } - hb.settings.sorting_reverse = { [0] = "health", [1] = "breath" } + -- Modified in MCL2! + hb.settings.sorting = { ["health"] = 0, ["hunger"] = 1, ["armor"] = 2, ["breath"] = 3, ["exhaustion"] = 4, ["saturation"] = 5 } + hb.settings.sorting_reverse = {} + for k,v in pairs(hb.settings.sorting) do + hb.settings.sorting_reverse[tonumber(v)] = k + end end +