summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-05 16:58:00 +0200
committerWuzzy <almikes@aol.com>2016-08-05 16:58:00 +0200
commit7e084c50d2fb71b07002e5061d3edb28597a6a28 (patch)
tree1eba0a6fcd02c43898e02abd518b4d98e9f5c6e1 /init.lua
parent5ea402b3f83313f8efb167dc28cc7e737ed2d9c0 (diff)
Add intllib support and German
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 46158ac..70efb75 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
+
if minetest.setting_getbool("enable_damage") then
hbhunger = {}
@@ -39,7 +47,7 @@ end
dofile(minetest.get_modpath("hbhunger").."/hunger.lua")
-- register satiation hudbar
-hb.register_hudbar("satiation", 0xFFFFFF, "Satiation", { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false)
+hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false)
-- update hud elemtens if value has changed
local function update_hud(player)