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
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||
S = intllib.Getter(minetest.get_current_modname())
|
||||
S = intllib.Getter()
|
||||
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
|
||||
|
||||
mana = {}
|
||||
|
@ -291,7 +290,7 @@ if minetest.get_modpath("hudbars") ~= nil then
|
|||
|
||||
else
|
||||
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
|
||||
|
||||
function mana.hud_add(playername)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Mana = Mana
|
||||
Mana: %d/%d = Mana: %d/%d
|
||||
Mana: @1/@2 = Mana: @1/@2
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Mana
|
||||
Mana: %d/%d
|
||||
Mana =
|
||||
Mana: @1/@2 =
|
||||
|
|
Loading…
Reference in New Issue
Block a user