[hudbars] Update to Git commit bd0641a & patch 31926a0:

Commit: http://repo.or.cz/minetest_hudbars.git/tree/bd0641a
Patch: https://github.com/AntumDeluge/mtmod-hudbars/tree/31926a0
This commit is contained in:
AntumDeluge 2017-06-06 22:33:29 -07:00
parent 415a05791e
commit 35edc6c42e
3 changed files with 15 additions and 13 deletions

View File

@ -105,7 +105,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
* [bookmarks_gui][] ([BSD 3-Clause][lic.bookmarks_gui]) -- version: [d369dba Git][ver.bookmarks_gui] *2015-08-14*
* [hbarmor][] ([WTFPL][lic.wtfpl] / [CC BY-SA][lic.ccbysa3.0]) -- version: [0.3.0 (bfc5f8c Git)][ver.hbarmor] *2017-03-07*
* [home_gui][] ([BSD 3-Clause](mods/ui/home_gui/LICENSE)) -- version: [f6b5001 Git][ver.home_gui] *2015-08-14*
* [hudbars][] ([WTFPL][lic.wtfpl] / [CC BY-SA][lic.ccbysa3.0]) -- version [1.7.1 (fa82d2d Git)][ver.hudbars] *2017-02-24*
* [hudbars][] ([WTFPL][lic.wtfpl] / [CC BY-SA][lic.ccbysa3.0]) -- version [1.8.0 (bd0641a Git)][ver.hudbars] *2017-05-29* ([patched][patch.hudbars])
* [hudmap][] ([LGPL][lic.lgpl2.1] / [WTFPL][lic.wtfpl]) -- version: [09d40f3 Git][ver.hudmap] *2014-08-15*
* [mthudclock][] ([WTFPL][lic.wtfpl]) -- version [b3e2142 Git][ver.mthudclock] *2015-04-17*
* [vector_extras][] ([WTFPL][lic.vector_extras]) -- version: [472deb6 Git][ver.vector_extras] *2017-01-25*
@ -437,7 +437,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[ver.home_gui]: https://github.com/cornernote/minetest-home_gui/tree/f6b5001
[ver.homedecor]: https://github.com/minetest-mods/homedecor_modpack/tree/8e467ef
[ver.hovercraft]: https://github.com/stujones11/hovercraft/tree/4d50e68
[ver.hudbars]: http://repo.or.cz/minetest_hudbars.git/tree/fa82d2d
[ver.hudbars]: http://repo.or.cz/minetest_hudbars.git/tree/bd0641a
[ver.hudmap]: https://github.com/stujones11/hudmap/tree/09d40f3
[ver.ilights]: https://github.com/minetest-mods/ilights/tree/7060243
[ver.inventory_plus]: https://github.com/cornernote/minetest-inventory_plus/tree/fd71e3d
@ -520,6 +520,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
[patch.helicopter]: https://github.com/AntumDeluge/mtmod-helicopter/tree/dd53fdd
[patch.hovercraft]: https://github.com/AntumDeluge/mtmod-hovercraft/tree/73a6223
[patch.hud]: https://github.com/AntumDeluge/mtmod-hud/tree/6846e20
[patch.hudbars]: https://github.com/AntumDeluge/mtmod-hudbars/tree/31926a0
[patch.invisibility]: https://github.com/AntumDeluge/mtmod-invisibility/tree/f045c7c
[patch.mesecons]: https://github.com/AntumDeluge/mtmp-mesecons/tree/32a4823
[patch.minetest_game]: https://github.com/AntumDeluge/mtgame-minetest/tree/796035a

View File

@ -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

View File

@ -20,11 +20,11 @@ hb.settings = {}
function hb.load_setting(sname, stype, defaultval, valid_values)
local sval
if stype == "string" then
sval = minetest.setting_get(sname)
sval = minetest.settings:get(sname)
elseif stype == "bool" then
sval = minetest.setting_getbool(sname)
sval = minetest.settings:get_bool(sname)
elseif stype == "number" then
sval = tonumber(minetest.setting_get(sname))
sval = tonumber(minetest.settings:get(sname))
end
if sval ~= nil then
if valid_values ~= nil then
@ -83,7 +83,7 @@ hb.settings.forceload_default_hudbars = hb.load_setting("hudbars_forceload_defau
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)
local sorting = minetest.setting_get("hudbars_sorting")
local sorting = minetest.settings:get("hudbars_sorting")
if sorting ~= nil then
hb.settings.sorting = {}
hb.settings.sorting_reverse = {}
@ -236,7 +236,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}
@ -464,7 +464,7 @@ function hb.get_hudbar_state(player, identifier)
end
--register built-in HUD bars
if minetest.setting_getbool("enable_damage") or hb.settings.forceload_default_hudbars then
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, 20, 20, false)
hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = "hudbars_icon_breath.png", bgicon = "hudbars_bgicon_breath.png" }, 10, 10, true)
end
@ -478,9 +478,9 @@ end
local function custom_hud(player)
if minetest.setting_getbool("enable_damage") or hb.settings.forceload_default_hudbars then
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
local hide
if minetest.setting_getbool("enable_damage") then
if minetest.settings:get_bool("enable_damage") then
hide = false
else
hide = true
@ -500,7 +500,7 @@ end
-- update built-in HUD bars
local function update_hud(player)
if not player_exists(player) then return end
if minetest.setting_getbool("enable_damage") then
if minetest.settings:get_bool("enable_damage") then
if hb.settings.forceload_default_hudbars then
hb.unhide_hudbar(player, "health")
end
@ -550,7 +550,7 @@ minetest.register_globalstep(function(dtime)
if main_timer > hb.settings.tick or timer > 4 then
if main_timer > hb.settings.tick then main_timer = 0 end
-- only proceed if damage is enabled
if minetest.setting_getbool("enable_damage") or hb.settings.forceload_default_hudbars then
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
for _, player in pairs(hb.players) do
-- update all hud elements
update_hud(player)