From 728228fb5a6d7122f09c2b001d8b18d563443228 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Wed, 19 Jul 2023 22:16:25 -0400 Subject: [PATCH] mods hudbars & hbarmor - do not hide any bar and up the health to 40 * the nssg its very hard so 20 health its not enought to survive * do not hide hudbars, to optimize rendering * update ticks to give a bit of performance, now set to 0.3 * older engines will defaults health to 20 due missing feature (check hudbar bugs) --- mods/hbarmor/init.lua | 4 ++-- mods/hbarmor/settingtypes.txt | 4 ++-- mods/hudbars/default_settings.lua | 8 ++++---- mods/hudbars/settingtypes.txt | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mods/hbarmor/init.lua b/mods/hbarmor/init.lua index 7e5c439..a98ed90 100644 --- a/mods/hbarmor/init.lua +++ b/mods/hbarmor/init.lua @@ -37,10 +37,10 @@ hbarmor.player_active = {} -- Time difference in seconds between updates to the HUD armor bar. -- Increase this number for slow servers. -hbarmor.tick = 0.1 +hbarmor.tick = 0.3 -- If true, the armor bar is hidden when the player does not wear any armor -hbarmor.autohide = true +hbarmor.autohide = false --load custom settings local set = minetest.settings:get_bool("hbarmor_autohide") diff --git a/mods/hbarmor/settingtypes.txt b/mods/hbarmor/settingtypes.txt index 067d504..263a6f4 100644 --- a/mods/hbarmor/settingtypes.txt +++ b/mods/hbarmor/settingtypes.txt @@ -1,7 +1,7 @@ #If true, automatically hides the armor HUD bar when the player wears no #armor. Otherwise, the armor bar shows “0%”. -hbarmor_autohide (Automatically hide armor HUD bar) bool true +hbarmor_autohide (Automatically hide armor HUD bar) bool false #Time difference in seconds between updates to the armor HUD bar. #Increase this number for slow servers. -hbarmor_tick (Armor HUD bar update frequency) float 0.1 0.0 4.0 +hbarmor_tick (Armor HUD bar update frequency) float 0.3 0.0 4.0 diff --git a/mods/hudbars/default_settings.lua b/mods/hudbars/default_settings.lua index 04475ac..f720c7e 100644 --- a/mods/hudbars/default_settings.lua +++ b/mods/hudbars/default_settings.lua @@ -25,14 +25,14 @@ else 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) -hb.settings.tick = hb.load_setting("hudbars_tick", "number", 0.1) +hb.settings.tick = hb.load_setting("hudbars_tick", "number", 0.3) -- Experimental setting: Changing this setting is not officially supported, do NOT rely on it! hb.settings.forceload_default_hudbars = hb.load_setting("hudbars_forceload_default_hudbars", "bool", true) -- Misc. settings hb.settings.alignment_pattern = hb.load_setting("hudbars_alignment_pattern", "string", "zigzag", {"zigzag", "stack_up", "stack_down"}) -hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", true) +hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", false) local sorting = minetest.settings:get("hudbars_sorting") if sorting ~= nil then @@ -47,8 +47,8 @@ else hb.settings.sorting_reverse = { [0] = "health", [1] = "breath" } end -hb.settings.hp_player_maximun = hb.load_setting("hudbars_hp_player_maximun", "number", 20) -hb.settings.br_player_maximun = hb.load_setting("hudbars_br_player_maximun", "number", 10) +hb.settings.hp_player_maximun = hb.load_setting("hudbars_hp_player_maximun", "number", 40) +hb.settings.br_player_maximun = hb.load_setting("hudbars_br_player_maximun", "number", 20) if minetest.has_feature("object_use_texture_alpha") then core.PLAYER_MAX_HP_DEFAULT = hb.settings.hp_player_maximun diff --git a/mods/hudbars/settingtypes.txt b/mods/hudbars/settingtypes.txt index 6ce1385..87f1006 100644 --- a/mods/hudbars/settingtypes.txt +++ b/mods/hudbars/settingtypes.txt @@ -19,7 +19,7 @@ hudbars_bar_type (HUD bars style) enum progress_bar progress_bar,statbar_classic # If enabled (default), the breath indicators in the HUD will be automatically hidden shortly # after the breath has been filled up. Otherwise, the breath will always be displayed. -hudbars_autohide_breath (Automatically hide breath indicators) bool true +hudbars_autohide_breath (Automatically hide breath indicators) bool false # This setting changes the way the HUD bars are ordered on the display. You can choose # between a zig-zag pattern (default) or a vertically stacked pattern. @@ -120,8 +120,8 @@ hudbars_tick (Default HUD bars update interval) float 0.3 0.0 4.0 [player values defaults] # set a default value for max hp healt of player, if you customized and need on older engines -hudbars_hp_player_maximun (maximun value of heal of player) int 20 +hudbars_hp_player_maximun (maximun value of heal of player) int 40 # set a default value for max breath of player, if you customized and need on older engines -hudbars_br_player_maximun (maximun value of braeth of player) int 10 +hudbars_br_player_maximun (maximun value of braeth of player) int 20