diff options
52 files changed, 79 insertions, 85 deletions
diff --git a/crafting.lua b/crafting.lua index ab1374c..8aa99d6 100644 --- a/crafting.lua +++ b/crafting.lua @@ -43,41 +43,34 @@ minetest.register_craft({ minetest.register_craft({
type = "shapeless",
- output = "currency:minegeld 5",
- recipe = {"currency:minegeld_5"},
+ output = "currency:minegeld 9",
+ recipe = {"currency:minegeld_bundle"},
})
minetest.register_craft({
type = "shapeless",
- output = "currency:minegeld_10 5",
- recipe = {"currency:minegeld_50"},
+
+ output = "currency:minegeld 5",
+ recipe = {"currency:minegeld_5"},
+
})
+
minetest.register_craft({
- type = "shapeless",
- output = "currency:minegeld_50",
- recipe = {"currency:minegeld_10", "currency:minegeld_10", "currency:minegeld_10", "currency:minegeld_10", "currency:minegeld_10"},
+ type = "fuel",
+ recipe = "currency:minegeld_bundle",
+ burntime = 1,
})
minetest.register_craft({
- type = "shapeless",
- output = "currency:minegeld_bundle",
- recipe = {
- "group:minegeld",
- "group:minegeld",
- "group:minegeld",
- "group:minegeld",
- "group:minegeld",
- "group:minegeld",
- "group:minegeld",
- "group:minegeld",
- "group:minegeld"
- },
+ type = "shapeless",
+ output = "currency:minegeld_50",
+ recipe = {"currency:minegeld_10", "currency:minegeld_10", "currency:minegeld_10", "currency:minegeld_10", "currency:minegeld_10"},
})
minetest.register_craft({
- type = "fuel",
- recipe = "currency:minegeld_bundle",
- burntime = 1,
+ type = "shapeless",
+ output = "currency:minegeld_10 5",
+ recipe = {"currency:minegeld_50"},
})
diff --git a/craftitems.lua b/craftitems.lua index 521195f..7311459 100644 --- a/craftitems.lua +++ b/craftitems.lua @@ -13,25 +13,74 @@ minetest.register_craftitem("currency:minegeld_5", { 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 = S("10 MineGeld Note"),
inventory_image = "minegeld_10.png",
stack_max = 30000,
- groups = {minegeld = 1}
+ groups = {minegeld = 10}
})
-minetest.register_craftitem("currency:minegeld_50", {
- description = S("50 MineGeld Note"),
- inventory_image = "minegeld_50.png",
- stack_max = 30000,
- groups = {minegeld = 1}
-})
+
+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")
+register_comm_currency("minegeld_1000_4yearslf", "1000 Minegeld note, Commemorating 4 Years of LinuxForks")
minetest.register_craftitem("currency:minegeld_bundle", {
description = S("Bundle of random Minegeld notes"),
inventory_image = "minegeld_bundle.png",
stack_max = 30000,
})
+
+minetest.register_craftitem("currency:minegeld_50", {
+ description = S("50 MineGeld Note"),
+ inventory_image = "minegeld_50.png",
+ stack_max = 30000,
+ groups = {minegeld = 50}
+})
+
diff --git a/income.lua b/income.lua deleted file mode 100644 index cbbd5d8..0000000 --- a/income.lua +++ /dev/null @@ -1,44 +0,0 @@ -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; - if timer >= 720 then --720 for one day - timer = 0 - for _,player in ipairs(minetest.get_connected_players()) do - local name = player:get_player_name() - if players_income[name] == nil then - players_income[name] = 0 - end - players_income[name] = 1 - minetest.log("info", "[Currency] "..S("basic income for @1", name)) - end - end -end) - -earn_income = function(player) - if not player or player.is_fake_player then return end - local name = player:get_player_name() - if players_income[name] == nil then - players_income[name] = 0 - end - if players_income[name] > 0 then - count = players_income[name] - local inv = player:get_inventory() - inv:add_item("main", {name="currency:minegeld_5", count=count}) - players_income[name] = 0 - minetest.log("info", "[Currency] "..S("added basic income for @1 to inventory", name)) - end -end - -minetest.register_on_dignode(function(pos, oldnode, digger) - earn_income(digger) -end) - -minetest.register_on_placenode(function(pos, node, placer) - earn_income(placer) -end) @@ -16,9 +16,4 @@ minetest.log("info", "[Currency] "..S("Safe Loaded!")) dofile(modpath.."/crafting.lua")
minetest.log("info", "[Currency] "..S("Crafting Loaded!"))
-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] "..S("Income Loaded!"))
-end
+
@@ -195,13 +195,14 @@ 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,S("Exchanged!"))
else
diff --git a/textures/minegeld.png b/textures/minegeld.png Binary files differindex 79e36ff..b727d39 100644 --- a/textures/minegeld.png +++ b/textures/minegeld.png diff --git a/textures/minegeld_10.png b/textures/minegeld_10.png Binary files differindex acdb05e..038f7a2 100644 --- a/textures/minegeld_10.png +++ b/textures/minegeld_10.png diff --git a/textures/minegeld_1000.png b/textures/minegeld_1000.png Binary files differnew file mode 100644 index 0000000..db7143e --- /dev/null +++ b/textures/minegeld_1000.png diff --git a/textures/minegeld_1000_10_4.png b/textures/minegeld_1000_10_4.png Binary files differnew file mode 100644 index 0000000..7959bd0 --- /dev/null +++ b/textures/minegeld_1000_10_4.png diff --git a/textures/minegeld_1000_4yearslf.png b/textures/minegeld_1000_4yearslf.png Binary files differnew file mode 100644 index 0000000..43d10b5 --- /dev/null +++ b/textures/minegeld_1000_4yearslf.png diff --git a/textures/minegeld_1000_animal_extinction.png b/textures/minegeld_1000_animal_extinction.png Binary files differnew file mode 100644 index 0000000..b3a34a7 --- /dev/null +++ b/textures/minegeld_1000_animal_extinction.png diff --git a/textures/minegeld_1000_antishroom.png b/textures/minegeld_1000_antishroom.png Binary files differnew file mode 100644 index 0000000..31ec8b4 --- /dev/null +++ b/textures/minegeld_1000_antishroom.png diff --git a/textures/minegeld_1000_bamboobayvillage.png b/textures/minegeld_1000_bamboobayvillage.png Binary files differnew file mode 100644 index 0000000..86da5b5 --- /dev/null +++ b/textures/minegeld_1000_bamboobayvillage.png diff --git a/textures/minegeld_1000_chiculata.png b/textures/minegeld_1000_chiculata.png Binary files differnew file mode 100644 index 0000000..3862394 --- /dev/null +++ b/textures/minegeld_1000_chiculata.png diff --git a/textures/minegeld_1000_chile.png b/textures/minegeld_1000_chile.png Binary files differnew file mode 100644 index 0000000..9f7c90b --- /dev/null +++ b/textures/minegeld_1000_chile.png diff --git a/textures/minegeld_1000_corona.png b/textures/minegeld_1000_corona.png Binary files differnew file mode 100644 index 0000000..a2ec280 --- /dev/null +++ b/textures/minegeld_1000_corona.png diff --git a/textures/minegeld_1000_crane.png b/textures/minegeld_1000_crane.png Binary files differnew file mode 100644 index 0000000..6193bea --- /dev/null +++ b/textures/minegeld_1000_crane.png diff --git a/textures/minegeld_1000_diamond_mine.png b/textures/minegeld_1000_diamond_mine.png Binary files differnew file mode 100644 index 0000000..bdf33e7 --- /dev/null +++ b/textures/minegeld_1000_diamond_mine.png diff --git a/textures/minegeld_1000_donation_box.png b/textures/minegeld_1000_donation_box.png Binary files differnew file mode 100644 index 0000000..1199730 --- /dev/null +++ b/textures/minegeld_1000_donation_box.png diff --git a/textures/minegeld_1000_dummy_texture.png b/textures/minegeld_1000_dummy_texture.png Binary files differnew file mode 100644 index 0000000..4a6314a --- /dev/null +++ b/textures/minegeld_1000_dummy_texture.png diff --git a/textures/minegeld_1000_e231.png b/textures/minegeld_1000_e231.png Binary files differnew file mode 100644 index 0000000..12bea68 --- /dev/null +++ b/textures/minegeld_1000_e231.png diff --git a/textures/minegeld_1000_gabriel.png b/textures/minegeld_1000_gabriel.png Binary files differnew file mode 100644 index 0000000..9cc640d --- /dev/null +++ b/textures/minegeld_1000_gabriel.png diff --git a/textures/minegeld_1000_green_beast.png b/textures/minegeld_1000_green_beast.png Binary files differnew file mode 100644 index 0000000..9c70ac5 --- /dev/null +++ b/textures/minegeld_1000_green_beast.png diff --git a/textures/minegeld_1000_gtsb.png b/textures/minegeld_1000_gtsb.png Binary files differnew file mode 100644 index 0000000..af17849 --- /dev/null +++ b/textures/minegeld_1000_gtsb.png diff --git a/textures/minegeld_1000_hrs.png b/textures/minegeld_1000_hrs.png Binary files differnew file mode 100644 index 0000000..1028e6a --- /dev/null +++ b/textures/minegeld_1000_hrs.png diff --git a/textures/minegeld_1000_iso_map.png b/textures/minegeld_1000_iso_map.png Binary files differnew file mode 100644 index 0000000..064d429 --- /dev/null +++ b/textures/minegeld_1000_iso_map.png diff --git a/textures/minegeld_1000_lazamonument.png b/textures/minegeld_1000_lazamonument.png Binary files differnew file mode 100644 index 0000000..9f15a72 --- /dev/null +++ b/textures/minegeld_1000_lazamonument.png diff --git a/textures/minegeld_1000_marinated_tomatoes.png b/textures/minegeld_1000_marinated_tomatoes.png Binary files differnew file mode 100644 index 0000000..b991b45 --- /dev/null +++ b/textures/minegeld_1000_marinated_tomatoes.png diff --git a/textures/minegeld_1000_meat.png b/textures/minegeld_1000_meat.png Binary files differnew file mode 100644 index 0000000..c6f31df --- /dev/null +++ b/textures/minegeld_1000_meat.png diff --git a/textures/minegeld_1000_melinka.png b/textures/minegeld_1000_melinka.png Binary files differnew file mode 100644 index 0000000..3ca58e9 --- /dev/null +++ b/textures/minegeld_1000_melinka.png diff --git a/textures/minegeld_1000_mese_miracle.png b/textures/minegeld_1000_mese_miracle.png Binary files differnew file mode 100644 index 0000000..ab154fe --- /dev/null +++ b/textures/minegeld_1000_mese_miracle.png diff --git a/textures/minegeld_1000_nadine.png b/textures/minegeld_1000_nadine.png Binary files differnew file mode 100644 index 0000000..8ef807b --- /dev/null +++ b/textures/minegeld_1000_nadine.png diff --git a/textures/minegeld_1000_nadinetopia.png b/textures/minegeld_1000_nadinetopia.png Binary files differnew file mode 100644 index 0000000..19380d3 --- /dev/null +++ b/textures/minegeld_1000_nadinetopia.png diff --git a/textures/minegeld_1000_och_noe.png b/textures/minegeld_1000_och_noe.png Binary files differnew file mode 100644 index 0000000..5140819 --- /dev/null +++ b/textures/minegeld_1000_och_noe.png diff --git a/textures/minegeld_1000_origin.png b/textures/minegeld_1000_origin.png Binary files differnew file mode 100644 index 0000000..fc2e2e8 --- /dev/null +++ b/textures/minegeld_1000_origin.png diff --git a/textures/minegeld_1000_patatas_importancia.png b/textures/minegeld_1000_patatas_importancia.png Binary files differnew file mode 100644 index 0000000..4befe81 --- /dev/null +++ b/textures/minegeld_1000_patatas_importancia.png diff --git a/textures/minegeld_1000_pathv7.png b/textures/minegeld_1000_pathv7.png Binary files differnew file mode 100644 index 0000000..9a1b813 --- /dev/null +++ b/textures/minegeld_1000_pathv7.png diff --git a/textures/minegeld_1000_pickled_eggs2.png b/textures/minegeld_1000_pickled_eggs2.png Binary files differnew file mode 100644 index 0000000..1f22c1e --- /dev/null +++ b/textures/minegeld_1000_pickled_eggs2.png diff --git a/textures/minegeld_1000_pitchfork_torch_all.png b/textures/minegeld_1000_pitchfork_torch_all.png Binary files differnew file mode 100644 index 0000000..e450d51 --- /dev/null +++ b/textures/minegeld_1000_pitchfork_torch_all.png diff --git a/textures/minegeld_1000_raja.png b/textures/minegeld_1000_raja.png Binary files differnew file mode 100644 index 0000000..db3cc2b --- /dev/null +++ b/textures/minegeld_1000_raja.png diff --git a/textures/minegeld_1000_respects.png b/textures/minegeld_1000_respects.png Binary files differnew file mode 100644 index 0000000..31ed3ff --- /dev/null +++ b/textures/minegeld_1000_respects.png diff --git a/textures/minegeld_1000_smacker.png b/textures/minegeld_1000_smacker.png Binary files differnew file mode 100644 index 0000000..5fc91d3 --- /dev/null +++ b/textures/minegeld_1000_smacker.png diff --git a/textures/minegeld_1000_spnmain.png b/textures/minegeld_1000_spnmain.png Binary files differnew file mode 100644 index 0000000..43ec187 --- /dev/null +++ b/textures/minegeld_1000_spnmain.png diff --git a/textures/minegeld_1000_trisiston.png b/textures/minegeld_1000_trisiston.png Binary files differnew file mode 100644 index 0000000..c129072 --- /dev/null +++ b/textures/minegeld_1000_trisiston.png diff --git a/textures/minegeld_1000_unknown_item.png b/textures/minegeld_1000_unknown_item.png Binary files differnew file mode 100644 index 0000000..0813ccb --- /dev/null +++ b/textures/minegeld_1000_unknown_item.png diff --git a/textures/minegeld_1000_wallmapu.png b/textures/minegeld_1000_wallmapu.png Binary files differnew file mode 100644 index 0000000..2bf53c1 --- /dev/null +++ b/textures/minegeld_1000_wallmapu.png diff --git a/textures/minegeld_1000_wiki.png b/textures/minegeld_1000_wiki.png Binary files differnew file mode 100644 index 0000000..3286738 --- /dev/null +++ b/textures/minegeld_1000_wiki.png diff --git a/textures/minegeld_1000_wirecard.png b/textures/minegeld_1000_wirecard.png Binary files differnew file mode 100644 index 0000000..a6eeecd --- /dev/null +++ b/textures/minegeld_1000_wirecard.png diff --git a/textures/minegeld_1000_xnihilo.png b/textures/minegeld_1000_xnihilo.png Binary files differnew file mode 100644 index 0000000..e11d76c --- /dev/null +++ b/textures/minegeld_1000_xnihilo.png diff --git a/textures/minegeld_5.png b/textures/minegeld_5.png Binary files differindex 5c66ac6..659f02d 100644 --- a/textures/minegeld_5.png +++ b/textures/minegeld_5.png diff --git a/textures/minegeld_50.png b/textures/minegeld_50.png Binary files differindex 8371bc0..c7007e2 100644 --- a/textures/minegeld_50.png +++ b/textures/minegeld_50.png diff --git a/textures/minegeld_bundle.png b/textures/minegeld_bundle.png Binary files differindex c6b339d..3fdc659 100644 --- a/textures/minegeld_bundle.png +++ b/textures/minegeld_bundle.png |