diff --git a/depends.txt b/depends.txt deleted file mode 100644 index f06ddbb..0000000 --- a/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default? -intllib? -lucky_block? -mcl_core? diff --git a/description.txt b/description.txt deleted file mode 100644 index 0f227cf..0000000 --- a/description.txt +++ /dev/null @@ -1 +0,0 @@ -Adds craftable teleport potions (throwable) and teleport pads. \ No newline at end of file diff --git a/init.lua b/init.lua index fdf8a6b..6dae68e 100644 --- a/init.lua +++ b/init.lua @@ -5,11 +5,25 @@ -- portal or place pad, portals show a blue flame that you can walk into -- before it closes (10 seconds), potions can also be thrown for local teleport. - --- Load support for intllib. -local MP = minetest.get_modpath(minetest.get_current_modname()) -local S = minetest.get_translator and minetest.get_translator("teleport_potion") or - dofile(MP .. "/intllib.lua") +-- translation support +local S +if minetest.get_translator then + S = minetest.get_translator("teleport_potion") +else + S = 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 -- check for MineClone2 local mcl = minetest.get_modpath("mcl_core") @@ -562,4 +576,5 @@ if minetest.get_modpath("lucky_block") then }) end + print ("[MOD] Teleport Potion loaded") diff --git a/intllib.lua b/intllib.lua deleted file mode 100644 index adb0f88..0000000 --- a/intllib.lua +++ /dev/null @@ -1,3 +0,0 @@ --- Support for the old multi-load method -dofile(minetest.get_modpath("intllib").."/init.lua") - diff --git a/locale/de.po b/locale/de.po deleted file mode 100644 index 2e9df77..0000000 --- a/locale/de.po +++ /dev/null @@ -1,59 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-14 08:37+0200\n" -"PO-Revision-Date: 2016-05-27 08:38+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Last-Translator: Xanthin\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Language: de\n" - -#: init.lua -msgid "Teleport Potion (place and right-click to enchant location)" -msgstr "" -"Teleportationstrank (platzieren und rechtsklicken,\n" -"um Standort zu verzaubern)" - -#: init.lua -msgid "Enter teleport coords (e.g. 200,20,-200)" -msgstr "Koordinaten eingeben (z.B. 200,20,-200)" - -#: init.lua -msgid "Right-click to enchant teleport location" -msgstr "Rechtsklick um Teleportationsort zu verzaubern" - -#: init.lua -msgid "Potion failed!" -msgstr "Trank misslungen!" - -#: init.lua -msgid "Teleport Pad (place and right-click to enchant location)" -msgstr "" -"Teleportationsfeld (platzieren und rechtsklicken,\n" -"um Standort zu verzaubern)" - -#: init.lua -msgid "Enter teleport coords (e.g. 200,20,-200,Home)" -msgstr "Koordinaten eingeben (z.B. 200,20,-200,Haus)" - -#: init.lua -msgid "Teleport to @1" -msgstr "Teleportiere nach @1" - -#: init.lua -msgid "Pad Active (@1,@2,@3)" -msgstr "Feld aktiv (@1,@2,@3)" - -#: init.lua -msgid "Teleport Pad coordinates failed!" -msgstr "Teleportationsfeldkoordinaten fehlgeschlagen!" diff --git a/locale/es.po b/locale/es.po deleted file mode 100644 index ec65fcf..0000000 --- a/locale/es.po +++ /dev/null @@ -1,54 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-14 08:34+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: init.lua -msgid "Teleport Potion (place and right-click to enchant location)" -msgstr "Poción de teletransporte (colocar y hacer clic derecho para encantar la ubicación)" - -#: init.lua -msgid "Enter teleport coords (e.g. 200,20,-200)" -msgstr "Inserta las coordenadas del teletransporte (Por ejemplo, 200,20, -200)" - -#: init.lua -msgid "Right-click to enchant teleport location" -msgstr "Haga clic derecho para encantar la ubicación de teletransporte" - -#: init.lua -msgid "Potion failed!" -msgstr "¡Poción fallida!" - -#: init.lua -msgid "Teleport Pad (place and right-click to enchant location)" -msgstr "Teleport Pad (Colocalo y haz clic derecho para encantar la ubicación)" - -#: init.lua -msgid "Enter teleport coords (e.g. 200,20,-200,Home)" -msgstr "Inserte las coordenadas del teletransporte (por ejemplo, 200,20, -200, Inicio)" - -#: init.lua -msgid "Teleport to @1" -msgstr "Teletransportarse a @1" - -#: init.lua -msgid "Pad Active (@1,@2,@3)" -msgstr "Pad activo" - -#: init.lua -msgid "Teleport Pad coordinates failed!" -msgstr "¡Coordenadas del Teleport Pad erroneas!" \ No newline at end of file diff --git a/locale/fr.po b/locale/fr.po deleted file mode 100644 index 1b0c6ff..0000000 --- a/locale/fr.po +++ /dev/null @@ -1,55 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-14 08:35+0200\n" -"PO-Revision-Date: 2017-05-14 08:37+0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Last-Translator: Peppy \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"Language: fr\n" - -#: init.lua -msgid "Teleport Potion (place and right-click to enchant location)" -msgstr "Potion de téléportation (poser puis clic-droit pour enchanter l'emplacement)" - -#: init.lua -msgid "Enter teleport coords (e.g. 200,20,-200)" -msgstr "Saisissez les coordonnées de téléportation (ex : 200,20,-200)" - -#: init.lua -msgid "Right-click to enchant teleport location" -msgstr "Clic-droit pour enchanter l'emplacement de téléportation" - -#: init.lua -msgid "Potion failed!" -msgstr "La potion n'a pas fonctionné !" - -#: init.lua -msgid "Teleport Pad (place and right-click to enchant location)" -msgstr "Pad de téléportation (poser puis clic-droit pour enchanter l'emplacement)" - -#: init.lua -msgid "Enter teleport coords (e.g. 200,20,-200,Home)" -msgstr "Saisissez les coordonnées de téléportation (ex : 200,20,-200,Maison)" - -#: init.lua -msgid "Teleport to @1" -msgstr "Téléportation vers @1" - -#: init.lua -msgid "Pad Active (@1,@2,@3)" -msgstr "Pad activé (@1,@2,@3)" - -#: init.lua -msgid "Teleport Pad coordinates failed!" -msgstr "Les coordonnées du pad sont inchangées !" diff --git a/mod.conf b/mod.conf index 27a4ea7..6109bf6 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = teleport_potion depends = -optional_depends = default, intllib, lucky_block, mcl_core +optional_depends = default, lucky_block, mcl_core description = Adds craftable teleport potions (throwable) and teleport pads.