Update outdated inttlib boilerplate

This commit is contained in:
Wuzzy 2016-11-09 01:58:50 +01:00
parent 93477205a4
commit 374d9742f8
3 changed files with 6 additions and 7 deletions

View File

@ -11,10 +11,9 @@ License: WTFPL
local S local S
if (minetest.get_modpath("intllib")) then if (minetest.get_modpath("intllib")) then
dofile(minetest.get_modpath("intllib").."/intllib.lua") S = intllib.Getter()
S = intllib.Getter(minetest.get_current_modname())
else else
S = function ( s ) return s end S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
end end
mana = {} mana = {}
@ -291,7 +290,7 @@ if minetest.get_modpath("hudbars") ~= nil then
else else
function mana.manastring(playername) function mana.manastring(playername)
return string.format(S("Mana: %d/%d"), mana.get(playername), mana.getmax(playername)) return S("Mana: @1/@2", mana.get(playername), mana.getmax(playername))
end end
function mana.hud_add(playername) function mana.hud_add(playername)

View File

@ -1,2 +1,2 @@
Mana = Mana Mana = Mana
Mana: %d/%d = Mana: %d/%d Mana: @1/@2 = Mana: @1/@2

View File

@ -1,2 +1,2 @@
Mana Mana =
Mana: %d/%d Mana: @1/@2 =