diff --git a/depends.txt b/depends.txt index 579f7fb..32c2224 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,3 @@ hudbars 3d_armor +intllib? diff --git a/init.lua b/init.lua index 4aba3bd..e131600 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,11 @@ +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + hbarmor = {} -- HUD statbar values @@ -50,7 +58,7 @@ local function custom_hud(player) end --register and define armor HUD bar -hb.register_hudbar("armor", 0xFFFFFF, "Armor", { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, "%s: %d%%") +hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, "%s: %d%%") dofile(minetest.get_modpath("hbarmor").."/armor.lua") diff --git a/locale/de.txt b/locale/de.txt new file mode 100644 index 0000000..0de79d9 --- /dev/null +++ b/locale/de.txt @@ -0,0 +1 @@ +Armor = Panzerung diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..5298070 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1 @@ +Armor