aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-05-30 18:53:44 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-05-30 18:53:44 +0200
commit25d743b7e702613735fb5aeeaff2e14d50c0eb8e (patch)
tree045849b2ad73168d6e77bb9b95a6cf3859fa2f26
parente463c23587af4b9be3c42583d3713d729d908aca (diff)
parentbb3fd1a928c730c9a99a341ec4aa9969f99c0195 (diff)
downloadcurrency-master.zip
currency-master.tar.gz
currency-master.tar.bz2
Merge branch 'master' of https://github.com/minetest-mods/currencyHEADmaster
Also removed 50 MG note, since it doesn't make much sense on my server.
-rw-r--r--barter.lua28
-rw-r--r--crafting.lua9
-rw-r--r--craftitems.lua12
-rw-r--r--depends.txt5
-rw-r--r--income.lua8
-rw-r--r--init.lua22
-rw-r--r--intllib.lua45
-rw-r--r--locale/de.po183
-rw-r--r--locale/fr.po187
-rw-r--r--locale/ms.po186
-rw-r--r--locale/ru.po187
-rw-r--r--locale/template.pot182
-rw-r--r--loot.lua30
-rw-r--r--safe.lua42
-rw-r--r--shop.lua58
-rw-r--r--textures/minegeld_50.pngbin0 -> 1014 bytes
16 files changed, 1115 insertions, 69 deletions
diff --git a/barter.lua b/barter.lua
index dad2e4a..1fb4f1b 100644
--- a/barter.lua
+++ b/barter.lua
@@ -1,5 +1,9 @@
barter = {}
+-- internationalization boilerplate
+local MP = minetest.get_modpath(minetest.get_current_modname())
+local S, NS = dofile(MP.."/intllib.lua")
+
barter.chest = {}
barter.chest.formspec = {
main = "size[8,9]"..
@@ -7,20 +11,20 @@ barter.chest.formspec = {
"list[current_name;pl2;5,0;3,4;]"..
"list[current_player;main;0,5;8,4;]",
pl1 = {
- start = "button[3,1;1,1;pl1_start;Start]",
+ start = "button[3,1;1,1;pl1_start;" .. S("Start") .. "]",
player = function(name) return "label[3,0;"..name.."]" end,
- accept1 = "button[3,1;1,1;pl1_accept1;Confirm]"..
- "button[3,2;1,1;pl1_cancel;Cancel]",
- accept2 = "button[3,1;1,1;pl1_accept2;Exchange]"..
- "button[3,2;1,1;pl1_cancel;Cancel]",
+ accept1 = "button[3,1;1,1;pl1_accept1;" .. S("Confirm") .. "]"..
+ "button[3,2;1,1;pl1_cancel;" .. S("Cancel") .. "]",
+ accept2 = "button[3,1;1,1;pl1_accept2;" .. S("Exchange") .. "]"..
+ "button[3,2;1,1;pl1_cancel;" .. S("Cancel") .. "]",
},
pl2 = {
- start = "button[4,1;1,1;pl2_start;Start]",
+ start = "button[4,1;1,1;pl2_start;" .. S("Start") .. "]",
player = function(name) return "label[4,0;"..name.."]" end,
- accept1 = "button[4,1;1,1;pl2_accept1;Confirm]"..
- "button[4,2;1,1;pl2_cancel;Cancel]",
- accept2 = "button[4,1;1,1;pl2_accept2;Exchange]"..
- "button[4,2;1,1;pl2_cancel;Cancel]",
+ accept1 = "button[4,1;1,1;pl2_accept1;" .. S("Confirm") .. "]"..
+ "button[4,2;1,1;pl2_cancel;" .. S("Cancel") .. "]",
+ accept2 = "button[4,1;1,1;pl2_accept2;" .. S("Exchange") .. "]"..
+ "button[4,2;1,1;pl2_cancel;" .. S("Cancel") .. "]",
},
}
@@ -90,7 +94,7 @@ end
minetest.register_node("currency:barter", {
drawtype = "nodebox",
- description = "Barter Table",
+ description = S("Barter Table"),
paramtype = "light",
paramtype2 = "facedir",
tiles = {"barter_top.png",
@@ -111,7 +115,7 @@ minetest.register_node("currency:barter", {
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Barter Table")
+ meta:set_string("infotext", S("Barter Table"))
meta:set_string("pl1","")
meta:set_string("pl2","")
barter.chest.update_formspec(meta)
diff --git a/crafting.lua b/crafting.lua
index cf86c7a..0aeb4a2 100644
--- a/crafting.lua
+++ b/crafting.lua
@@ -49,6 +49,15 @@ minetest.register_craft({
minetest.register_craft({
type = "shapeless",
+
output = "currency:minegeld 5",
recipe = {"currency:minegeld_5"},
+
+})
+
+
+minetest.register_craft({
+ type = "fuel",
+ recipe = "currency:minegeld_bundle",
+ burntime = 1,
})
diff --git a/craftitems.lua b/craftitems.lua
index 47ad953..a8d7570 100644
--- a/craftitems.lua
+++ b/craftitems.lua
@@ -1,26 +1,30 @@
+-- internationalization boilerplate
+local MP = minetest.get_modpath(minetest.get_current_modname())
+local S, NS = dofile(MP.."/intllib.lua")
+
minetest.register_craftitem("currency:minegeld", {
- description = "1 MineGeld Note",
+ description = S("1 MineGeld Note"),
inventory_image = "minegeld.png",
stack_max = 30000,
groups = {minegeld = 1}
})
minetest.register_craftitem("currency:minegeld_5", {
- description = "5 MineGeld Note",
+ description = S("5 MineGeld Note"),
inventory_image = "minegeld_5.png",
stack_max = 30000,
groups = {minegeld = 1}
})
minetest.register_craftitem("currency:minegeld_10", {
- description = "10 MineGeld Note",
+ description = S("10 MineGeld Note"),
inventory_image = "minegeld_10.png",
stack_max = 30000,
groups = {minegeld = 1}
})
minetest.register_craftitem("currency:minegeld_bundle", {
- description = "Bundle of random Minegeld notes",
+ description = S("Bundle of random Minegeld notes"),
inventory_image = "minegeld_bundle.png",
stack_max = 30000,
})
diff --git a/depends.txt b/depends.txt
index 331d858..b650e9b 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1 +1,4 @@
-default \ No newline at end of file
+default
+intllib?
+loot?
+pipeworks? \ No newline at end of file
diff --git a/income.lua b/income.lua
index 2bb42bc..cbbd5d8 100644
--- a/income.lua
+++ b/income.lua
@@ -1,5 +1,9 @@
players_income = {}
+-- internationalization boilerplate
+local MP = minetest.get_modpath(minetest.get_current_modname())
+local S, NS = dofile(MP.."/intllib.lua")
+
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime;
@@ -11,7 +15,7 @@ minetest.register_globalstep(function(dtime)
players_income[name] = 0
end
players_income[name] = 1
- minetest.log("info", "[Currency] basic income for "..name.."")
+ minetest.log("info", "[Currency] "..S("basic income for @1", name))
end
end
end)
@@ -27,7 +31,7 @@ earn_income = function(player)
local inv = player:get_inventory()
inv:add_item("main", {name="currency:minegeld_5", count=count})
players_income[name] = 0
- minetest.log("info", "[Currency] added basic income for "..name.." to inventory")
+ minetest.log("info", "[Currency] "..S("added basic income for @1 to inventory", name))
end
end
diff --git a/init.lua b/init.lua
index 744fcad..6dbf3a9 100644
--- a/init.lua
+++ b/init.lua
@@ -1,20 +1,24 @@
-minetest.log("info", " Currency mod loading... ")
local modpath = minetest.get_modpath("currency")
+-- internationalization boilerplate
+local S, NS = dofile(modpath.."/intllib.lua")
+
+minetest.log("info", S("Currency mod loading..."))
+
dofile(modpath.."/craftitems.lua")
-minetest.log("info", "[Currency] Craft_items Loaded!")
+minetest.log("info", "[Currency] "..S("Craft_items Loaded!"))
dofile(modpath.."/shop.lua")
-minetest.log("info", "[Currency] Shop Loaded!")
+minetest.log("info", "[Currency] "..S("Shop Loaded!"))
dofile(modpath.."/barter.lua")
-minetest.log("info", "[Currency] Barter Loaded!")
+minetest.log("info", "[Currency] "..S("Barter Loaded!"))
dofile(modpath.."/safe.lua")
-minetest.log("info", "[Currency] Safe Loaded!")
+minetest.log("info", "[Currency] "..S("Safe Loaded!"))
dofile(modpath.."/crafting.lua")
-minetest.log("info", "[Currency] Crafting Loaded!")
+minetest.log("info", "[Currency] "..S("Crafting Loaded!"))
-if minetest.setting_getbool("creative_mode") then
- minetest.log("info", "[Currency] Creative mode in use, skipping basic income.")
+if minetest.settings:get_bool("creative_mode") then
+ minetest.log("info", "[Currency] "..S("Creative mode in use, skipping basic income."))
else
dofile(modpath.."/income.lua")
- minetest.log("info", "[Currency] Income Loaded!")
+ minetest.log("info", "[Currency] "..S("Income Loaded!"))
end
diff --git a/intllib.lua b/intllib.lua
new file mode 100644
index 0000000..6669d72
--- /dev/null
+++ b/intllib.lua
@@ -0,0 +1,45 @@
+
+-- Fallback functions for when `intllib` is not installed.
+-- Code released under Unlicense <http://unlicense.org>.
+
+-- Get the latest version of this file at:
+-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
+
+local function format(str, ...)
+ local args = { ... }
+ local function repl(escape, open, num, close)
+ if escape == "" then
+ local replacement = tostring(args[tonumber(num)])
+ if open == "" then
+ replacement = replacement..close
+ end
+ return replacement
+ else
+ return "@"..open..num..close
+ end
+ end
+ return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
+end
+
+local gettext, ngettext
+if minetest.get_modpath("intllib") then
+ if intllib.make_gettext_pair then
+ -- New method using gettext.
+ gettext, ngettext = intllib.make_gettext_pair()
+ else
+ -- Old method using text files.
+ gettext = intllib.Getter()
+ end
+end
+
+-- Fill in missing functions.
+
+gettext = gettext or function(msgid, ...)
+ return format(msgid, ...)
+end
+
+ngettext = ngettext or function(msgid, msgid_plural, n, ...)
+ return format(n==1 and msgid or msgid_plural, ...)
+end
+
+return gettext, ngettext
diff --git a/locale/de.po b/locale/de.po
new file mode 100644
index 0000000..ba2e853
--- /dev/null
+++ b/locale/de.po
@@ -0,0 +1,183 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-05-24 22:01+0200\n"
+"PO-Revision-Date: 2018-05-24 22:48+0200\n"
+"Last-Translator: A.C.M. <undertakers_help@yahoo.com>\n"
+"Language-Team: \n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.7\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: barter.lua
+msgid "Start"
+msgstr "Start"
+
+#: barter.lua
+msgid "Confirm"
+msgstr "Bestätigen"
+
+#: barter.lua
+msgid "Cancel"
+msgstr "Abbruch"
+
+#: barter.lua shop.lua
+msgid "Exchange"
+msgstr "Tausch"
+
+#: barter.lua
+msgid "Barter Table"
+msgstr "Tausch Tisch"
+
+#: craftitems.lua
+msgid "1 MineGeld Note"
+msgstr "1 Minegeld Banknote"
+
+#: craftitems.lua
+msgid "5 MineGeld Note"
+msgstr "5 Minegeld Banknote"
+
+#: craftitems.lua
+msgid "10 MineGeld Note"
+msgstr "10 Minegeld Banknote"
+
+#: craftitems.lua
+msgid "50 MineGeld Note"
+msgstr "50 Minegeld Banknote"
+
+#: craftitems.lua
+msgid "Bundle of random Minegeld notes"
+msgstr "Bündel von verschiedenen Minegeld Banknoten"
+
+#: income.lua
+msgid "basic income for @1"
+msgstr "Grundeinkommen für @1"
+
+#: income.lua
+msgid "added basic income for @1 to inventory"
+msgstr "Grundeinkommen für @1 ins Inventar gelegt"
+
+#: init.lua
+msgid "Currency mod loading..."
+msgstr "Currency mod lädt..."
+
+#: init.lua
+msgid "Craft_items Loaded!"
+msgstr "Craft_items geladen!"
+
+#: init.lua
+msgid "Shop Loaded!"
+msgstr "Geschäft geladen!"
+
+#: init.lua
+msgid "Barter Loaded!"
+msgstr "Tauschtisch geladen!"
+
+#: init.lua
+msgid "Safe Loaded!"
+msgstr "Safe geladen!"
+
+#: init.lua
+msgid "Crafting Loaded!"
+msgstr "Crafting geladen!"
+
+#: init.lua
+msgid "Creative mode in use, skipping basic income."
+msgstr "Kreativmodus eingeschalten, überspringe Grundeinkommen."
+
+#: init.lua
+msgid "Income Loaded!"
+msgstr "Income geladen!"
+
+#: safe.lua
+msgid "Safe"
+msgstr "Safe"
+
+#: safe.lua
+msgid "Safe (owned by @1)"
+msgstr "Safe (gehört @1)"
+
+#: safe.lua
+msgid "@1 tried to access a safe belonging to @2 at @3"
+msgstr "@1 versuchte den Zugriff auf Safe von @2 bei @3"
+
+#: safe.lua
+msgid "@1 moves stuff in safe at @2"
+msgstr "@1 verschiebt Gegenstände in den Safe bei @2"
+
+#: safe.lua
+msgid "@1 moves stuff to safe at @2"
+msgstr "@1 verschiebt Gegenstände nach Safe bei @2"
+
+#: safe.lua
+msgid "@1 takes stuff from safe at @2"
+msgstr "@1 nimmt Gegenstände aus Safe bei @2"
+
+#: shop.lua
+msgid "Customer gives (pay here!)"
+msgstr "Kunde gibt (bezahl hier!)"
+
+#: shop.lua
+msgid "Customer gets:"
+msgstr "Kunde bekommt:"
+
+#: shop.lua
+msgid "Owner wants:"
+msgstr "Inhaber will:"
+
+#: shop.lua
+msgid "Owner gives:"
+msgstr "Inhaber gibt:"
+
+#: shop.lua
+msgid "Customers gave:"
+msgstr "Kunde gab:"
+
+#: shop.lua
+msgid "Your stock:"
+msgstr "Dein Lager:"
+
+#: shop.lua
+msgid "You want:"
+msgstr "Du willst:"
+
+#: shop.lua
+msgid "In exchange, you give:"
+msgstr "Im Tausch, du gibst:"
+
+#: shop.lua
+msgid "Owner, Use (E)+Place (right mouse button) for customer interface"
+msgstr "Inhaber, Benutze (E)+Platziere (rechte Maustaste) für Kunde ..."
+
+#: shop.lua
+msgid "Shop"
+msgstr "Geschäft"
+
+#: shop.lua
+msgid "Exchange shop (owned by @1)"
+msgstr "Tauschgeschäft (gehört @1)"
+
+#: shop.lua
+msgid "This is your own shop, you can't exchange to yourself!"
+msgstr "Das ist dein eigenes Geschäft, du kannst nicht mit dir selbst tauschen!"
+
+#: shop.lua
+msgid "Exchanged!"
+msgstr "Getauscht!"
+
+#: shop.lua
+msgid "Exchange can not be done, contact the shop owner."
+msgstr "Tausch kann nicht abgeschlossen werden, benachrichtige den Geschäftsinhaber."
+
+#: shop.lua
+msgid "Exchange can not be done, check if you put all items!"
+msgstr "Tausch kann nicht abgeschlossen werden, prüfe nochmal alles was du hinein gelegt hast!"
diff --git a/locale/fr.po b/locale/fr.po
new file mode 100644
index 0000000..cdc803b
--- /dev/null
+++ b/locale/fr.po
@@ -0,0 +1,187 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-05-24 23:06+0200\n"
+"PO-Revision-Date: 2018-05-12 14:55+0200\n"
+"Last-Translator: Papou30\n"
+"Language-Team: \n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.7\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: barter.lua
+msgid "Start"
+msgstr "Début"
+
+#: barter.lua
+msgid "Confirm"
+msgstr "Confirmer"
+
+#: barter.lua
+msgid "Cancel"
+msgstr "Annuler"
+
+#: barter.lua shop.lua
+msgid "Exchange"
+msgstr "Échange"
+
+#: barter.lua
+msgid "Barter Table"
+msgstr "Table de troc"
+
+#: craftitems.lua
+msgid "1 MineGeld Note"
+msgstr "1 MineGeld"
+
+#: craftitems.lua
+msgid "5 MineGeld Note"
+msgstr "5 MineGeld"
+
+#: craftitems.lua
+msgid "10 MineGeld Note"
+msgstr "10 MineGeld"
+
+#: craftitems.lua
+#, fuzzy
+msgid "50 MineGeld Note"
+msgstr "5 MineGeld"
+
+#: craftitems.lua
+msgid "Bundle of random Minegeld notes"
+msgstr "Liasse de Minegeld aléatoire"
+
+#: income.lua
+msgid "basic income for @1"
+msgstr "revenu de base pour @1"
+
+#: income.lua
+msgid "added basic income for @1 to inventory"
+msgstr "revenu de base ajouté pour @1 à l'inventaire"
+
+#: init.lua
+msgid "Currency mod loading..."
+msgstr "Chargement du mod Currency..."
+
+#: init.lua
+msgid "Craft_items Loaded!"
+msgstr "Fabrication d'objets (Craft_items) chargé!"
+
+#: init.lua
+msgid "Shop Loaded!"
+msgstr "Boutique (Shop) chargée!"
+
+#: init.lua
+msgid "Barter Loaded!"
+msgstr "Troc (Barter) chargé!"
+
+#: init.lua
+msgid "Safe Loaded!"
+msgstr "Coffre-fort (Safe) chargé!"
+
+#: init.lua
+msgid "Crafting Loaded!"
+msgstr "Artisanat (Crafting) chargé!"
+
+#: init.lua
+msgid "Creative mode in use, skipping basic income."
+msgstr "Mod créatif en cours d'utilisation, ignoré le revenu de base."
+
+#: init.lua
+msgid "Income Loaded!"
+msgstr "Revenu de base (Income) chargé!"
+
+#: safe.lua
+msgid "Safe"
+msgstr "Coffre-fort"
+
+#: safe.lua
+msgid "Safe (owned by @1)"
+msgstr "Coffre-fort (appartenant à @1)"
+
+#: safe.lua
+msgid "@1 tried to access a safe belonging to @2 at @3"
+msgstr "@1 a tenté d'accéder à un coffre-fort appartenant à @2 à @3"
+
+#: safe.lua
+msgid "@1 moves stuff in safe at @2"
+msgstr "@1 déplace le matériel dans coffre-fort à @2"
+
+#: safe.lua
+msgid "@1 moves stuff to safe at @2"
+msgstr "@1 déplace le matériel vers coffre-fort à @2"
+
+#: safe.lua
+msgid "@1 takes stuff from safe at @2"
+msgstr "@1 prend le matériel dans le coffre-fort à @2"
+
+#: shop.lua
+msgid "Customer gives (pay here!)"
+msgstr "Client donne (payer ici!)"
+
+#: shop.lua
+msgid "Customer gets:"
+msgstr "Client obtient:"
+
+#: shop.lua
+msgid "Owner wants:"
+msgstr "Le propriétaire veut:"
+
+#: shop.lua
+msgid "Owner gives:"
+msgstr "Propriétaire donne:"
+
+#: shop.lua
+msgid "Customers gave:"
+msgstr "Le client a donné:"
+
+#: shop.lua
+msgid "Your stock:"
+msgstr "Votre stock:"
+
+#: shop.lua
+msgid "You want:"
+msgstr "Vous voulez:"
+
+#: shop.lua
+msgid "In exchange, you give:"
+msgstr "En échange, vous donnez:"
+
+#: shop.lua
+msgid "Owner, Use (E)+Place (right mouse button) for customer interface"
+msgstr ""
+"Propriétaire, utilisez (E) + place (bouton droit de la souris) pour "
+"l'interface client"
+
+#: shop.lua
+msgid "Shop"
+msgstr "Boutique"
+
+#: shop.lua
+msgid "Exchange shop (owned by @1)"
+msgstr "Boutique d'échange (détenue par @1)"
+
+#: shop.lua
+msgid "This is your own shop, you can't exchange to yourself!"
+msgstr "C'est ta propre boutique, tu ne peux pas échanger avec toi-même!"
+
+#: shop.lua
+msgid "Exchanged!"
+msgstr "Échangé!"
+
+#: shop.lua
+msgid "Exchange can not be done, contact the shop owner."
+msgstr "L'échange ne peut être fait, contactez le propriétaire du magasin."
+
+#: shop.lua
+msgid "Exchange can not be done, check if you put all items!"
+msgstr ""
+"L'echange ne peut pas etre fait, verifiez si vous mettez tous les articles!"
diff --git a/locale/ms.po b/locale/ms.po
new file mode 100644
index 0000000..f6a3f5b
--- /dev/null
+++ b/locale/ms.po
@@ -0,0 +1,186 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-05-24 23:06+0200\n"
+"PO-Revision-Date: 2017-10-17 02:03+0800\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: ms\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.4\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: barter.lua
+msgid "Start"
+msgstr "Mula"
+
+#: barter.lua
+msgid "Confirm"
+msgstr "Sah"
+
+#: barter.lua
+msgid "Cancel"
+msgstr "Batal"
+
+#: barter.lua shop.lua
+msgid "Exchange"
+msgstr "Tukar"
+
+#: barter.lua
+msgid "Barter Table"
+msgstr "Meja Barter"
+
+#: craftitems.lua
+msgid "1 MineGeld Note"
+msgstr "Wang 1 MineGeld"
+
+#: craftitems.lua
+msgid "5 MineGeld Note"
+msgstr "Wang 5 MineGeld"
+
+#: craftitems.lua
+msgid "10 MineGeld Note"
+msgstr "Wang 10 MineGeld"
+
+#: craftitems.lua
+#, fuzzy
+msgid "50 MineGeld Note"
+msgstr "Wang 5 MineGeld"
+
+#: craftitems.lua
+msgid "Bundle of random Minegeld notes"
+msgstr "Seberkas wang Minegeld rawak"
+
+#: income.lua
+msgid "basic income for @1"
+msgstr "pendapatan asas untuk @1"
+
+#: income.lua
+msgid "added basic income for @1 to inventory"
+msgstr "pendapatan asas untuk @1 ditambah masuk ke dalam inventori"
+
+#: init.lua
+msgid "Currency mod loading..."
+msgstr "Memuatkan mods Currency..."
+
+#: init.lua
+msgid "Craft_items Loaded!"
+msgstr "Item pertukangan dimuatkan!"
+
+#: init.lua
+msgid "Shop Loaded!"
+msgstr "Kedai dimuatkan!"
+
+#: init.lua
+msgid "Barter Loaded!"
+msgstr "Meja barter dimuatkan!"
+
+#: init.lua
+msgid "Safe Loaded!"
+msgstr "Peti besi dimuatkan!"
+
+#: init.lua
+msgid "Crafting Loaded!"
+msgstr "Pertukangan dimuatkan!"
+
+#: init.lua
+msgid "Creative mode in use, skipping basic income."
+msgstr "Dalam mod kreatif, pendapatan asas diabaikan."
+
+#: init.lua
+msgid "Income Loaded!"
+msgstr "Pendapatan dimuatkan!"
+
+#: safe.lua
+msgid "Safe"
+msgstr "Peti besi"
+
+#: safe.lua
+msgid "Safe (owned by @1)"
+msgstr "Peti besi (pemilik: @1)"
+
+#: safe.lua
+msgid "@1 tried to access a safe belonging to @2 at @3"
+msgstr "@1 cuba untuk mengakses peti besi milik @2 di @3"
+
+#: safe.lua
+msgid "@1 moves stuff in safe at @2"
+msgstr "@1 pindahkan barang dalam peti besi di @2"
+
+#: safe.lua
+msgid "@1 moves stuff to safe at @2"
+msgstr "@1 masukkan barang dalam peti besi di @2"
+
+#: safe.lua
+msgid "@1 takes stuff from safe at @2"
+msgstr "@1 keluarkan barang dari peti besi di @2"
+
+#: shop.lua
+msgid "Customer gives (pay here!)"
+msgstr "Pelanggan beri (bayar sini!)"
+
+#: shop.lua
+msgid "Customer gets:"
+msgstr "Pelanggan dapat:"
+
+#: shop.lua
+msgid "Owner wants:"
+msgstr "Penjual inginkan:"
+
+#: shop.lua
+msgid "Owner gives:"
+msgstr "Penjual berikan:"
+
+#: shop.lua
+msgid "Customers gave:"
+msgstr "Pelanggan berikan:"
+
+#: shop.lua
+msgid "Your stock:"
+msgstr "Stok anda:"
+
+#: shop.lua
+msgid "You want:"
+msgstr "Anda mahukan:"
+
+#: shop.lua
+msgid "In exchange, you give:"
+msgstr "Anda berikan:"
+
+#: shop.lua
+msgid "Owner, Use (E)+Place (right mouse button) for customer interface"
+msgstr ""
+"Penjual, Gunakan (E) + Letak (butang tetikus kanan) untuk antaramuka "
+"pelanggan"
+
+#: shop.lua
+msgid "Shop"
+msgstr "Kedai"
+
+#: shop.lua
+msgid "Exchange shop (owned by @1)"
+msgstr "Kedai (pemilik: @1)"
+
+#: shop.lua
+msgid "This is your own shop, you can't exchange to yourself!"
+msgstr "Ini kedai anda, anda tidak boleh menjual kepada diri sendiri!"
+
+#: shop.lua
+msgid "Exchanged!"
+msgstr "Jual!"
+
+#: shop.lua
+msgid "Exchange can not be done, contact the shop owner."
+msgstr "Tak boleh jual, hubungi penjual."
+
+#: shop.lua
+msgid "Exchange can not be done, check if you put all items!"
+msgstr "Tak boleh jual, pastikan anda ada apa yang penjual mahukan!"
diff --git a/locale/ru.po b/locale/ru.po
new file mode 100644
index 0000000..8084d68
--- /dev/null
+++ b/locale/ru.po
@@ -0,0 +1,187 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-05-24 23:06+0200\n"
+"PO-Revision-Date: 2017-08-11 19:03+0300\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.3\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#: barter.lua
+msgid "Start"
+msgstr "Старт"
+
+#: barter.lua
+msgid "Confirm"
+msgstr "Подтверждение"
+
+#: barter.lua
+msgid "Cancel"
+msgstr "Отмена"
+
+#: barter.lua shop.lua
+msgid "Exchange"
+msgstr "Обмен"
+
+#: barter.lua
+msgid "Barter Table"
+msgstr "Таблица бартера"
+
+#: craftitems.lua
+msgid "1 MineGeld Note"
+msgstr "Банкнота в 1 MineGeld"
+
+#: craftitems.lua
+msgid "5 MineGeld Note"
+msgstr "Банкнота в 5 MineGeld"
+
+#: craftitems.lua
+msgid "10 MineGeld Note"
+msgstr "Банкнота в 10 MineGeld"
+
+#: craftitems.lua
+#, fuzzy
+msgid "50 MineGeld Note"
+msgstr "Банкнота в 5 MineGeld"
+
+#: craftitems.lua
+msgid "Bundle of random Minegeld notes"
+msgstr "Пачка случайных банкнот Minegeld"
+
+#: income.lua
+msgid "basic income for @1"
+msgstr "базовая прибыль для @1"
+
+#: income.lua
+msgid "added basic income for @1 to inventory"
+msgstr "базовая прибыль для @1 добавлена в инвентарь"
+
+#: init.lua
+msgid "Currency mod loading..."
+msgstr "Загружается мод Currency..."
+
+#: init.lua
+msgid "Craft_items Loaded!"
+msgstr "Предметы для сборки загружены!"
+
+#: init.lua
+msgid "Shop Loaded!"
+msgstr "Магазин загружен!"
+
+#: init.lua
+msgid "Barter Loaded!"
+msgstr "Бартер загружен!"
+
+#: init.lua
+msgid "Safe Loaded!"
+msgstr "Сейф загружен!"
+
+#: init.lua
+msgid "Crafting Loaded!"
+msgstr "Механизм сборки загружен!"
+
+#: init.lua
+msgid "Creative mode in use, skipping basic income."
+msgstr "Используется режим творчества, пропускаем базовую прибыль."
+
+#: init.lua
+msgid "Income Loaded!"
+msgstr "Прибыль загружена!"
+
+#: safe.lua
+msgid "Safe"
+msgstr "Сейф"
+
+#: safe.lua
+msgid "Safe (owned by @1)"
+msgstr "Сейф (принадлежит @1)"
+
+#: safe.lua
+msgid "@1 tried to access a safe belonging to @2 at @3"
+msgstr "@1 попробовал открыть сейф, принадлежащий @2 в @3"
+
+#: safe.lua
+msgid "@1 moves stuff in safe at @2"
+msgstr "@1 перемещает вещи в сейфе в @2"
+
+#: safe.lua
+msgid "@1 moves stuff to safe at @2"
+msgstr "@1 кладёт вещи в сейф в @2"
+
+#: safe.lua
+msgid "@1 takes stuff from safe at @2"
+msgstr "@1 забирает вещи из сейфа в @2"
+
+#: shop.lua
+msgid "Customer gives (pay here!)"
+msgstr "Покупатель отдаёт (здесь оплата!)"
+
+#: shop.lua
+msgid "Customer gets:"
+msgstr "Покупатель получает:"
+
+#: shop.lua
+msgid "Owner wants:"
+msgstr "Владелец хочет:"
+
+#: shop.lua
+msgid "Owner gives:"
+msgstr "Владелец отдаёт:"
+
+#: shop.lua
+msgid "Customers gave:"
+msgstr "Покупатель отдал:"
+
+#: shop.lua
+msgid "Your stock:"
+msgstr "Ваш запас:"
+
+#: shop.lua
+msgid "You want:"
+msgstr "Вы хотите:"
+
+#: shop.lua
+msgid "In exchange, you give:"
+msgstr "Взамен вы даёте:"
+
+#: shop.lua
+msgid "Owner, Use (E)+Place (right mouse button) for customer interface"
+msgstr ""
+"Владелец, используйте (E)+Разместить (правая кнопка мыши) для открытия "
+"интерфейса покупателя"
+
+#: shop.lua
+msgid "Shop"
+msgstr "Магазин"
+
+#: shop.lua
+msgid "Exchange shop (owned by @1)"
+msgstr "Пункт обмена (принадлежит @1)"
+
+#: shop.lua
+msgid "This is your own shop, you can't exchange to yourself!"
+msgstr "Это ваш собственный магазин, вы не можете обмениваться с самим собой!"
+
+#: shop.lua
+msgid "Exchanged!"
+msgstr "Обмен произведён!"
+
+#: shop.lua
+msgid "Exchange can not be done, contact the shop owner."
+msgstr "Обмен невозможен, свяжитесь с владельцем магазина."
+
+#: shop.lua
+msgid "Exchange can not be done, check if you put all items!"
+msgstr "Обмен невозможен, проверьте, что вы положили все предметы!"
diff --git a/locale/template.pot b/locale/template.pot
new file mode 100644
index 0000000..396dde0
--- /dev/null
+++ b/locale/template.pot
@@ -0,0 +1,182 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-05-24 23:06+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: barter.lua
+msgid "Start"
+msgstr ""
+
+#: barter.lua
+msgid "Confirm"
+msgstr ""
+
+#: barter.lua
+msgid "Cancel"
+msgstr ""
+
+#: barter.lua shop.lua
+msgid "Exchange"
+msgstr ""
+
+#: barter.lua
+msgid "Barter Table"
+msgstr ""
+
+#: craftitems.lua
+msgid "1 MineGeld Note"
+msgstr ""
+
+#: craftitems.lua
+msgid "5 MineGeld Note"
+msgstr ""
+
+#: craftitems.lua
+msgid "10 MineGeld Note"
+msgstr ""
+
+#: craftitems.lua
+msgid "50 MineGeld Note"
+msgstr ""
+
+#: craftitems.lua
+msgid "Bundle of random Minegeld notes"
+msgstr ""
+
+#: income.lua
+msgid "basic income for @1"
+msgstr ""
+
+#: income.lua
+msgid "added basic income for @1 to inventory"
+msgstr ""
+
+#: init.lua
+msgid "Currency mod loading..."
+msgstr ""
+
+#: init.lua
+msgid "Craft_items Loaded!"
+msgstr ""
+
+#: init.lua
+msgid "Shop Loaded!"
+msgstr ""
+
+#: init.lua
+msgid "Barter Loaded!"
+msgstr ""
+
+#: init.lua
+msgid "Safe Loaded!"
+msgstr ""
+
+#: init.lua
+msgid "Crafting Loaded!"
+msgstr ""
+
+#: init.lua
+msgid "Creative mode in use, skipping basic income."
+msgstr ""
+
+#: init.lua
+msgid "Income Loaded!"
+msgstr ""
+
+#: safe.lua
+msgid "Safe"
+msgstr ""
+
+#: safe.lua
+msgid "Safe (owned by @1)"
+msgstr ""
+
+#: safe.lua
+msgid "@1 tried to access a safe belonging to @2 at @3"
+msgstr ""
+
+#: safe.lua
+msgid "@1 moves stuff in safe at @2"
+msgstr ""
+
+#: safe.lua
+msgid "@1 moves stuff to safe at @2"
+msgstr ""
+
+#: safe.lua
+msgid "@1 takes stuff from safe at @2"
+msgstr ""
+
+#: shop.lua
+msgid "Customer gives (pay here!)"
+msgstr ""
+
+#: shop.lua
+msgid "Customer gets:"
+msgstr ""
+
+#: shop.lua
+msgid "Owner wants:"
+msgstr ""
+
+#: shop.lua
+msgid "Owner gives:"
+msgstr ""
+
+#: shop.lua
+msgid "Customers gave:"
+msgstr ""
+
+#: shop.lua
+msgid "Your stock:"
+msgstr ""
+
+#: shop.lua
+msgid "You want:"
+msgstr ""
+
+#: shop.lua
+msgid "In exchange, you give:"
+msgstr ""
+
+#: shop.lua
+msgid "Owner, Use (E)+Place (right mouse button) for customer interface"
+msgstr ""
+
+#: shop.lua
+msgid "Shop"
+msgstr ""
+
+#: shop.lua
+msgid "Exchange shop (owned by @1)"
+msgstr ""
+
+#: shop.lua
+msgid "This is your own shop, you can't exchange to yourself!"
+msgstr ""
+
+#: shop.lua
+msgid "Exchanged!"
+msgstr ""
+
+#: shop.lua
+msgid "Exchange can not be done, contact the shop owner."
+msgstr ""
+
+#: shop.lua
+msgid "Exchange can not be done, check if you put all items!"
+msgstr ""
diff --git a/loot.lua b/loot.lua
new file mode 100644
index 0000000..e687724
--- /dev/null
+++ b/loot.lua
@@ -0,0 +1,30 @@
+if not minetest.get_modpath("loot") then
+ return
+end
+
+loot.register_loot({
+ weights = { generic = 50 },
+ payload = {
+ stack = ItemStack("currency:minegeld"),
+ min_size = 1,
+ max_size = 250,
+ },
+})
+
+loot.register_loot({
+ weights = { generic = 50 },
+ payload = {
+ stack = ItemStack("currency:minegeld_5"),
+ min_size = 1,
+ max_size = 50,
+ },
+})
+
+loot.register_loot({
+ weights = { generic = 50 },
+ payload = {
+ stack = ItemStack("currency:minegeld_10"),
+ min_size = 1,
+ max_size = 10,
+ },
+}) \ No newline at end of file
diff --git a/safe.lua b/safe.lua
index 794e23a..b5c3c38 100644
--- a/safe.lua
+++ b/safe.lua
@@ -1,9 +1,15 @@
+-- internationalization boilerplate
+local MP = minetest.get_modpath(minetest.get_current_modname())
+local S, NS = dofile(MP.."/intllib.lua")
+
function default.get_safe_formspec(pos)
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
local formspec =
"size[8,9]"..
"list[nodemeta:".. spos .. ";main;1,1;6,2;]"..
- "list[current_player;main;0,5;8,4;]"
+ "list[current_player;main;0,5;8,4;]"..
+ "listring[nodemeta:".. spos .. ";main]"..
+ "listring[current_player;main]"
return formspec
end
@@ -22,12 +28,12 @@ local function has_safe_privilege(meta, player)
end
minetest.register_node("currency:safe", {
- description = "Safe",
+ description = S("Safe"),
inventory_image = "safe_front.png",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"safe_side.png",
- "safe_side.png",
+ "safe_side.png",
"safe_side.png",
"safe_side.png",
"safe_side.png",
@@ -37,8 +43,7 @@ minetest.register_node("currency:safe", {
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "")
- meta:set_string("infotext", "Safe (owned by "..
- meta:get_string("owner")..")")
+ meta:set_string("infotext", S("Safe (owned by @1)", meta:get_string("owner")))
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@@ -55,10 +60,8 @@ minetest.register_node("currency:safe", {
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local meta = minetest.get_meta(pos)
if not has_safe_privilege(meta, player) then
- minetest.log("action", player:get_player_name()..
- " tried to access a safe belonging to "..
- meta:get_string("owner").." at "..
- minetest.pos_to_string(pos))
+ minetest.log("action", S("@1 tried to access a safe belonging to @2 at @3",
+ player:get_player_name(), meta:get_string("owner"), minetest.pos_to_string(pos)))
return 0
end
return count
@@ -66,10 +69,8 @@ minetest.register_node("currency:safe", {
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if not has_safe_privilege(meta, player) then
- minetest.log("action", player:get_player_name()..
- " tried to access a safe belonging to "..
- meta:get_string("owner").." at "..
- minetest.pos_to_string(pos))
+ minetest.log("action", S("@1 tried to access a safe belonging to @2 at @3",
+ player:get_player_name(), meta:get_string("owner"), minetest.pos_to_string(pos)))
return 0
end
return stack:get_count()
@@ -77,25 +78,20 @@ minetest.register_node("currency:safe", {
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if not has_safe_privilege(meta, player) then
- minetest.log("action", player:get_player_name()..
- " tried to access a safe belonging to "..
- meta:get_string("owner").." at "..
- minetest.pos_to_string(pos))
+ minetest.log("action", S("@1 tried to access a safe belonging to @2 at @3",
+ player:get_player_name(), meta:get_string("owner"), minetest.pos_to_string(pos)))
return 0
end
return stack:get_count()
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
- minetest.log("action", player:get_player_name()..
- " moves stuff in safe at "..minetest.pos_to_string(pos))
+ minetest.log("action", S("@1 moves stuff in safe at @2", player:get_player_name(), minetest.pos_to_string(pos)))
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
- minetest.log("action", player:get_player_name()..
- " moves stuff to safe at "..minetest.pos_to_string(pos))
+ minetest.log("action", S("@1 moves stuff to safe at @2", player:get_player_name(), minetest.pos_to_string(pos)))
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
- minetest.log("action", player:get_player_name()..
- " takes stuff from safe at "..minetest.pos_to_string(pos))
+ minetest.log("action", S("@1 takes stuff from safe at @2", player:get_player_name(), minetest.pos_to_string(pos)))
end,
on_rightclick = function(pos, node, clicker)
local meta = minetest.get_meta(pos)
diff --git a/shop.lua b/shop.lua
index 08bfac7..301a08c 100644
--- a/shop.lua
+++ b/shop.lua
@@ -1,38 +1,44 @@
+-- internationalization boilerplate
+local MP = minetest.get_modpath(minetest.get_current_modname())
+local S, NS = dofile(MP.."/intllib.lua")
+
default.shop = {}
default.shop.current_shop = {}
default.shop.formspec = {
customer = function(pos)
local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z
local formspec = "size[8,9.5]"..
- "label[0,0;Customer gives (pay here !)]"..
+ "label[0,0;" .. S("Customer gives (pay here!)") .. "]"..
"list[current_player;customer_gives;0,0.5;3,2;]"..
- "label[0,2.5;Customer gets]"..
+ "label[0,2.5;" .. S("Customer gets:") .. "]"..
"list[current_player;customer_gets;0,3;3,2;]"..
- "label[5,0;Owner wants]"..
+ "label[5,0;" .. S("Owner wants:") .. "]"..
"list["..list_name..";owner_wants;5,0.5;3,2;]"..
- "label[5,2.5;Owner gives]"..
+ "label[5,2.5;" .. S("Owner gives:") .. "]"..
"list["..list_name..";owner_gives;5,3;3,2;]"..
"list[current_player;main;0,5.5;8,4;]"..
- "button[3,2;2,1;exchange;Exchange]"
+ "button[3,2;2,1;exchange;" .. S("Exchange") .. "]"
return formspec
end,
owner = function(pos)
local list_name = "nodemeta:"..pos.x..','..pos.y..','..pos.z
local formspec = "size[8,9.5]"..
- "label[0,0;Customers gave:]"..
+ "label[0,0;" .. S("Customers gave:") .. "]"..
"list["..list_name..";customers_gave;0,0.5;3,2;]"..
- "label[0,2.5;Your stock:]"..
+ "label[0,2.5;" .. S("Your stock:") .. "]"..
"list["..list_name..";stock;0,3;3,2;]"..
- "label[5,0;You want:]"..
+ "label[5,0;" .. S("You want:") .. "]"..
"list["..list_name..";owner_wants;5,0.5;3,2;]"..
- "label[5,2.5;In exchange, you give:]"..
+ "label[5,2.5;" .. S("In exchange, you give:") .. "]"..
"list["..list_name..";owner_gives;5,3;3,2;]"..
- "label[0,5;Owner, Use(E)+Place(RMB) for customer interface]"..
+ "label[0,5;" .. S("Owner, Use (E)+Place (right mouse button) for customer interface") .. "]"..
"list[current_player;main;0,5.5;8,4;]"
return formspec
end,
}
+local have_pipeworks = minetest.global_exists("pipeworks")
+
default.shop.check_privilege = function(listname,playername,meta)
--[[if listname == "pl1" then
if playername ~= meta:get_string("pl1") then
@@ -81,21 +87,21 @@ default.shop.exchange = function(meta)
end
minetest.register_node("currency:shop", {
- description = "Shop",
+ description = S("Shop"),
paramtype2 = "facedir",
tiles = {"shop_top.png",
- "shop_top.png",
+ "shop_top.png",
"shop_side.png",
"shop_side.png",
"shop_side.png",
"shop_front.png"},
inventory_image = "shop_front.png",
- groups = {choppy=2,oddly_breakable_by_hand=2},
+ groups = {choppy=2,oddly_breakable_by_hand=2,tubedevice=1,tubedevice_receiver=1},
sounds = default.node_sound_wood_defaults(),
after_place_node = function(pos, placer, itemstack)
local owner = placer:get_player_name()
local meta = minetest.get_meta(pos)
- meta:set_string("infotext", "Exchange shop (owned by "..owner..")")
+ meta:set_string("infotext", S("Exchange shop (owned by @1)", owner))
meta:set_string("owner",owner)
--[[meta:set_string("pl1","")
meta:set_string("pl2","")]]
@@ -104,7 +110,23 @@ minetest.register_node("currency:shop", {
inv:set_size("stock", 3*2)
inv:set_size("owner_wants", 3*2)
inv:set_size("owner_gives", 3*2)
+ if have_pipeworks then pipeworks.after_place(pos) end
end,
+ after_dig_node = (have_pipeworks and pipeworks and pipeworks.after_dig),
+ tube = {
+ insert_object = function(pos, node, stack, direction)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ return inv:add_item("stock",stack)
+ end,
+ can_insert = function(pos,node,stack,direction)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ return inv:room_for_item("stock", stack)
+ end,
+ input_inventory = "customers_gave",
+ connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
+ },
on_rightclick = function(pos, node, clicker, itemstack)
clicker:get_inventory():set_size("customer_gives", 3*2)
clicker:get_inventory():set_size("customer_gets", 3*2)
@@ -144,7 +166,7 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
local pos = default.shop.current_shop[name]
local meta = minetest.get_meta(pos)
if meta:get_string("owner") == name then
- minetest.chat_send_player(name,"This is your own shop, you can't exchange to yourself !")
+ minetest.chat_send_player(name,S("This is your own shop, you can't exchange to yourself!"))
else
local minv = meta:get_inventory()
local pinv = sender:get_inventory()
@@ -181,12 +203,12 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
minv:remove_item("stock",item)
pinv:add_item("customer_gets",item)
end
- minetest.chat_send_player(name,"Exchanged!")
+ minetest.chat_send_player(name,S("Exchanged!"))
else
if owners_fault then
- minetest.chat_send_player(name,"Exchange can not be done, contact the shop owner.")
+ minetest.chat_send_player(name,S("Exchange can not be done, contact the shop owner."))
else
- minetest.chat_send_player(name,"Exchange can not be done, check if you put all items !")
+ minetest.chat_send_player(name,S("Exchange can not be done, check if you put all items!"))
end
end
end
diff --git a/textures/minegeld_50.png b/textures/minegeld_50.png
new file mode 100644
index 0000000..8371bc0
--- /dev/null
+++ b/textures/minegeld_50.png
Binary files differ