aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--barter.lua28
-rw-r--r--crafting.lua9
-rw-r--r--craftitems.lua63
-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.lua67
-rw-r--r--textures/minegeld.pngbin3563 -> 1514 bytes
-rw-r--r--textures/minegeld_10.pngbin3509 -> 1526 bytes
-rw-r--r--textures/minegeld_1000.pngbin0 -> 1838 bytes
-rw-r--r--textures/minegeld_1000_10_4.pngbin0 -> 2034 bytes
-rw-r--r--textures/minegeld_1000_animal_extinction.pngbin0 -> 2064 bytes
-rw-r--r--textures/minegeld_1000_antishroom.pngbin0 -> 2044 bytes
-rw-r--r--textures/minegeld_1000_bamboobayvillage.pngbin0 -> 11392 bytes
-rw-r--r--textures/minegeld_1000_chiculata.pngbin0 -> 1975 bytes
-rw-r--r--textures/minegeld_1000_chile.pngbin0 -> 9997 bytes
-rw-r--r--textures/minegeld_1000_corona.pngbin0 -> 1962 bytes
-rw-r--r--textures/minegeld_1000_crane.pngbin0 -> 9719 bytes
-rw-r--r--textures/minegeld_1000_diamond_mine.pngbin0 -> 11665 bytes
-rw-r--r--textures/minegeld_1000_donation_box.pngbin0 -> 1621 bytes
-rw-r--r--textures/minegeld_1000_dummy_texture.pngbin0 -> 1926 bytes
-rw-r--r--textures/minegeld_1000_e231.pngbin0 -> 1755 bytes
-rw-r--r--textures/minegeld_1000_gabriel.pngbin0 -> 1752 bytes
-rw-r--r--textures/minegeld_1000_green_beast.pngbin0 -> 2166 bytes
-rw-r--r--textures/minegeld_1000_gtsb.pngbin0 -> 1923 bytes
-rw-r--r--textures/minegeld_1000_hrs.pngbin0 -> 2138 bytes
-rw-r--r--textures/minegeld_1000_iso_map.pngbin0 -> 2050 bytes
-rw-r--r--textures/minegeld_1000_lazamonument.pngbin0 -> 9770 bytes
-rw-r--r--textures/minegeld_1000_marinated_tomatoes.pngbin0 -> 2444 bytes
-rw-r--r--textures/minegeld_1000_meat.pngbin0 -> 1852 bytes
-rw-r--r--textures/minegeld_1000_melinka.pngbin0 -> 10071 bytes
-rw-r--r--textures/minegeld_1000_mese_miracle.pngbin0 -> 2057 bytes
-rw-r--r--textures/minegeld_1000_nadine.pngbin0 -> 1828 bytes
-rw-r--r--textures/minegeld_1000_nadinetopia.pngbin0 -> 2009 bytes
-rw-r--r--textures/minegeld_1000_och_noe.pngbin0 -> 1852 bytes
-rw-r--r--textures/minegeld_1000_origin.pngbin0 -> 9932 bytes
-rw-r--r--textures/minegeld_1000_patatas_importancia.pngbin0 -> 2059 bytes
-rw-r--r--textures/minegeld_1000_pathv7.pngbin0 -> 2098 bytes
-rw-r--r--textures/minegeld_1000_pickled_eggs2.pngbin0 -> 10417 bytes
-rw-r--r--textures/minegeld_1000_pitchfork_torch_all.pngbin0 -> 2991 bytes
-rw-r--r--textures/minegeld_1000_raja.pngbin0 -> 9452 bytes
-rw-r--r--textures/minegeld_1000_respects.pngbin0 -> 10521 bytes
-rw-r--r--textures/minegeld_1000_smacker.pngbin0 -> 2011 bytes
-rw-r--r--textures/minegeld_1000_spnmain.pngbin0 -> 1896 bytes
-rw-r--r--textures/minegeld_1000_trisiston.pngbin0 -> 1978 bytes
-rw-r--r--textures/minegeld_1000_unknown_item.pngbin0 -> 1897 bytes
-rw-r--r--textures/minegeld_1000_wallmapu.pngbin0 -> 10420 bytes
-rw-r--r--textures/minegeld_1000_wiki.pngbin0 -> 1757 bytes
-rw-r--r--textures/minegeld_1000_wirecard.pngbin0 -> 16597 bytes
-rw-r--r--textures/minegeld_1000_xnihilo.pngbin0 -> 1953 bytes
-rw-r--r--textures/minegeld_5.pngbin3365 -> 1503 bytes
-rw-r--r--textures/minegeld_50.pngbin0 -> 1014 bytes
-rw-r--r--textures/minegeld_bundle.pngbin5092 -> 2739 bytes
61 files changed, 1169 insertions, 75 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..d1d3bb8 100644
--- a/craftitems.lua
+++ b/craftitems.lua
@@ -1,26 +1,77 @@
+-- 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}
+ groups = {minegeld = 5}
})
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}
+ groups = {minegeld = 10}
})
+
+local function register_comm_currency(texture, description)
+ minetest.register_craftitem("currency:"..texture, {
+ description = description,
+ inventory_image = texture..".png",
+ stack_max = 20,
+ groups = {minegeld = 1000}
+ })
+end
+
+register_comm_currency("minegeld_1000_gabriel", "1000 MineGeld Note, Featuring Gabriel")
+register_comm_currency("minegeld_1000_nadine", "1000 MineGeld Note, Featuring Nadine")
+register_comm_currency("minegeld_1000_smacker", "1000 MineGeld Note, Featuring Smacker")
+register_comm_currency("minegeld_1000_och_noe", "1000 MineGeld Note, Featuring Och Nö")
+register_comm_currency("minegeld_1000_melinka", "1000 MineGeld Note, Featuring Melinka Town")
+register_comm_currency("minegeld_1000_corona", "1000 MineGeld Note, Featuring Coronavirus")
+register_comm_currency("minegeld_1000_mese_miracle", "1000 MineGeld Note, Featuring Mese Fairy Miracle")
+register_comm_currency("minegeld_1000_e231", "1000 MineGeld Note, Featuring E231 train")
+register_comm_currency("minegeld_1000_origin", "1000 MineGeld Note, Featuring Origin")
+register_comm_currency("minegeld_1000_raja", "1000 MineGeld Note, Featuring Raja")
+register_comm_currency("minegeld_1000_lazamonument", "1000 MineGeld Note, Featuring Laza's monument")
+register_comm_currency("minegeld_1000_nadinetopia", "1000 MineGeld Note, Featuring Nadinetopia")
+register_comm_currency("minegeld_1000_trisiston", "1000 MineGeld Note, Featuring Trisiston Town Hall")
+register_comm_currency("minegeld_1000_bamboobayvillage", "1000 MineGeld Note, Featuring Bamboo Bay village")
+minetest.register_alias("currency:minegeld_1000_BambooBayVillage", "currency:minegeld_1000_bamboobayvillage")
+register_comm_currency("minegeld_1000_patatas_importancia", "1000 MineGeld Note, Featuring Patatas a la Importancia")
+register_comm_currency("minegeld_1000_10_4", "1000 MineGeld Note, Featuring 10-4 bugs")
+register_comm_currency("minegeld_1000_animal_extinction", "1000 MineGeld Note, Commemorating animal extinction")
+register_comm_currency("minegeld_1000_chiculata", "1000 MineGeld Note, Commemorating Thunder22's transsubstatiation into Chiculata")
+register_comm_currency("minegeld_1000_chile", "1000 MineGeld Note, Featuring the flag of Chile")
+register_comm_currency("minegeld_1000_crane", "1000 MineGeld Note, Featuring a crane")
+register_comm_currency("minegeld_1000_green_beast", "1000 MineGeld Note, Featuring MkII chainsaw")
+register_comm_currency("minegeld_1000_diamond_mine", "1000 Minegeld Note, Featuring 'Mine Diamonds'")
+register_comm_currency("minegeld_1000_gtsb", "1000 Minegeld Note, Commemorating the Great Train Service Breakdown")
+register_comm_currency("minegeld_1000_hrs", "1000 Minegeld Note, Featuring Heretic Russian Salad")
+register_comm_currency("minegeld_1000_iso_map", "1000 Minegeld Note, Featuring the isometric map render")
+register_comm_currency("minegeld_1000_marinated_tomatoes", "1000 Minegeld Note, Featuring marinated tomatoes")
+register_comm_currency("minegeld_1000_meat", "1000 Minegeld Note, Commemorating the Chronic Meat Shortage")
+register_comm_currency("minegeld_1000_pathv7", "1000 Minegeld Note, Commemorating the pathv7 path generator")
+register_comm_currency("minegeld_1000_pickled_eggs2", "1000 Minegeld Note, Featuring Pickled Eggs")
+register_comm_currency("minegeld_1000_respects", "1000 Minegeld Note, Instructing to press F to pay respects")
+register_comm_currency("minegeld_1000_spnmain", "1000 Minegeld Note, Featuring Spawn Main Station")
+register_comm_currency("minegeld_1000_unknown_item", "1000 Minegeld Note, Featuring an Unknown Item")
+register_comm_currency("minegeld_1000_wiki", "1000 Minegeld note, Commemorating the wiki")
+register_comm_currency("minegeld_1000_wirecard", "1000 Minegeld note, Commemorating the Wirecard Scandal")
+register_comm_currency("minegeld_1000_xnihilo", "1000 Minegeld note, Commemorating X Nihilo")
+
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..2cbb94f 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()
@@ -173,20 +195,21 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
end
end
if can_exchange then
+ local it
for i, item in pairs(wants) do
- pinv:remove_item("customer_gives",item)
- minv:add_item("customers_gave",item)
+ it = pinv:remove_item("customer_gives",item)
+ minv:add_item("customers_gave",it)
end
for i, item in pairs(gives) do
- minv:remove_item("stock",item)
- pinv:add_item("customer_gets",item)
+ it = minv:remove_item("stock",item)
+ pinv:add_item("customer_gets",it)
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.png b/textures/minegeld.png
index 79e36ff..b727d39 100644
--- a/textures/minegeld.png
+++ b/textures/minegeld.png
Binary files differ
diff --git a/textures/minegeld_10.png b/textures/minegeld_10.png
index acdb05e..038f7a2 100644
--- a/textures/minegeld_10.png
+++ b/textures/minegeld_10.png
Binary files differ
diff --git a/textures/minegeld_1000.png b/textures/minegeld_1000.png
new file mode 100644
index 0000000..db7143e
--- /dev/null
+++ b/textures/minegeld_1000.png
Binary files differ
diff --git a/textures/minegeld_1000_10_4.png b/textures/minegeld_1000_10_4.png
new file mode 100644
index 0000000..7959bd0
--- /dev/null
+++ b/textures/minegeld_1000_10_4.png
Binary files differ
diff --git a/textures/minegeld_1000_animal_extinction.png b/textures/minegeld_1000_animal_extinction.png
new file mode 100644
index 0000000..b3a34a7
--- /dev/null
+++ b/textures/minegeld_1000_animal_extinction.png
Binary files differ
diff --git a/textures/minegeld_1000_antishroom.png b/textures/minegeld_1000_antishroom.png
new file mode 100644
index 0000000..31ec8b4
--- /dev/null
+++ b/textures/minegeld_1000_antishroom.png
Binary files differ
diff --git a/textures/minegeld_1000_bamboobayvillage.png b/textures/minegeld_1000_bamboobayvillage.png
new file mode 100644
index 0000000..86da5b5
--- /dev/null
+++ b/textures/minegeld_1000_bamboobayvillage.png
Binary files differ
diff --git a/textures/minegeld_1000_chiculata.png b/textures/minegeld_1000_chiculata.png
new file mode 100644
index 0000000..3862394
--- /dev/null
+++ b/textures/minegeld_1000_chiculata.png
Binary files differ
diff --git a/textures/minegeld_1000_chile.png b/textures/minegeld_1000_chile.png
new file mode 100644
index 0000000..9f7c90b
--- /dev/null
+++ b/textures/minegeld_1000_chile.png
Binary files differ
diff --git a/textures/minegeld_1000_corona.png b/textures/minegeld_1000_corona.png
new file mode 100644
index 0000000..a2ec280
--- /dev/null
+++ b/textures/minegeld_1000_corona.png
Binary files differ
diff --git a/textures/minegeld_1000_crane.png b/textures/minegeld_1000_crane.png
new file mode 100644
index 0000000..6193bea
--- /dev/null
+++ b/textures/minegeld_1000_crane.png
Binary files differ
diff --git a/textures/minegeld_1000_diamond_mine.png b/textures/minegeld_1000_diamond_mine.png
new file mode 100644
index 0000000..bdf33e7
--- /dev/null
+++ b/textures/minegeld_1000_diamond_mine.png
Binary files differ
diff --git a/textures/minegeld_1000_donation_box.png b/textures/minegeld_1000_donation_box.png
new file mode 100644
index 0000000..1199730
--- /dev/null
+++ b/textures/minegeld_1000_donation_box.png
Binary files differ
diff --git a/textures/minegeld_1000_dummy_texture.png b/textures/minegeld_1000_dummy_texture.png
new file mode 100644
index 0000000..4a6314a
--- /dev/null
+++ b/textures/minegeld_1000_dummy_texture.png
Binary files differ
diff --git a/textures/minegeld_1000_e231.png b/textures/minegeld_1000_e231.png
new file mode 100644
index 0000000..12bea68
--- /dev/null
+++ b/textures/minegeld_1000_e231.png
Binary files differ
diff --git a/textures/minegeld_1000_gabriel.png b/textures/minegeld_1000_gabriel.png
new file mode 100644
index 0000000..9cc640d
--- /dev/null
+++ b/textures/minegeld_1000_gabriel.png
Binary files differ
diff --git a/textures/minegeld_1000_green_beast.png b/textures/minegeld_1000_green_beast.png
new file mode 100644
index 0000000..9c70ac5
--- /dev/null
+++ b/textures/minegeld_1000_green_beast.png
Binary files differ
diff --git a/textures/minegeld_1000_gtsb.png b/textures/minegeld_1000_gtsb.png
new file mode 100644
index 0000000..af17849
--- /dev/null
+++ b/textures/minegeld_1000_gtsb.png
Binary files differ
diff --git a/textures/minegeld_1000_hrs.png b/textures/minegeld_1000_hrs.png
new file mode 100644
index 0000000..1028e6a
--- /dev/null
+++ b/textures/minegeld_1000_hrs.png
Binary files differ
diff --git a/textures/minegeld_1000_iso_map.png b/textures/minegeld_1000_iso_map.png
new file mode 100644
index 0000000..064d429
--- /dev/null
+++ b/textures/minegeld_1000_iso_map.png
Binary files differ
diff --git a/textures/minegeld_1000_lazamonument.png b/textures/minegeld_1000_lazamonument.png
new file mode 100644
index 0000000..9f15a72
--- /dev/null
+++ b/textures/minegeld_1000_lazamonument.png
Binary files differ
diff --git a/textures/minegeld_1000_marinated_tomatoes.png b/textures/minegeld_1000_marinated_tomatoes.png
new file mode 100644
index 0000000..b991b45
--- /dev/null
+++ b/textures/minegeld_1000_marinated_tomatoes.png
Binary files differ
diff --git a/textures/minegeld_1000_meat.png b/textures/minegeld_1000_meat.png
new file mode 100644
index 0000000..c6f31df
--- /dev/null
+++ b/textures/minegeld_1000_meat.png
Binary files differ
diff --git a/textures/minegeld_1000_melinka.png b/textures/minegeld_1000_melinka.png
new file mode 100644
index 0000000..3ca58e9
--- /dev/null
+++ b/textures/minegeld_1000_melinka.png
Binary files differ
diff --git a/textures/minegeld_1000_mese_miracle.png b/textures/minegeld_1000_mese_miracle.png
new file mode 100644
index 0000000..ab154fe
--- /dev/null
+++ b/textures/minegeld_1000_mese_miracle.png
Binary files differ
diff --git a/textures/minegeld_1000_nadine.png b/textures/minegeld_1000_nadine.png
new file mode 100644
index 0000000..8ef807b
--- /dev/null
+++ b/textures/minegeld_1000_nadine.png
Binary files differ
diff --git a/textures/minegeld_1000_nadinetopia.png b/textures/minegeld_1000_nadinetopia.png
new file mode 100644
index 0000000..19380d3
--- /dev/null
+++ b/textures/minegeld_1000_nadinetopia.png
Binary files differ
diff --git a/textures/minegeld_1000_och_noe.png b/textures/minegeld_1000_och_noe.png
new file mode 100644
index 0000000..5140819
--- /dev/null
+++ b/textures/minegeld_1000_och_noe.png
Binary files differ
diff --git a/textures/minegeld_1000_origin.png b/textures/minegeld_1000_origin.png
new file mode 100644
index 0000000..fc2e2e8
--- /dev/null
+++ b/textures/minegeld_1000_origin.png
Binary files differ
diff --git a/textures/minegeld_1000_patatas_importancia.png b/textures/minegeld_1000_patatas_importancia.png
new file mode 100644
index 0000000..4befe81
--- /dev/null
+++ b/textures/minegeld_1000_patatas_importancia.png
Binary files differ
diff --git a/textures/minegeld_1000_pathv7.png b/textures/minegeld_1000_pathv7.png
new file mode 100644
index 0000000..9a1b813
--- /dev/null
+++ b/textures/minegeld_1000_pathv7.png
Binary files differ
diff --git a/textures/minegeld_1000_pickled_eggs2.png b/textures/minegeld_1000_pickled_eggs2.png
new file mode 100644
index 0000000..1f22c1e
--- /dev/null
+++ b/textures/minegeld_1000_pickled_eggs2.png
Binary files differ
diff --git a/textures/minegeld_1000_pitchfork_torch_all.png b/textures/minegeld_1000_pitchfork_torch_all.png
new file mode 100644
index 0000000..e450d51
--- /dev/null
+++ b/textures/minegeld_1000_pitchfork_torch_all.png
Binary files differ
diff --git a/textures/minegeld_1000_raja.png b/textures/minegeld_1000_raja.png
new file mode 100644
index 0000000..db3cc2b
--- /dev/null
+++ b/textures/minegeld_1000_raja.png
Binary files differ
diff --git a/textures/minegeld_1000_respects.png b/textures/minegeld_1000_respects.png
new file mode 100644
index 0000000..31ed3ff
--- /dev/null
+++ b/textures/minegeld_1000_respects.png
Binary files differ
diff --git a/textures/minegeld_1000_smacker.png b/textures/minegeld_1000_smacker.png
new file mode 100644
index 0000000..5fc91d3
--- /dev/null
+++ b/textures/minegeld_1000_smacker.png
Binary files differ
diff --git a/textures/minegeld_1000_spnmain.png b/textures/minegeld_1000_spnmain.png
new file mode 100644
index 0000000..43ec187
--- /dev/null
+++ b/textures/minegeld_1000_spnmain.png
Binary files differ
diff --git a/textures/minegeld_1000_trisiston.png b/textures/minegeld_1000_trisiston.png
new file mode 100644
index 0000000..c129072
--- /dev/null
+++ b/textures/minegeld_1000_trisiston.png
Binary files differ
diff --git a/textures/minegeld_1000_unknown_item.png b/textures/minegeld_1000_unknown_item.png
new file mode 100644
index 0000000..0813ccb
--- /dev/null
+++ b/textures/minegeld_1000_unknown_item.png
Binary files differ
diff --git a/textures/minegeld_1000_wallmapu.png b/textures/minegeld_1000_wallmapu.png
new file mode 100644
index 0000000..2bf53c1
--- /dev/null
+++ b/textures/minegeld_1000_wallmapu.png
Binary files differ
diff --git a/textures/minegeld_1000_wiki.png b/textures/minegeld_1000_wiki.png
new file mode 100644
index 0000000..3286738
--- /dev/null
+++ b/textures/minegeld_1000_wiki.png
Binary files differ
diff --git a/textures/minegeld_1000_wirecard.png b/textures/minegeld_1000_wirecard.png
new file mode 100644
index 0000000..a6eeecd
--- /dev/null
+++ b/textures/minegeld_1000_wirecard.png
Binary files differ
diff --git a/textures/minegeld_1000_xnihilo.png b/textures/minegeld_1000_xnihilo.png
new file mode 100644
index 0000000..e11d76c
--- /dev/null
+++ b/textures/minegeld_1000_xnihilo.png
Binary files differ
diff --git a/textures/minegeld_5.png b/textures/minegeld_5.png
index 5c66ac6..659f02d 100644
--- a/textures/minegeld_5.png
+++ b/textures/minegeld_5.png
Binary files differ
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
diff --git a/textures/minegeld_bundle.png b/textures/minegeld_bundle.png
index c6b339d..3fdc659 100644
--- a/textures/minegeld_bundle.png
+++ b/textures/minegeld_bundle.png
Binary files differ