diff --git a/cooking.lua b/cooking.lua index 1d58bf2..7ce2dcc 100644 --- a/cooking.lua +++ b/cooking.lua @@ -2,6 +2,7 @@ --[[ Copyright (C) 2015 - Auke Kok + 2018 - Marius Spix "crops" is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -27,7 +28,6 @@ minetest.register_craftitem("crops:unbaked_clay_bowl", { minetest.register_craft({ output = "crops:unbaked_clay_bowl", recipe = { - { "", "", "" }, { "default:clay_lump", "", "default:clay_lump" }, { "", "default:clay_lump", "" } } @@ -68,8 +68,36 @@ minetest.register_craftitem("crops:uncooked_vegetable_stew", { minetest.register_craft({ output = "crops:uncooked_vegetable_stew", recipe = { - { "", "", "" }, { "crops:green_bean", "crops:potato", "crops:tomato" }, { "", "group:food_bowl", "" } } }) + +minetest.register_craftitem("crops:ratatouille", { + description = S("Bowl of ratatouille"), + inventory_image = "crops_bowl_ratatouille.png", + groups = { eatable=1 }, + on_use = minetest.item_eat(10, "crops:clay_bowl"), +}) + +minetest.register_craft({ + type = "cooking", + output = "crops:ratatouille", + recipe = "crops:uncooked_ratatouille", + cooktime = 15 +}) + +minetest.register_craftitem("crops:uncooked_ratatouille", { + description = S("Bowl of uncooked ratatouille"), + inventory_image = "crops_bowl_uncooked_ratatouille.png", + groups = { eatable=1 }, + on_use = minetest.item_eat(2, "crops:clay_bowl") +}) + +minetest.register_craft({ + output = "crops:uncooked_ratatouille", + recipe = { + { "crops:pumpkin", "crops:eggfruit", "crops:tomato" }, + { "", "group:food_bowl", "" } + } +}) diff --git a/description.txt b/description.txt index 8b85a22..d2e8b30 100644 --- a/description.txt +++ b/description.txt @@ -1,4 +1,4 @@ -This mod expands the basic set of farming-related crops that minetest_game offers. It adds melons, potatoes, tomatoes, green beans and corn. The mod also implements plant humidity - you will have to water plants to make sure they're not dried out, or make sure they don't get over-watered. +This mod expands the basic set of farming-related crops that minetest_game offers. It adds melons, potatoes, tomatoes, eggfruit, green beans and corn. The mod also implements plant humidity - you will have to water plants to make sure they're not dried out, or make sure they don't get over-watered. Mod specific settings can be changed in the "crops_settings.txt" file in the world folder. diff --git a/eggfruit.lua b/eggfruit.lua new file mode 100644 index 0000000..80b9146 --- /dev/null +++ b/eggfruit.lua @@ -0,0 +1,171 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + 2018 - Marius Spix + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +minetest.register_node("crops:eggfruit_seed", { + description = S("Eggfruit seed"), + inventory_image = "crops_eggfruit_seed.png", + wield_image = "crops_eggfruit_seed.png", + tiles = { "crops_eggfruit_plant_1.png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + node_placement_prediction = "crops:eggfruit_plant_1", + groups = { snappy=3,flammable=3,flora=1,attached_node=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + crops.plant(pointed_thing.above, {name="crops:eggfruit_plant_1", param2 = 1}) + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +for stage = 1, 7 do + local node_def = + { + description = S("Eggfruit plant"), + tiles = { "crops_eggfruit_plant_" .. stage .. ".png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 5)) + 1) / 6), 0.45} + } + } + + if stage == 6 then + node_def.on_dig = function(pos, node, digger) + local drops = {} + for i = 1, math.random(1, 2) do + table.insert(drops, "crops:eggfruit") + end + core.handle_node_drops(pos, drops, digger) + + local meta = minetest.get_meta(pos) + local ttl = meta:get_int("crops_eggfruit_ttl") + if ttl > 1 then + minetest.swap_node(pos, { name = "crops:eggfruit_plant_4", param2 = 1}) + meta:set_int("crops_eggfruit_ttl", ttl - 1) + else + crops.die(pos) + end + end + end + + minetest.register_node("crops:eggfruit_plant_" .. stage , node_def) +end + +minetest.register_craftitem("crops:eggfruit", { + description = S("Eggfruit"), + inventory_image = "crops_eggfruit.png", + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "shapeless", + output = "crops:eggfruit_seed", + recipe = { "crops:eggfruit" } +}) + +-- +-- grows a plant to mature size +-- +minetest.register_abm({ + nodenames = { "crops:eggfruit_plant_1", "crops:eggfruit_plant_2", "crops:eggfruit_plant_3", + "crops:eggfruit_plant_4" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local n = string.gsub(node.name, "5", "6") + n = string.gsub(n, "4", "5") + n = string.gsub(n, "3", "4") + n = string.gsub(n, "2", "3") + n = string.gsub(n, "1", "2") + minetest.swap_node(pos, { name = n, param2 = 1 }) + end +}) + +-- +-- grows an eggfruit +-- +minetest.register_abm({ + nodenames = { "crops:eggfruit_plant_5" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local meta = minetest.get_meta(pos) + local ttl = meta:get_int("crops_eggfruit_ttl") + local damage = meta:get_int("crops_damage") + if ttl == 0 then + -- damage 0 - drops 4-5 + -- damage 50 - drops 2-3 + -- damage 100 - drops 0-1 + ttl = math.random(4 - (4 * (damage / 100)), 5 - (4 * (damage / 100))) + end + if ttl > 1 then + minetest.swap_node(pos, { name = "crops:eggfruit_plant_6", param2 = 1 }) + meta:set_int("crops_eggfruit_ttl", ttl) + else + crops.die(pos) + end + end +}) + +crops.eggfruit_die = function(pos) + minetest.swap_node(pos, { name = "crops:eggfruit_plant_7", param2 = 1 }) +end + +local properties = { + die = crops.eggfruit_die, + waterstart = 20, + wateruse = 1, + night = 5, + soak = 84, + soak_damage = 70, + wither = 15, + wither_damage = 10, +} + +for stage = 1, 6 do + crops.register({ name = "crops:eggfruit_plant_" .. stage, properties = properties }) +end diff --git a/init.lua b/init.lua index 0e5e4aa..8ca51e2 100644 --- a/init.lua +++ b/init.lua @@ -117,8 +117,10 @@ crops.plant = function(pos, node) minetest.set_node(pos, node) local meta = minetest.get_meta(pos) local plant = find_plant(node) - meta:set_int("crops_water", math.max(plant.properties.waterstart, 1)) - meta:set_int("crops_damage", 0) + if plant ~= nil then + meta:set_int("crops_water", math.max(plant.properties.waterstart, 1)) + meta:set_int("crops_damage", 0) + end end crops.can_grow = function(pos) @@ -304,6 +306,7 @@ dofile(modpath .. "/corn.lua") dofile(modpath .. "/tomato.lua") dofile(modpath .. "/potato.lua") dofile(modpath .. "/polebean.lua") +dofile(modpath .. "/eggfruit.lua") local nodenames = {} for i = 1,table.getn(crops.plants) do diff --git a/locale/de.po b/locale/de.po index f533cb0..7d55ac0 100644 --- a/locale/de.po +++ b/locale/de.po @@ -3,20 +3,20 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-30 08:37+0200\n" -"PO-Revision-Date: 2017-02-20 16:54-0300\n" -"Last-Translator: LNJ2\n" +"PO-Revision-Date: 2018-12-0901 20:16+0100\n" +"Last-Translator: Marius Spix \n" "Language-Team: German\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.1.1\n" #: cooking.lua msgid "Unbaked clay bowl" @@ -28,11 +28,19 @@ msgstr "Lehmschale" #: cooking.lua msgid "Bowl of vegetable stew" -msgstr "Schale voll Gemseeintopf" +msgstr "Schale voll Gemüseeintopf" #: cooking.lua msgid "Bowl of uncooked vegetable stew" -msgstr "Schale voll mit roher Gemseeintopf" +msgstr "Schale voll mit rohem Gemüseeintopf" + +#: cooking.lua +msgid "Bowl of ratatouille" +msgstr "Schale voll Ratatouille" + +#: cooking.lua +msgid "Bowl of uncooked ratatouille" +msgstr "Schale voll mit roher Ratatouille" #: corn.lua msgid "Corn" @@ -52,20 +60,19 @@ msgstr "Maispflanze" #: init.lua msgid "Defaulting to \"normal\" difficulty settings" -msgstr "Benutze standard Schwierigkeitsgrad \"normal\"" +msgstr "Benutze Standard-Schwierigkeitsgrad \"normal\"" #: init.lua msgid "Hydration and dehydration mechanics are enabled." msgstr "Hydrierungs- und Dehydrierungsmechaniken sind aktiviert." #: init.lua -#, fuzzy msgid "Unable to find plant \"@1\" in crops table" -msgstr "Konnte Pflanze \"@1\" nicht in der Tabelle finden" +msgstr "Konnte Pflanze \"@1\" nicht in der Saatguttabelle finden" #: init.lua msgid "Loaded!" -msgstr "" +msgstr "Geladen!" #: melon.lua msgid "Melon seed" @@ -85,7 +92,7 @@ msgstr "Melone" #: polebean.lua msgid "Green Bean" -msgstr "Grne Bohne" +msgstr "Grüne Bohne" #: polebean.lua msgid "Beanpoles" @@ -93,11 +100,11 @@ msgstr "Bohnenstangen" #: polebean.lua msgid "Green bean seed" -msgstr "Samen einer Grnen Bohne" +msgstr "Samen einer Grünen Bohne" #: polebean.lua msgid "Green Bean plant" -msgstr "Grne Bohnenpflanze" +msgstr "Grüne Bohnenpflanze" #: potato.lua msgid "Potato eyes" @@ -117,19 +124,19 @@ msgstr "Acker mit Kartoffeln" #: pumpkin.lua msgid "Pumpkin seed" -msgstr "Krbissamen" +msgstr "Kürbissamen" #: pumpkin.lua msgid "Pumpkin plant" -msgstr "Krbispflanze" +msgstr "Kürbispflanze" #: pumpkin.lua msgid "Roasted pumpkin" -msgstr "Gersteter Krbis" +msgstr "Gerösteter Kürbis" #: pumpkin.lua msgid "Pumpkin" -msgstr "Krbis" +msgstr "Kürbis" #: tomato.lua msgid "Tomato seed" @@ -139,13 +146,25 @@ msgstr "Tomatensamen" msgid "Tomato plant" msgstr "Tomatenpflanze" +#: eggfruit.lua +msgid "Eggfruit" +msgstr "Aubergine" + +#: eggfruit.lua +msgid "Eggfruit seed" +msgstr "Auberginensamen" + +#: eggfruit.lua +msgid "Eggfruit plant" +msgstr "Auberginenpflanze" + #: tomato.lua msgid "Tomato" msgstr "Tomate" #: tools.lua msgid "Watering Can" -msgstr "Giekanne" +msgstr "Gießkanne" #: tools.lua msgid "Hydrometer" diff --git a/locale/es.mo b/locale/es.mo new file mode 100644 index 0000000..ef1a951 Binary files /dev/null and b/locale/es.mo differ diff --git a/locale/es.po b/locale/es.po index 6f0802b..7b3e1a8 100644 --- a/locale/es.po +++ b/locale/es.po @@ -6,17 +6,18 @@ # msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-30 08:37+0200\n" -"PO-Revision-Date: 2017-02-20 16:54-0300\n" -"Last-Translator: Diego Martínez \n" +"PO-Revision-Date: 2018-12-09 20:22+0100\n" +"Last-Translator: Marius Spix \n" "Language-Team: Spanish\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.1.1\n" #: cooking.lua msgid "Unbaked clay bowl" @@ -34,6 +35,14 @@ msgstr "Tazón de sopa de vegetales" msgid "Bowl of uncooked vegetable stew" msgstr "Tazón de sopa de vegetales sin cocer" +#: cooking.lua +msgid "Bowl of ratatouille" +msgstr "Tazón de pisto" + +#: cooking.lua +msgid "Bowl of uncooked ratatouille" +msgstr "Tazón de pisto sin cocer" + #: corn.lua msgid "Corn" msgstr "Maíz" @@ -138,6 +147,18 @@ msgstr "Semilla de tomate" msgid "Tomato plant" msgstr "Planta de tomate" +#: eggfruit.lua +msgid "Eggfruit" +msgstr "Berenjena" + +#: eggfruit.lua +msgid "Eggfruit seed" +msgstr "Semilla de berenjena" + +#: eggfruit.lua +msgid "Eggfruit plant" +msgstr "Planta de berenjena" + #: tomato.lua msgid "Tomato" msgstr "Tomate" diff --git a/locale/fr.mo b/locale/fr.mo new file mode 100644 index 0000000..32602ce Binary files /dev/null and b/locale/fr.mo differ diff --git a/locale/fr.po b/locale/fr.po index 04cfc13..bfd58f2 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,15 +8,15 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-30 08:37+0200\n" -"PO-Revision-Date: 2017-04-30 08:48+0200\n" -"Last-Translator: fat115 \n" +"PO-Revision-Date: 2018-12-09 20:26+0100\n" +"Last-Translator: Marius Spix \n" "Language-Team: French\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.8.12\n" +"X-Generator: Poedit 2.1.1\n" #: cooking.lua msgid "Unbaked clay bowl" @@ -34,6 +34,14 @@ msgstr "Bol de soupe de légumes" msgid "Bowl of uncooked vegetable stew" msgstr "Bol de soupe de légumes non-cuite" +#: cooking.lua +msgid "Bowl of ratatouille" +msgstr "Bol de ratatouille" + +#: cooking.lua +msgid "Bowl of uncooked ratatouille" +msgstr "Bol de ratatouille non-cuite" + #: corn.lua msgid "Corn" msgstr "Maïs" @@ -138,6 +146,18 @@ msgstr "Graines de tomate" msgid "Tomato plant" msgstr "Pied de tomate" +#: eggfruit.lua +msgid "Eggfruit" +msgstr "Aubergine" + +#: eggfruit.lua +msgid "Eggfruit seed" +msgstr "Graines d’aubergine" + +#: eggfruit.lua +msgid "Eggfruit plant" +msgstr "Pied d’aubergine" + #: tomato.lua msgid "Tomato" msgstr "Tomate" diff --git a/locale/it.mo b/locale/it.mo new file mode 100644 index 0000000..4487b35 Binary files /dev/null and b/locale/it.mo differ diff --git a/locale/it.po b/locale/it.po index c82e973..bc8da92 100644 --- a/locale/it.po +++ b/locale/it.po @@ -7,16 +7,72 @@ msgid "" msgstr "" "Project-Id-Version: crops module's Italian translation\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-20 17:17-0300\n" -"PO-Revision-Date: 2017-08-17 22:03+0100\n" -"Last-Translator: H4mlet \n" +"POT-Creation-Date: 2017-04-30 08:37+0200\n" +"PO-Revision-Date: 2018-12-09 20:37+0100\n" +"Last-Translator: Marius Spix \n" "Language-Team: ITALIANO\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.6.10\n" +"X-Generator: Poedit 2.1.1\n" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "Ciotola di argilla cruda" + +#: cooking.lua +msgid "Clay bowl" +msgstr "Ciotola di argilla" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "Ciotola di stufato vegetale" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "Ciotola di stufato vegetale crudo" + +#: cooking.lua +msgid "Bowl of ratatouille" +msgstr "Ciotola di ratatouille" + +#: cooking.lua +msgid "Bowl of uncooked ratatouille" +msgstr "Ciotola di ratatouille cruda" + +#: corn.lua +msgid "Corn" +msgstr "Granoturco" + +#: corn.lua +msgid "Corn Cob" +msgstr "Pannocchia" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "Pannocchia arrostita" + +#: corn.lua +msgid "Corn plant" +msgstr "Pianta di granoturco" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "Utilizzo delle impostazioni di difficoltà \"normal\"" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "Le meccaniche di idratazione e disidratazione sono abilitate." + +#: init.lua +msgid "Unable to find plant \"@1\" in crops table" +msgstr "Impossibile trovare la pianta \"@1\" nella tabella delle messi" + +#: init.lua +msgid "Loaded!" +msgstr "Caricato!" #: melon.lua msgid "Melon seed" @@ -34,18 +90,6 @@ msgstr "Fetta di anguria" msgid "Melon" msgstr "Anguria" -#: tomato.lua -msgid "Tomato seed" -msgstr "Seme di pomodoro" - -#: tomato.lua -msgid "Tomato plant" -msgstr "Pianta di pomodoro" - -#: tomato.lua -msgid "Tomato" -msgstr "Pomodoro" - #: polebean.lua msgid "Green Bean" msgstr "Fagiolo verde" @@ -62,13 +106,21 @@ msgstr "Seme di fagiolo verde" msgid "Green Bean plant" msgstr "Pianta di fagiolo verde" -#: tools.lua -msgid "Watering Can" -msgstr "Innaffiatoio" +#: potato.lua +msgid "Potato eyes" +msgstr "Germogli di patata" -#: tools.lua -msgid "Hydrometer" -msgstr "Idrometro" +#: potato.lua +msgid "Potato plant" +msgstr "Pianta di patata" + +#: potato.lua +msgid "Potato" +msgstr "Patata" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "Terreno con patate" #: pumpkin.lua msgid "Pumpkin seed" @@ -86,66 +138,34 @@ msgstr "Zucca arrostita" msgid "Pumpkin" msgstr "Zucca" -#: init.lua -msgid "Defaulting to \"normal\" difficulty settings" -msgstr "Utilizzo delle impostazioni di difficoltà \"normal\"" - -#: init.lua -msgid "Hydration and dehydration mechanics are enabled." -msgstr "Le meccaniche di idratazione e disidratazione sono abilitate." - -#: init.lua -msgid "Unable to find plant \"@1\" in crops table" -msgstr "Impossibile trovare la pianta \"@1\" nella tabella delle messi" - -#: init.lua -msgid "Loaded!" -msgstr "Caricato!" - -#: potato.lua -msgid "Potato eyes" -msgstr "Germogli di patata" - -#: potato.lua -msgid "Potato plant" -msgstr "Pianta di patata" - -#: potato.lua -msgid "Potato" -msgstr "Patata" - -#: potato.lua -msgid "Soil with potatoes" -msgstr "Terreno con patate" - -#: cooking.lua -msgid "Unbaked clay bowl" -msgstr "Ciotola di argilla cruda" +#: tomato.lua +msgid "Tomato seed" +msgstr "Seme di pomodoro" -#: cooking.lua -msgid "Clay bowl" -msgstr "Ciotola di argilla" +#: tomato.lua +msgid "Tomato plant" +msgstr "Pianta di pomodoro" -#: cooking.lua -msgid "Bowl of vegetable stew" -msgstr "Ciotola di stufato vegetale" +#: eggfruit.lua +msgid "Eggfruit" +msgstr "Melanzana" -#: cooking.lua -msgid "Bowl of uncooked vegetable stew" -msgstr "Ciotola di stufato vegetale crudo" +#: eggfruit.lua +msgid "Eggfruit seed" +msgstr "Seme di melanzana" -#: corn.lua -msgid "Corn" -msgstr "Granoturco" +#: eggfruit.lua +msgid "Eggfruit plant" +msgstr "Pianta di melanzana" -#: corn.lua -msgid "Corn Cob" -msgstr "Pannocchia" +#: tomato.lua +msgid "Tomato" +msgstr "Pomodoro" -#: corn.lua -msgid "Corn on the Cob" -msgstr "Pannocchia arrostita" +#: tools.lua +msgid "Watering Can" +msgstr "Innaffiatoio" -#: corn.lua -msgid "Corn plant" -msgstr "Pianta di granoturco" +#: tools.lua +msgid "Hydrometer" +msgstr "Idrometro" diff --git a/locale/pt.mo b/locale/pt.mo new file mode 100644 index 0000000..ee7c3f6 Binary files /dev/null and b/locale/pt.mo differ diff --git a/locale/pt.po b/locale/pt.po index ecfe6d4..7503ec0 100644 --- a/locale/pt.po +++ b/locale/pt.po @@ -7,15 +7,71 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-20 17:17-0300\n" -"PO-Revision-Date: 2017-08-17 17:54-0300\n" -"Last-Translator: BrunoMine \n" +"POT-Creation-Date: 2017-04-30 08:37+0200\n" +"PO-Revision-Date: 2018-12-09 20:30+0100\n" +"Last-Translator: Marius Spix \n" "Language-Team: \n" -"Language: Portuguese\n" +"Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Gtranslator 2.91.7\n" +"X-Generator: Poedit 2.1.1\n" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "Tigela de Barro Fresco" + +#: cooking.lua +msgid "Clay bowl" +msgstr "Tigela de Barro" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "Tigela de Ensopado de Vegetais" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "Tigela de Vegetais Crus" + +#: cooking.lua +msgid "Bowl of ratatouille" +msgstr "Tigela de Ratatouille" + +#: cooking.lua +msgid "Bowl of uncooked ratatouille" +msgstr "Tigela de Ratatouille Cru" + +#: corn.lua +msgid "Corn" +msgstr "Milho" + +#: corn.lua +msgid "Corn Cob" +msgstr "Espiga de Milho" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "Milho na Espiga" + +#: corn.lua +msgid "Corn plant" +msgstr "Planta de Milho" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "Padrao para configuraçoes de dificuldade \"normal\"" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "Mecanica de hidrataçao e desidrataçao esta habilitada." + +#: init.lua +msgid "Unable to find plant \"@1\" in crops table" +msgstr "Impossivel encontrar a planta \"@1\" na tabela de culturas" + +#: init.lua +msgid "Loaded!" +msgstr "Carregado!" #: melon.lua msgid "Melon seed" @@ -33,18 +89,6 @@ msgstr "Pedaço de Melancia" msgid "Melon" msgstr "Melancia" -#: tomato.lua -msgid "Tomato seed" -msgstr "Semente de Tomate" - -#: tomato.lua -msgid "Tomato plant" -msgstr "Planta de Tomate" - -#: tomato.lua -msgid "Tomato" -msgstr "Tomate" - #: polebean.lua msgid "Green Bean" msgstr "Feijao Verde" @@ -61,13 +105,21 @@ msgstr "Semente de Feijao Verde" msgid "Green Bean plant" msgstr "Planta de Feijao Verde" -#: tools.lua -msgid "Watering Can" -msgstr "Regador" +#: potato.lua +msgid "Potato eyes" +msgstr "Raizes de Batata" -#: tools.lua -msgid "Hydrometer" -msgstr "Hydrometro" +#: potato.lua +msgid "Potato plant" +msgstr "Planta de Batata" + +#: potato.lua +msgid "Potato" +msgstr "Batata" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "Solo com Batatas" #: pumpkin.lua msgid "Pumpkin seed" @@ -85,66 +137,34 @@ msgstr "Abobora Assada" msgid "Pumpkin" msgstr "Abobora" -#: init.lua -msgid "Defaulting to \"normal\" difficulty settings" -msgstr "Padrao para configuraçoes de dificuldade \"normal\"" - -#: init.lua -msgid "Hydration and dehydration mechanics are enabled." -msgstr "Mecanica de hidrataçao e desidrataçao esta habilitada." - -#: init.lua -msgid "Unable to find plant \"@1\" in crops table" -msgstr "Impossivel encontrar a planta \"@1\" na tabela de culturas" - -#: init.lua -msgid "Loaded!" -msgstr "Carregado!" - -#: potato.lua -msgid "Potato eyes" -msgstr "Raizes de Batata" - -#: potato.lua -msgid "Potato plant" -msgstr "Planta de Batata" - -#: potato.lua -msgid "Potato" -msgstr "Batata" - -#: potato.lua -msgid "Soil with potatoes" -msgstr "Solo com Batatas" - -#: cooking.lua -msgid "Unbaked clay bowl" -msgstr "Tigela de Barro Fresco" +#: tomato.lua +msgid "Tomato seed" +msgstr "Semente de Tomate" -#: cooking.lua -msgid "Clay bowl" -msgstr "Tigela de Barro" +#: tomato.lua +msgid "Tomato plant" +msgstr "Planta de Tomate" -#: cooking.lua -msgid "Bowl of vegetable stew" -msgstr "Tigela de Ensopado de Vegetais" +#: eggfruit.lua +msgid "Eggfruit" +msgstr "Berinjela" -#: cooking.lua -msgid "Bowl of uncooked vegetable stew" -msgstr "Tigela de Vegetais Crus" +#: eggfruit.lua +msgid "Eggfruit seed" +msgstr "Semente de Berinjela" -#: corn.lua -msgid "Corn" -msgstr "Milho" +#: eggfruit.lua +msgid "Eggfruit plant" +msgstr "Planta de Berinjela" -#: corn.lua -msgid "Corn Cob" -msgstr "Espiga de Milho" +#: tomato.lua +msgid "Tomato" +msgstr "Tomate" -#: corn.lua -msgid "Corn on the Cob" -msgstr "Milho na Espiga" +#: tools.lua +msgid "Watering Can" +msgstr "Regador" -#: corn.lua -msgid "Corn plant" -msgstr "Planta de Milho" +#: tools.lua +msgid "Hydrometer" +msgstr "Hydrometro" diff --git a/locale/template.pot b/locale/template.pot index d8eb19c..aa589d6 100644 --- a/locale/template.pot +++ b/locale/template.pot @@ -33,6 +33,14 @@ msgstr "" msgid "Bowl of uncooked vegetable stew" msgstr "" +#: cooking.lua +msgid "Bowl of ratatouille" +msgstr "" + +#: cooking.lua +msgid "Bowl of uncooked ratatouille" +msgstr "" + #: corn.lua msgid "Corn" msgstr "" @@ -137,6 +145,18 @@ msgstr "" msgid "Tomato plant" msgstr "" +#: eggfruit.lua +msgid "Eggfruit" +msgstr "" + +#: eggfruit.lua +msgid "Eggfruit seed" +msgstr "" + +#: eggfruit.lua +msgid "Eggfruit plant" +msgstr "" + #: tomato.lua msgid "Tomato" msgstr "" diff --git a/readme.md b/readme.md index 6d62342..490842c 100644 --- a/readme.md +++ b/readme.md @@ -90,7 +90,7 @@ which are the clones that can grow back to potatoes. Be careful not to dig the plant when there's flowers! You have to wait until the soil below shows potatoes. It's fairly easy to see the difference, though. -5. Green Beans +5. Green Beans. These green beans are unnaturally green, but there's so many of them that grow on a vine! Sadly, these beans don't grow beans @@ -111,6 +111,12 @@ so you salvage the beanpole's sticks after harvesting in order to make more beanpoles again. It's a bit of work, but worth it, these beans are delicious! +6. Eggfruit. + +The eggfruit behave similar to the tomato, but has a longer lifespan, is +less vulnerable to wither and soak, but yields less crop. Although they +are not very nutrious alone, you can cook tasty ratatouille with them. + ## Cooking / Crafting @@ -131,12 +137,18 @@ You can fill these bowls (or any group:food_bowl) with vegetables to craft an uncooked vegetable stew: empty empty empty -grean_beans potato tomato +green_beans potato tomato +empty clay_bowl empty + +or an uncooked ratatouille: + +empty empty empty +pumpkin eggfruit tomato empty clay_bowl empty -The uncooked vegetable stew obviously needs to be cooked as well in -an oven. The resulting Vegetable Stew bowl gives a lot of hears back, -which is worth the effort. +The uncooked meals obviously needs to be cooked as well in an oven. The +resulting vegetable dishes give a lot of hearts back, which is worth the +effort. The watering can can be made as follows: diff --git a/textures/crops_bowl_ratatouille.png b/textures/crops_bowl_ratatouille.png new file mode 100644 index 0000000..7633c11 Binary files /dev/null and b/textures/crops_bowl_ratatouille.png differ diff --git a/textures/crops_bowl_uncooked_ratatouille.png b/textures/crops_bowl_uncooked_ratatouille.png new file mode 100644 index 0000000..b0accc5 Binary files /dev/null and b/textures/crops_bowl_uncooked_ratatouille.png differ diff --git a/textures/crops_eggfruit.png b/textures/crops_eggfruit.png new file mode 100644 index 0000000..001bf37 Binary files /dev/null and b/textures/crops_eggfruit.png differ diff --git a/textures/crops_eggfruit_plant_1.png b/textures/crops_eggfruit_plant_1.png new file mode 100644 index 0000000..a04027f Binary files /dev/null and b/textures/crops_eggfruit_plant_1.png differ diff --git a/textures/crops_eggfruit_plant_2.png b/textures/crops_eggfruit_plant_2.png new file mode 100644 index 0000000..3ad8c2b Binary files /dev/null and b/textures/crops_eggfruit_plant_2.png differ diff --git a/textures/crops_eggfruit_plant_3.png b/textures/crops_eggfruit_plant_3.png new file mode 100644 index 0000000..d2c323e Binary files /dev/null and b/textures/crops_eggfruit_plant_3.png differ diff --git a/textures/crops_eggfruit_plant_4.png b/textures/crops_eggfruit_plant_4.png new file mode 100644 index 0000000..5b32ee1 Binary files /dev/null and b/textures/crops_eggfruit_plant_4.png differ diff --git a/textures/crops_eggfruit_plant_5.png b/textures/crops_eggfruit_plant_5.png new file mode 100644 index 0000000..99cd237 Binary files /dev/null and b/textures/crops_eggfruit_plant_5.png differ diff --git a/textures/crops_eggfruit_plant_6.png b/textures/crops_eggfruit_plant_6.png new file mode 100644 index 0000000..fa149a3 Binary files /dev/null and b/textures/crops_eggfruit_plant_6.png differ diff --git a/textures/crops_eggfruit_plant_7.png b/textures/crops_eggfruit_plant_7.png new file mode 100644 index 0000000..0b44707 Binary files /dev/null and b/textures/crops_eggfruit_plant_7.png differ diff --git a/textures/crops_eggfruit_seed.png b/textures/crops_eggfruit_seed.png new file mode 100644 index 0000000..57393f1 Binary files /dev/null and b/textures/crops_eggfruit_seed.png differ diff --git a/tomato.lua b/tomato.lua index f70d914..2b8a9c5 100644 --- a/tomato.lua +++ b/tomato.lua @@ -2,6 +2,7 @@ --[[ Copyright (C) 2015 - Auke Kok + 2018 - Marius Spix "crops" is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -43,80 +44,48 @@ minetest.register_node("crops:tomato_seed", { end }) -for stage = 1, 4 do -minetest.register_node("crops:tomato_plant_" .. stage , { - description = S("Tomato plant"), - tiles = { "crops_tomato_plant_" .. stage .. ".png" }, - drawtype = "plantlike", - paramtype2 = "meshoptions", - waving = 1, - sunlight_propagates = true, - use_texture_alpha = true, - walkable = false, - paramtype = "light", - groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, - drop = {}, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45} +for stage = 1, 6 do + local node_def = + { + description = S("Tomato plant"), + tiles = { "crops_tomato_plant_" .. stage .. ".png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45} + } } -}) -end - -minetest.register_node("crops:tomato_plant_5" , { - description = S("Tomato plant"), - tiles = { "crops_tomato_plant_5.png" }, - drawtype = "plantlike", - paramtype2 = "meshoptions", - waving = 1, - sunlight_propagates = true, - use_texture_alpha = true, - walkable = false, - paramtype = "light", - groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, - drop = {}, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45} - }, - on_dig = function(pos, node, digger) - local drops = {} - for i = 1, math.random(1, 2) do - table.insert(drops, "crops:tomato") - end - core.handle_node_drops(pos, drops, digger) - local meta = minetest.get_meta(pos) - local ttl = meta:get_int("crops_tomato_ttl") - if ttl > 1 then - minetest.swap_node(pos, { name = "crops:tomato_plant_4", param2 = 1}) - meta:set_int("crops_tomato_ttl", ttl - 1) - else - crops.die(pos) + if stage == 5 then + node_def.on_dig = function(pos, node, digger) + local drops = {} + for i = 1, math.random(1, 2) do + table.insert(drops, "crops:tomato") + end + core.handle_node_drops(pos, drops, digger) + + local meta = minetest.get_meta(pos) + local ttl = meta:get_int("crops_tomato_ttl") + if ttl > 1 then + minetest.swap_node(pos, { name = "crops:tomato_plant_4", param2 = 1}) + meta:set_int("crops_tomato_ttl", ttl - 1) + else + crops.die(pos) + end end end -}) - -minetest.register_node("crops:tomato_plant_6", { - description = S("Tomato plant"), - tiles = { "crops_tomato_plant_6.png" }, - drawtype = "plantlike", - paramtype2 = "meshoptions", - waving = 1, - sunlight_propagates = true, - use_texture_alpha = true, - walkable = false, - paramtype = "light", - groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, - drop = {}, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45} - }, -}) + + minetest.register_node("crops:tomato_plant_" .. stage , node_def) +end minetest.register_craftitem("crops:tomato", { description = S("Tomato"), @@ -181,7 +150,7 @@ minetest.register_abm({ }) crops.tomato_die = function(pos) - minetest.set_node(pos, { name = "crops:tomato_plant_6", param2 = 1 }) + minetest.swap_node(pos, { name = "crops:tomato_plant_6", param2 = 1 }) end local properties = { @@ -194,8 +163,7 @@ local properties = { wither = 20, wither_damage = 10, } -crops.register({ name = "crops:tomato_plant_1", properties = properties }) -crops.register({ name = "crops:tomato_plant_2", properties = properties }) -crops.register({ name = "crops:tomato_plant_3", properties = properties }) -crops.register({ name = "crops:tomato_plant_4", properties = properties }) -crops.register({ name = "crops:tomato_plant_5", properties = properties }) + +for stage = 1, 5 do + crops.register({ name = "crops:tomato_plant_" .. stage, properties = properties }) +end