Updated intllib support (thanks fat115)

This commit is contained in:
TenPlus1 2017-08-04 11:05:01 +01:00
parent ca153f3f6a
commit 8b624d57dd
7 changed files with 217 additions and 40 deletions

View file

@ -1,23 +1,13 @@
--= Teleport Potion mod 0.8 by TenPlus1
--= Teleport Potion mod by TenPlus1
-- Create teleport potion or pad, place then right-click to enter coords
-- and step onto pad or walk into the blue portal light, portal closes after
-- 10 seconds, pad remains, potions are throwable... SFX are license Free...
-- Intllib
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s, a, ...) a = {a, ...}
return s:gsub("@(%d+)", function(n)
return a[tonumber(n)]
end)
end
end
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- max teleport distance