forked from mtcontrib/minetest_hbhunger
Add intllib support and German
This commit is contained in:
parent
5ea402b3f8
commit
7e084c50d2
|
@ -1,4 +1,5 @@
|
||||||
hudbars
|
hudbars
|
||||||
|
intllib?
|
||||||
default?
|
default?
|
||||||
flowers?
|
flowers?
|
||||||
animalmaterials?
|
animalmaterials?
|
||||||
|
|
10
init.lua
10
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
|
if minetest.setting_getbool("enable_damage") then
|
||||||
|
|
||||||
hbhunger = {}
|
hbhunger = {}
|
||||||
|
@ -39,7 +47,7 @@ end
|
||||||
dofile(minetest.get_modpath("hbhunger").."/hunger.lua")
|
dofile(minetest.get_modpath("hbhunger").."/hunger.lua")
|
||||||
|
|
||||||
-- register satiation hudbar
|
-- 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
|
-- update hud elemtens if value has changed
|
||||||
local function update_hud(player)
|
local function update_hud(player)
|
||||||
|
|
1
locale/de.txt
Normal file
1
locale/de.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Satiation = Sättigung
|
1
locale/template.txt
Normal file
1
locale/template.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Satiation
|
Loading…
Reference in New Issue
Block a user