From 53b57543599999416e11c399b05e19200591140a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 30 May 2017 13:04:18 +0200 Subject: [PATCH] Update to HUD Bar 1.8.0 --- mods/HUD/hudbars/README.md | 3 ++- mods/HUD/hudbars/init.lua | 5 ++++- mods/HUD/hudbars/locale/tr.txt | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 mods/HUD/hudbars/locale/tr.txt diff --git a/mods/HUD/hudbars/README.md b/mods/HUD/hudbars/README.md index 9a5500c7ae..74c3dfad78 100644 --- a/mods/HUD/hudbars/README.md +++ b/mods/HUD/hudbars/README.md @@ -11,7 +11,7 @@ this mod will place them accordingly. position should be displayed correctly on every screen size. ## Current version -The current version is 1.7.1. +The current version is 1.8.0. This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer standard. @@ -34,6 +34,7 @@ Translations: * German: Wuzzy * Portuguese: BrunoMine +* Turkish: admicos This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it diff --git a/mods/HUD/hudbars/init.lua b/mods/HUD/hudbars/init.lua index f3ca7e0bdd..71ad9fe765 100644 --- a/mods/HUD/hudbars/init.lua +++ b/mods/HUD/hudbars/init.lua @@ -86,13 +86,16 @@ hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", local sorting = minetest.setting_get("hudbars_sorting") if sorting ~= nil then hb.settings.sorting = {} + hb.settings.sorting_reverse = {} for k,v in string.gmatch(sorting, "(%w+)=(%w+)") do hb.settings.sorting[k] = tonumber(v) + hb.settings.sorting_reverse[tonumber(v)] = k end else sorting = "" hb.settings.sorting = { ["health"] = 0, ["hunger"] = 1, ["armor"] = 2, ["saturation"] = 3, ["breath"] = 4, ["exhaustion"] = 5 } end + hb.settings.sorting_reverse = {} for k,v in string.gmatch(sorting, "(%w+)=(%w+)") do hb.settings.sorting_reverse[tonumber(v)] = k @@ -238,7 +241,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta local bar_image, bar_size if hb.settings.bar_type == "progress_bar" then bar_image = textures.bar - bar_size = nil + bar_size = {x=2, y=16} elseif hb.settings.bar_type == "statbar_classic" or hb.settings.bar_type == "statbar_modern" then bar_image = textures.icon bar_size = {x=24, y=24} diff --git a/mods/HUD/hudbars/locale/tr.txt b/mods/HUD/hudbars/locale/tr.txt new file mode 100644 index 0000000000..b49c7a06a0 --- /dev/null +++ b/mods/HUD/hudbars/locale/tr.txt @@ -0,0 +1,3 @@ +Health = Can +Breath = Nefes +%s: %d/%d = %s: %d/%d