1
0
mirror of https://repo.or.cz/minetest_hudbars.git synced 2025-09-09 18:15:33 +02:00

15 Commits

Author SHA1 Message Date
28dcf8af65 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-06-16 22:33:04 +02:00
Wuzzy
a250d2a350 Add z-index to HUD elements 2020-04-07 01:06:49 +02:00
Wuzzy
7993feac07 Version 2.2.2 2020-03-13 18:11:13 +01:00
Wuzzy
b19b5f090a Fix another crash 2020-03-13 18:10:52 +01:00
Wuzzy
9a8a3f0f8c Version 2.2.1 2020-03-13 07:55:01 +01:00
Wuzzy
2eb2df946b Add nil check in hb.change_hudbar 2020-03-13 07:53:24 +01:00
c4ddef312e Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-02-16 18:04:10 +01:00
Wuzzy
2ffcd94dd6 Version 2.2.0 2020-02-04 22:11:43 +01:00
Wuzzy
8d3fa950f8 Update translation credits 2020-02-04 22:10:41 +01:00
wuniversales
332aa18452 Add Spanish translation 2020-02-04 22:07:34 +01:00
7f6ed309b3 Merge branch 'master' of yunohost.local:mtcontrib/minetest_hudbars into nalc-1.2-dev 2019-12-22 13:28:33 +01:00
Wuzzy
99ebd71da7 Update credits 2019-09-17 11:21:19 +02:00
Wuzzy
699e356609 Add Russian locale by lmk 2019-09-17 11:20:12 +02:00
7cd5940c68 Merge branch 'master' into nalc-1.2 2019-05-09 22:15:22 +02:00
sys4-fr
67ca481f7c Ajoute message de chargement du mod dans le journal "action" 2018-12-25 17:43:52 +01:00
4 changed files with 21 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ this mod will place them accordingly.
position should be displayed correctly on every screen size. position should be displayed correctly on every screen size.
## Current version ## Current version
The current version is 2.1.0. The current version is 2.2.2.
This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer
standard. standard.
@@ -38,6 +38,8 @@ Translations:
* Dutch: kingoscargames * Dutch: kingoscargames
* Italian: Hamlet * Italian: Hamlet
* Malay: muhdnurhidayat * Malay: muhdnurhidayat
* Russian: Imk
* Spanish: wuniversales
This program is free software. It comes without any warranty, to This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it the extent permitted by applicable law. You can redistribute it

View File

@@ -200,6 +200,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
text = "hudbars_bar_background.png", text = "hudbars_bar_background.png",
alignment = {x=1,y=1}, alignment = {x=1,y=1},
offset = { x = offset.x - 1, y = offset.y - 1 }, offset = { x = offset.x - 1, y = offset.y - 1 },
z_index = 0,
}) })
if textures.icon ~= nil then if textures.icon ~= nil then
ids.icon = player:hud_add({ ids.icon = player:hud_add({
@@ -209,6 +210,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
text = textures.icon, text = textures.icon,
alignment = {x=-1,y=1}, alignment = {x=-1,y=1},
offset = { x = offset.x - 3, y = offset.y }, offset = { x = offset.x - 3, y = offset.y },
z_index = 1,
}) })
end end
elseif hb.settings.bar_type == "statbar_modern" then elseif hb.settings.bar_type == "statbar_modern" then
@@ -222,6 +224,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
offset = { x = offset.x, y = offset.y }, offset = { x = offset.x, y = offset.y },
direction = 0, direction = 0,
size = {x=24, y=24}, size = {x=24, y=24},
z_index = 0,
}) })
end end
end end
@@ -248,6 +251,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
offset = offset, offset = offset,
direction = 0, direction = 0,
size = bar_size, size = bar_size,
z_index = 1,
}) })
if hb.settings.bar_type == "progress_bar" then if hb.settings.bar_type == "progress_bar" then
ids.text = player:hud_add({ ids.text = player:hud_add({
@@ -258,6 +262,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta
number = text_color, number = text_color,
direction = 0, direction = 0,
offset = { x = offset.x + 2, y = offset.y - 1}, offset = { x = offset.x + 2, y = offset.y - 1},
z_index = 2,
}) })
end end
-- Do not forget to update hb.get_hudbar_state if you add new fields to the state table -- Do not forget to update hb.get_hudbar_state if you add new fields to the state table
@@ -316,6 +321,9 @@ function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon
local name = player:get_player_name() local name = player:get_player_name()
local hudtable = hb.get_hudtable(identifier) local hudtable = hb.get_hudtable(identifier)
if not hudtable.hudstate[name] then
return false
end
local value_changed, max_changed = false, false local value_changed, max_changed = false, false
if new_value ~= nil then if new_value ~= nil then
@@ -567,3 +575,5 @@ minetest.register_globalstep(function(dtime)
end end
if timer > 4 then timer = 0 end if timer > 4 then timer = 0 end
end) end)
minetest.log("action", "[hudbars] loaded.")

4
locale/hudbars.es.tr Normal file
View File

@@ -0,0 +1,4 @@
# textdomain: hudbars
Health=Salud
Breath=Aliento
@1: @2/@3=@1: @2/@3

4
locale/hudbars.ru.tr Normal file
View File

@@ -0,0 +1,4 @@
# textdomain: hudbars
Health=HP
Breath=дыхание
@1: @2/@3=@1: @2/@3