From e1646cb49b04e82905546be0acbf95a73e2228fc Mon Sep 17 00:00:00 2001 From: sys4-fr Date: Tue, 21 Feb 2017 22:51:44 +0100 Subject: [PATCH] Add wild carrot to farm before you can obtain domestic carrots --- init.lua | 67 +++++++++++++++------- textures/morefarming_wild_carrot.png | Bin 0 -> 186 bytes textures/morefarming_wild_carrot_1.png | Bin 0 -> 128 bytes textures/morefarming_wild_carrot_2.png | Bin 0 -> 135 bytes textures/morefarming_wild_carrot_3.png | Bin 0 -> 141 bytes textures/morefarming_wild_carrot_4.png | Bin 0 -> 150 bytes textures/morefarming_wild_carrot_5.png | Bin 0 -> 163 bytes textures/morefarming_wild_carrot_6.png | Bin 0 -> 174 bytes textures/morefarming_wild_carrot_7.png | Bin 0 -> 188 bytes textures/morefarming_wild_carrot_8.png | Bin 0 -> 201 bytes textures/morefarming_wild_carrot_seed.png | Bin 0 -> 160 bytes 11 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 textures/morefarming_wild_carrot.png create mode 100644 textures/morefarming_wild_carrot_1.png create mode 100644 textures/morefarming_wild_carrot_2.png create mode 100644 textures/morefarming_wild_carrot_3.png create mode 100644 textures/morefarming_wild_carrot_4.png create mode 100644 textures/morefarming_wild_carrot_5.png create mode 100644 textures/morefarming_wild_carrot_6.png create mode 100644 textures/morefarming_wild_carrot_7.png create mode 100644 textures/morefarming_wild_carrot_8.png create mode 100644 textures/morefarming_wild_carrot_seed.png diff --git a/init.lua b/init.lua index 039b1c9..5e96398 100644 --- a/init.lua +++ b/init.lua @@ -1,16 +1,40 @@ --- carrot -minetest.override_item("moreflowers:wild_carrot", - { +-- Wild carrot +minetest.override_item("moreflowers:wild_carrot", { drop = { max_items = 1, items = { - { items = {"morefarming:seed_carrot"}, rarity = 8}, + { items = {"morefarming:seed_wild_carrot"}, rarity = 12}, { items = {"moreflowers:wild_carrot"}}, } }}) - -farming.register_plant("morefarming:carrot", - { + +farming.register_plant("morefarming:wild_carrot", { + description = "Wild Carrot seed", + inventory_image = "morefarming_wild_carrot_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {flammable = 4}, + }) + +minetest.override_item("morefarming:wild_carrot_8", { + drop = { + max_items = 3, + items = { + { items = {"morefarming:seed_wild_carrot"}, rarity = 6}, + { items = {"morefarming:seed_carrot"}, rarity = 8}, + { items = {"morefarming:wild_carrot"}, rarity = 2}, + { items = {"moreflowers:wild_carrot"}}, + } + }}) + +minetest.override_item("morefarming:wild_carrot", { + on_use = minetest.item_eat(1) + }) + +-- Carrot +farming.register_plant("morefarming:carrot", { description = "Carrot seed", paramtype2 = "meshoptions", inventory_image = "morefarming_carrot_seed.png", @@ -20,25 +44,24 @@ farming.register_plant("morefarming:carrot", fertility = {"grassland"}, groups = {flammable = 4}, place_param2 = 3, - }) + }) -minetest.override_item("morefarming:carrot", - { +minetest.override_item("morefarming:carrot", { on_use = minetest.item_eat(4) - }) + }) -- golden carrot minetest.register_craftitem("morefarming:carrot_gold", { - description = "Golden Carrot", - inventory_image = "morefarming_carrot_gold.png", - on_use = minetest.item_eat(6), -}) + description = "Golden Carrot", + inventory_image = "morefarming_carrot_gold.png", + on_use = minetest.item_eat(6), + }) minetest.register_craft({ - output = "morefarming:carrot_gold", - recipe = { - {"", "default:gold_lump", ""}, - {"default:gold_lump", "morefarming:carrot", "default:gold_lump"}, - {"", "default:gold_lump", ""}, - } -}) + output = "morefarming:carrot_gold", + recipe = { + {"", "default:gold_lump", ""}, + {"default:gold_lump", "morefarming:carrot", "default:gold_lump"}, + {"", "default:gold_lump", ""}, + } + }) diff --git a/textures/morefarming_wild_carrot.png b/textures/morefarming_wild_carrot.png new file mode 100644 index 0000000000000000000000000000000000000000..cbb7ecd16bd13b3d642e16d86604ddeed252f51c GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDUO)Ov#bmxe-xAAQ;XlwUq zX|FhPXv(QGCpSNOVFFacSQ6wH%;50sMjDV4;OXKR!f`!0A;CZ(O)PnjYB}F z!Dt500v>U8jm8)q}S@Me24g!D4Eq@@-l eG0c` z+2?cU@Z>XR&UoCt^AMeT{Ny&vu2~rHq X{S2z@-Px;wDi}On{an^LB{Ts5Vi60c` z+2?cU@Z>XR&UoCt^AM0c` z+2?cU@Z>XR&UoCt^AMFVdQ&MBb@0Fd4&*8l(j literal 0 HcmV?d00001 diff --git a/textures/morefarming_wild_carrot_4.png b/textures/morefarming_wild_carrot_4.png new file mode 100644 index 0000000000000000000000000000000000000000..0e1058339a907d5123924b7283a09c8e5ddd68d2 GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDUjdidUb7%LhGxF&$X>0c` z+2?cU@Z>XR&UoCt^AM0c` z+2?cU@Z>XR&UoCt^AM0c` z+2?cU@Z>XR&UoCt^AMmwL=! z^XPB8;TN6+Gj|z}2S(Zc55p^(gU|DG$?y UDX*_z0Gh|(>FVdQ&MBb@0GHi9>Hq)$ literal 0 HcmV?d00001 diff --git a/textures/morefarming_wild_carrot_7.png b/textures/morefarming_wild_carrot_7.png new file mode 100644 index 0000000000000000000000000000000000000000..b3509a0417bbe7a97ff228894b9e60c38291b724 GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDUZEN=yb7zlru=TAo^64-s z+2?cU@Z>XR&Um(YNdwg|mIV0)GdMiEkp|=hdAc};a9mGLIKbr;$*jQhEJ5I;l)$Mc z49{ju8E8s09GN*oQskhL8`Ggv0$a6uxDuiqCY}^LlMs?3)Zn4H+988kP_%SmIV0)GdMiEkp|?%d%8G=a9mGL00L%Z0S#|$hDn?}JSUGT z=v7BqO=gZbbf>}dAcKdov7xa>lWPx4%T&c#ArhhowlpYBR-SQi#R(OLi9unF7ub}v r1O(ky2(hs#0tq!{4P{$V4+e(yOdR|cs|B=yRxx1QanCPl*sY z_$pF{m&IYr#0J3`ZC=J3G!AWPXj#})a9ToS<19V~he<4ATK~>{1RBNQ>FVdQ&MBb@ E08R}sF#rGn literal 0 HcmV?d00001