mirror of
https://codeberg.org/tenplus1/teleport_potion.git
synced 2025-07-16 03:06:44 -04:00
Updated intllib support (thanks fat115)
This commit is contained in:
parent
ca153f3f6a
commit
8b624d57dd
7 changed files with 217 additions and 40 deletions
18
init.lua
18
init.lua
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue