Get rid of technic.format

This commit is contained in:
est31
2015-02-08 13:45:13 +01:00
parent 7ed1aa9398
commit 4b179821d3
12 changed files with 35 additions and 55 deletions

View File

@ -16,8 +16,12 @@ local modpath = minetest.get_modpath("technic")
technic.modpath = modpath
-- Boilerplate to support intllib
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end
technic.getter = S
if minetest.get_modpath("intllib") then
technic.getter = intllib.Getter()
else
technic.getter = function(s,a,...)if a==nil then return s end a={a,...}return s:gsub("(@?)@(%(?)(%d+)(%)?)",function(e,o,n,c)if e==""then return a[tonumber(n)]..(o==""and c or"")else return"@"..o..n..c end end) end
end
local S = technic.getter
-- Read configuration file
dofile(modpath.."/config.lua")