mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-01 07:40:37 +02:00
Get rid of technic.format
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user