diff --git a/init.lua b/init.lua index dd3699e..723dded 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,5 @@ local S = minetest.get_translator("hbarmor") +local N = function(s) return s end if (not armor) or (not armor.def) then minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!") @@ -60,7 +61,7 @@ local function custom_hud(player) end --register and define armor HUD bar -hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, S("@1: @2%")) +hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { "label", "value" }, "hbarmor" ) function hbarmor.get_armor(player) if not player or not armor.def then