forked from mtcontrib/minetest_mana
Update outdated inttlib boilerplate
This commit is contained in:
parent
93477205a4
commit
374d9742f8
7
init.lua
7
init.lua
@ -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)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
Mana = Mana
|
Mana = Mana
|
||||||
Mana: %d/%d = Mana: %d/%d
|
Mana: @1/@2 = Mana: @1/@2
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
Mana
|
Mana =
|
||||||
Mana: %d/%d
|
Mana: @1/@2 =
|
||||||
|
Loading…
Reference in New Issue
Block a user