mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 10:52:25 +01:00
MCL2-specific default HUD bars settings
This commit is contained in:
parent
28dc5b802f
commit
1791907747
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user