From 82104e68a7fe06e8c441b22dc6f0af3ac0cd9fc0 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 30 Apr 2018 13:28:33 +0100 Subject: [PATCH] added beetroot and beetroot soup --- README.txt | 1 + beetroot.lua | 85 +++++++++++++++++++++++++++++ farming.conf_example | 1 + init.lua | 2 + mapgen.lua | 1 + textures/farming_beetroot.png | Bin 0 -> 152 bytes textures/farming_beetroot_1.png | Bin 0 -> 105 bytes textures/farming_beetroot_2.png | Bin 0 -> 112 bytes textures/farming_beetroot_3.png | Bin 0 -> 125 bytes textures/farming_beetroot_4.png | Bin 0 -> 125 bytes textures/farming_beetroot_5.png | Bin 0 -> 137 bytes textures/farming_beetroot_soup.png | Bin 0 -> 161 bytes 12 files changed, 90 insertions(+) create mode 100644 beetroot.lua create mode 100644 textures/farming_beetroot.png create mode 100644 textures/farming_beetroot_1.png create mode 100644 textures/farming_beetroot_2.png create mode 100644 textures/farming_beetroot_3.png create mode 100644 textures/farming_beetroot_4.png create mode 100644 textures/farming_beetroot_5.png create mode 100644 textures/farming_beetroot_soup.png diff --git a/README.txt b/README.txt index f12be69..211367c 100644 --- a/README.txt +++ b/README.txt @@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t Changelog: +1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl) 1.35 - Deprecated bronze/mese/diamond hoe's, added hoe bomb and deprecated hoe's as lucky block prizes 1.34 - Added scarecrow Base (5x sticks in a cross shape) 1.33 - Added cooking utensils (wooden bowl, saucepan, cooking pot, baking tray, skillet, cutting board, mortar & pestle, juicer, glass mixing bowl) for easier food crafts. diff --git a/beetroot.lua b/beetroot.lua new file mode 100644 index 0000000..1510a76 --- /dev/null +++ b/beetroot.lua @@ -0,0 +1,85 @@ + +local S = farming.intllib + +-- beetroot +minetest.register_craftitem("farming:beetroot", { + description = S("Beetroot"), + inventory_image = "farming_beetroot.png", + groups = {food_beetroot = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1") + end, + on_use = minetest.item_eat(1), +}) + +-- beetroot soup +minetest.register_craftitem("farming:beetroot_soup", { + description = S("Beetroot Soup"), + inventory_image = "farming_beetroot_soup.png", + groups = {flammable = 2}, + on_use = minetest.item_eat(6, "farming:bowl"), +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:beetroot_soup", + recipe = { + "group:food_beetroot", "group:food_beetroot", + "group:food_beetroot", "group:food_beetroot", + "group:food_beetroot", "group:food_beetroot","group:food_bowl" + } +}) + +-- red dye +minetest.register_craft({ + type = "shapeless", + output = "dye:red", + recipe = {"group:food_beetroot"}, +}) + +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_beetroot_1.png"}, + paramtype = "light", +-- paramtype2 = "meshoptions", +-- place_param2 = 3, + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:beetroot_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_beetroot_2.png"} +minetest.register_node("farming:beetroot_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_beetroot_3.png"} +minetest.register_node("farming:beetroot_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_beetroot_4.png"} +minetest.register_node("farming:beetroot_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_beetroot_5.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + max_items = 4, items = { + {items = {'farming:beetroot'}, rarity = 1}, + {items = {'farming:beetroot'}, rarity = 2}, + {items = {'farming:beetroot'}, rarity = 3}, + {items = {'farming:beetroot'}, rarity = 4}, + } +} +minetest.register_node("farming:beetroot_5", table.copy(crop_def)) diff --git a/farming.conf_example b/farming.conf_example index 449a6df..2505054 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -29,6 +29,7 @@ farming.garlic = true farming.pepper = true farming.pineapple = true farming.peas = true +farming.beetroot = true farming.donuts = true -- rarety of crops on map, default is 0.001 (higher number = more crops) diff --git a/init.lua b/init.lua index 962cca9..33a9ca7 100644 --- a/init.lua +++ b/init.lua @@ -600,6 +600,7 @@ farming.onion = true farming.pepper = true farming.pineapple = true farming.peas = true +farming.beetroot = true farming.donuts = true farming.rarety = 0.002 -- 0.006 @@ -655,6 +656,7 @@ if farming.onion then dofile(farming.path.."/onion.lua") end if farming.pepper then dofile(farming.path.."/pepper.lua") end if farming.pineapple then dofile(farming.path.."/pineapple.lua") end if farming.peas then dofile(farming.path.."/pea.lua") end +if farming.beetroot then dofile(farming.path.."/beetroot.lua") end if farming.chili then dofile(farming.path.."/chili.lua") end if farming.donuts then dofile(farming.path.."/donut.lua") end diff --git a/mapgen.lua b/mapgen.lua index bfe092c..2554a15 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -41,6 +41,7 @@ register_plant("grapebush", 25, 45, nil, "", -1, farming.grapes) register_plant("onion_5", 5, 22, nil, "", -1, farming.onion) register_plant("garlic_5", 3, 30, nil, "group:tree", 1, farming.garlic) register_plant("pea_5", 25, 50, nil, "", -1, farming.peas) +register_plant("beetroot_5", 1, 15, nil, "", -1, farming.beetroot) if minetest.get_mapgen_setting("mg_name") == "v6" then diff --git a/textures/farming_beetroot.png b/textures/farming_beetroot.png new file mode 100644 index 0000000000000000000000000000000000000000..6a601681daa4486f8d66cea8115ee0dfe20b989e GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9JOMr-uBp1|tx`g>Y@JRtwTecz zX9C3;OM?7@862M7NCR@LJY5_^IIbrrI57F}1vD87ok)o0O7UDf>%f5tf4MxKFh}zopr0IBIM^8f$< literal 0 HcmV?d00001 diff --git a/textures/farming_beetroot_1.png b/textures/farming_beetroot_1.png new file mode 100644 index 0000000000000000000000000000000000000000..8b75e10fb825d14ee45b740b356951608db4ad4e GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9Yth$G!4!GE@9`^vB8(+L ze!&b5&u*jvIf9-pjv*Y^lM@t#ObiN&7z7zu#2FU%ezLj?lw|O9^>bP0l+XkKFnt&M literal 0 HcmV?d00001 diff --git a/textures/farming_beetroot_2.png b/textures/farming_beetroot_2.png new file mode 100644 index 0000000000000000000000000000000000000000..9c1ce1e730de66cfac5d0b1d576a77b0f8f946f6 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;TYyi9tC@P3V2XV8z9}p~5yp}r zzhDN3XE)M-90^Ys#}JO|$q5Q9EY=b#=>`Qp2@jqyC@}~xU}9C+F#7^f4TGnvpUXO@ GgeCxz;u#G9 literal 0 HcmV?d00001 diff --git a/textures/farming_beetroot_3.png b/textures/farming_beetroot_3.png new file mode 100644 index 0000000000000000000000000000000000000000..0f28e5e7db2418a884c1090275892ecba2ae234d GIT binary patch literal 125 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oB=)|t_%$6tx`gQDe{MmQl0?? z8B2ovf*Bm1-ADs+lssJ=LpZJ{Cn&HQ7@9D4E?dT?(zK9Kzopr0MqOuUH||9 literal 0 HcmV?d00001 diff --git a/textures/farming_beetroot_4.png b/textures/farming_beetroot_4.png new file mode 100644 index 0000000000000000000000000000000000000000..35f211b08a708819f76b851571c2573ddd7bb4d0 GIT binary patch literal 125 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oB=)|t_%$6tx`gQDe{MmQl0?? z8B2ovf*Bm1-ADs+lssJ=LpZJ{CnyLR7@9D4E?dSX@$klh0}oC-XmHuEi;azeVXhmy UOBsj%8lY+hPgg&ebxsLQ0L>jCGynhq literal 0 HcmV?d00001 diff --git a/textures/farming_beetroot_5.png b/textures/farming_beetroot_5.png new file mode 100644 index 0000000000000000000000000000000000000000..c4b8957275f7e15a9725aff1ec01d0b3c420267c GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9JOMr-uBp1|tx`gQDe|*yol^AK zc!A=KB|(0{3=Yq3qyahFo-U3d9M_W*6nJJx%xZ864rcBt$Vo^jC}25dVPxUJ5qA9m g1KZEv*Vi*J9M9)`d-oKJHc%Ubr>mdKI;Vst04iW52mk;8 literal 0 HcmV?d00001 diff --git a/textures/farming_beetroot_soup.png b/textures/farming_beetroot_soup.png new file mode 100644 index 0000000000000000000000000000000000000000..4df562e944ef71307c3369f4a8186aa483f515c5 GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VWP0r5&GFzpDX4yK`M9EFh zRh7$)nFbVMED7=pW^j0RBMr#0^>lFz;kcfhut3Csi;JrvQ&Bb9S-{)F^X7>g0w)AS zm@YLrv}G(%7_!isJMm;DPAHf1t=bz_}yec7=Lpg|0tu6{1-oD!M< D)XOj? literal 0 HcmV?d00001