From 47985d7dd224b30106a4bfcb7ee94c752526c1d1 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 11 Mar 2021 09:49:52 +0000 Subject: [PATCH] add parsley, artichoke and new foods --- crops/artichoke.lua | 64 +++++++++++++++++++ crops/parsley.lua | 56 +++++++++++++++++ farming.conf_example | 2 + food.lua | 85 ++++++++++++++++++++++++++ init.lua | 6 +- license.txt | 6 ++ mapgen.lua | 23 +++++++ textures/farming_artichoke.png | Bin 0 -> 263 bytes textures/farming_artichoke_1.png | Bin 0 -> 118 bytes textures/farming_artichoke_2.png | Bin 0 -> 120 bytes textures/farming_artichoke_3.png | Bin 0 -> 183 bytes textures/farming_artichoke_4.png | Bin 0 -> 160 bytes textures/farming_artichoke_5.png | Bin 0 -> 216 bytes textures/farming_caramel.png | Bin 0 -> 133 bytes textures/farming_cheese_vegan.png | Bin 0 -> 256 bytes textures/farming_paella.png | Bin 0 -> 487 bytes textures/farming_parsley.png | Bin 0 -> 606 bytes textures/farming_parsley_1.png | Bin 0 -> 167 bytes textures/farming_parsley_2.png | Bin 0 -> 195 bytes textures/farming_parsley_3.png | Bin 0 -> 270 bytes textures/farming_potato_omelet.png | Bin 0 -> 687 bytes textures/farming_spanish_potatoes.png | Bin 0 -> 557 bytes textures/farming_vanilla_flan.png | Bin 0 -> 1216 bytes 23 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 crops/artichoke.lua create mode 100644 crops/parsley.lua create mode 100644 textures/farming_artichoke.png create mode 100644 textures/farming_artichoke_1.png create mode 100644 textures/farming_artichoke_2.png create mode 100644 textures/farming_artichoke_3.png create mode 100644 textures/farming_artichoke_4.png create mode 100644 textures/farming_artichoke_5.png create mode 100644 textures/farming_caramel.png create mode 100644 textures/farming_cheese_vegan.png create mode 100644 textures/farming_paella.png create mode 100644 textures/farming_parsley.png create mode 100644 textures/farming_parsley_1.png create mode 100644 textures/farming_parsley_2.png create mode 100644 textures/farming_parsley_3.png create mode 100644 textures/farming_potato_omelet.png create mode 100644 textures/farming_spanish_potatoes.png create mode 100644 textures/farming_vanilla_flan.png diff --git a/crops/artichoke.lua b/crops/artichoke.lua new file mode 100644 index 0000000..92143f6 --- /dev/null +++ b/crops/artichoke.lua @@ -0,0 +1,64 @@ +local S = farming.intllib + +-- item definition +minetest.register_craftitem("farming:artichoke", { + description = S("Artichoke"), + inventory_image = "farming_artichoke.png", + groups = {seed = 2, food_artichoke = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:artichoke_1") + end, + on_use = minetest.item_eat(4) +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"farming_artichoke_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:artichoke_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_artichoke_2.png"} +minetest.register_node("farming:artichoke_2", table.copy(def)) + +-- stage 3 +def.tiles = {"farming_artichoke_3.png"} +minetest.register_node("farming:artichoke_3", table.copy(def)) + +-- stage 4 +def.tiles = {"farming_artichoke_4.png"} +minetest.register_node("farming:artichoke_4", table.copy(def)) + +-- stage 5 (final) +def.tiles = {"farming_artichoke_5.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:artichoke 2"}, rarity = 1}, + {items = {"farming:artichoke"}, rarity = 2} + } +} +minetest.register_node("farming:artichoke_5", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:artichoke"] = { + crop = "farming:artichoke", + seed = "farming:artichoke", + minlight = 13, + maxlight = 15, + steps = 5 +} diff --git a/crops/parsley.lua b/crops/parsley.lua new file mode 100644 index 0000000..0bc20eb --- /dev/null +++ b/crops/parsley.lua @@ -0,0 +1,56 @@ +local S = farming.intllib + +-- item definition +minetest.register_craftitem("farming:parsley", { + description = S("Parsley"), + inventory_image = "farming_parsley.png", + groups = {seed = 2, food_parsley = 1, flammable = 2}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:parsley_1") + end +}) + +-- crop definition +local def = { + drawtype = "plantlike", + tiles = {"farming_parsley_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:parsley_1", table.copy(def)) + +-- stage 2 +def.tiles = {"farming_parsley_2.png"} +minetest.register_node("farming:parsley_2", table.copy(def)) + +-- stage 3 (final) +def.tiles = {"farming_parsley_3.png"} +def.groups.growing = nil +def.drop = { + items = { + {items = {"farming:parsley 2"}, rarity = 1}, + {items = {"farming:parsley"}, rarity = 2}, + {items = {"farming:parsley"}, rarity = 3} + } +} +minetest.register_node("farming:parsley_3", table.copy(def)) + +-- add to registered_plants +farming.registered_plants["farming:parsley"] = { + crop = "farming:parsley", + seed = "farming:parsley", + minlight = 13, + maxlight = 15, + steps = 3 +} diff --git a/farming.conf_example b/farming.conf_example index bea7ada..9a804a9 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -35,6 +35,8 @@ farming.blackberry = 0.002 farming.lettuce = 0.001 farming.soy = 0.001 farming.vanilla = 0.001 +farming.artichoke = 0.001 +farming.parsley = 0.002 farming.grains = true -- true or false only -- default rarety of crops on map (higher number = more crops) diff --git a/food.lua b/food.lua index 7f63b8a..b704336 100644 --- a/food.lua +++ b/food.lua @@ -16,6 +16,19 @@ minetest.register_craft({ recipe = "default:papyrus" }) +--= Sugar caramel + +minetest.register_craftitem("farming:caramel", { + description = S("Caramel"), + inventory_image = "farming_caramel.png", +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 6, + output = "farming:caramel", + recipe = "group:food_sugar", +}) --= Salt @@ -472,3 +485,75 @@ minetest.register_craft({ "vessels:drinking_glass" } }) + +-- Patatas a la importancia + +minetest.register_craftitem("farming:spanish_potatoes", { + description = S("Spanish Potatoes"), + inventory_image = "farming_spanish_potatoes.png", + on_use = minetest.item_eat(8, "farming:bowl"), +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:spanish_potatoes", + recipe = { + "farming:potato", "group:food_parsley", "farming:potato", + "group:food_egg", "group:food_flour", "farming:onion", + "farming:garlic_clove", "group:food_bowl", "group:food_skillet" + }, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +-- Potato omelet + +minetest.register_craftitem("farming:potato_omelet", { + description = S("Potato omelet"), + inventory_image = "farming_potato_omelet.png", + on_use = minetest.item_eat(6, "farming:bowl"), +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:potato_omelet", + recipe = { + "group:food_egg", "farming:potato", "group:food_onion", + "group:food_skillet", "group:food_bowl"}, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +-- Paella + +minetest.register_craftitem("farming:paella", { + description = S("Paella"), + inventory_image = "farming_paella.png", + on_use = minetest.item_eat(8, "farming:bowl") +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:paella", + recipe = { + "group:food_rice", "dye:orange", "farming:pepper_red", + "group:food_peas", "group:food_chicken", "group:food_bowl", "group:food_skillet" + }, + replacements = {{"group:food_skillet", "farming:skillet"}} +}) + +-- Flan + +minetest.register_craftitem("farming:flan", { + description = S("Vanilla Flan"), + inventory_image = "farming_vanilla_flan.png", + on_use = minetest.item_eat(6) +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flan", + recipe = { + "group:food_sugar", "group:food_milk", "farming:caramel", + "group:food_egg", "group:food_egg", "farming:vanilla_extract" + }, + replacements = {{"mobs:bucket_milk", "bucket:bucket_empty"}} +}) diff --git a/init.lua b/init.lua index 973c807..9b9306c 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20201213", + version = "20210311", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -633,6 +633,8 @@ farming.blackberry = 0.002 farming.soy = 0.001 farming.vanilla = 0.001 farming.lettuce = 0.001 +farming.artichoke = 0.001 +farming.parsley = 0.002 farming.grains = true farming.rarety = 0.002 @@ -703,6 +705,8 @@ ddoo("blackberry.lua", farming.blackberry) ddoo("soy.lua", farming.soy) ddoo("vanilla.lua", farming.vanilla) ddoo("lettuce.lua", farming.lettuce) +ddoo("artichoke.lua", farming.artichoke) +ddoo("parsley.lua", farming.parsley) dofile(farming.path .. "/food.lua") dofile(farming.path .. "/mapgen.lua") diff --git a/license.txt b/license.txt index 49606b6..7ef6164 100644 --- a/license.txt +++ b/license.txt @@ -155,6 +155,12 @@ Created by Felfa (CC0) farming_burger.png farming_soy*.png farming_vanilla*.png + farming_artichoke*.png + farming_parsley*.png + farming_paella.png + farming_potato_omelette.png + farming_spanish_potatoes.png + farming_vanilla_flan.png Created by gorlock (CC0) farming_salt_crystal.png diff --git a/mapgen.lua b/mapgen.lua index 7febaa1..c32eebc 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -53,6 +53,7 @@ register_plant("cabbage_6", 2, 10, nil, "", -1, farming.cabbage) register_plant("lettuce_5", 5, 30, nil, "", -1, farming.lettuce) register_plant("blackberry_4", 3, 10, nil, "", -1, farming.blackberry) register_plant("vanilla_7", 5, 35, nil, "", -1, farming.vanilla) +register_plant("parsley_3", 10, 40, nil, "", -1, farming.parsley) register_plant("mint_4", 1, 75, { "default:dirt_with_grass", "default:dirt_with_coniferous_litter"}, "group:water", 1, farming.mint) @@ -127,6 +128,28 @@ minetest.register_decoration({ end +if farming.artichoke then +minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = tonumber(farming.artichoke) or farming.rarety, + spread = {x = 100, y = 100, z = 100}, + seed = 448, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = 13, + decoration = {"farming:artichoke_5"}, + spawn_by = "group:tree", + num_spawn_by = 1, +}) +end + + if farming.pepper then local tmp1 = {"default:dirt_with_rainforest_litter"} -- v7 diff --git a/textures/farming_artichoke.png b/textures/farming_artichoke.png new file mode 100644 index 0000000000000000000000000000000000000000..74af38b74bad8b8cd06dbc38191f0f90c144d8e9 GIT binary patch literal 263 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!O@L2`E0AtH6qK~Uv|?@0nul#g zE4>1n^s*K>dlYC#^_zw_S!T^~kL)r{oNkpg-8QgGGk2|nXQ_6~WV47`yGf~W%0T@h zB|(0{4F55~u7}Ahf%0jdE{-7*Q*-+q`3@*>ummU~!`{a0NLqy2(iJb|{1htjK49sWFURkD=mwf2V+Dw&~>^hgj_f$$* r-|#)B{yYC^^Y#gI);#)~*3G{4CUa!R*@q{9HZpj+`njxgN@xNAlLKvS literal 0 HcmV?d00001 diff --git a/textures/farming_artichoke_1.png b/textures/farming_artichoke_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b7f2e020a3718674375feaeadea20352f3274b94 GIT binary patch literal 118 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJPk>K|E0AtH6qK~Uv|?@0zjK*= zKt4-JkY6yv|Ns9t>pFA*`J$dKjv*3LlM^I32l$?e-SpaKR@ LS3j3^P6K|E0AtH6qK~Uv|?@0zjK*= zKt4-JkY6yv|Ns9t>pFA*`Qn}~jv*3LlM^H|4)h#LPjPx2yrw~fk%99tgPdsLk6xe> N22WQ%mvv4FO#pibAiV$p literal 0 HcmV?d00001 diff --git a/textures/farming_artichoke_3.png b/textures/farming_artichoke_3.png new file mode 100644 index 0000000000000000000000000000000000000000..2d203e90ec32f466ffdaa4c1baea9f42b74974b9 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`b)GJcAr`&K2@u5zP7ICs=y+i8{6t_oA*r8VK#G?;LKbXA^l~3@RY`f5BDDD`Q){U=WE&P zfG-;aj2b|Kzq8reDmj-+N=o=8pLqPm>7tkZj$n{Mht#D^1n^qwBIOan@=mjw9*GyDgGrS;2x1BHw|T^vIsrmpQV6k<@|ImFWSzkbuMsRuo8 zPGUY*(b<`DQ!!%J+`s^l1Ad>xJ}$WYy!K1n^s*K>dlYC#^_zw_S!T^~kL)r{oNkqIG-Vl3HD5`PUogXeWDxFkTLdWM@9E+g zA~ChK&zrBofWzgd#oS44zvHjxg=FQVe3v`SGVw19o3^@e=PrKlK6ewXiBFe(4!Fjb z>vqI-v-jHVvyU1c{nWg=TmO~l50O8K|E0EsTuCT9AYG0OAXqF8~ z14~JeUogY}|Nl4ZI&=W}DxNNmAre!Q6D005Ocd-red5T8mLus&Ni4|{^Cb_ZGbL?$ a!_2^2%%F4PfPp$tJ%gvKpUXO@geCy@4J6Y5 literal 0 HcmV?d00001 diff --git a/textures/farming_cheese_vegan.png b/textures/farming_cheese_vegan.png new file mode 100644 index 0000000000000000000000000000000000000000..22c439e3aaceedfdc6e03058e83836c1e59faecc GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ%`eJbQKYbQg8a>eW_LC_ z-`nB$a8G3ZmLp$)3K&a*{DK)Ap4~_Tagw~Fdh=l#yFh(r^R6+f1NPil>WX2*-8bUPrD510ELTj`Zyw?|StoH2nYYXs_;@ z|ML@~Y-gP2OEDAtd3H}-!u8qQ{yYUHWwT^bICHb#ZPB?L`(62}PG{-)TL&}TQWy`t tUGQdYgrQf0>YcM#Kat95Zd`a#2PgA$L*8M2;~GMrEDkv>?KkH!#DAA}8!nj~j3taX_-% zjWV#J7((X)_NK@TPa>&h1vfBhqwN5;T`L`VOk|jjaTUl4+O`DHCsOBLQ65)mK^0vQ zQ*ZmWE~24`!ZSH;k_}F?ac1qh$!!M#;j;z6Jh&`%%< zAR~`vZ0KutzLlpA0L04TnFz;hZRt0#h?2-Nu;E3&asaslFY=SVh!Z+vt=``C_7>lL d8o#T57av`|7AwdG0OJ4v002ovPDHLkV1i`6(E9)Y literal 0 HcmV?d00001 diff --git a/textures/farming_parsley.png b/textures/farming_parsley.png new file mode 100644 index 0000000000000000000000000000000000000000..183ecb75636f79db0c20a500821f516985b41a00 GIT binary patch literal 606 zcmV-k0-^nhP)F>)zkHKfarDli{D)LT4kU?-nV6BEzDK2eF9AAUg7%R$a17$Drs^ zL_|9T9kj@UL3P+63eqejq-2$}#Oc)Sb=%ve)dm$rmp<_D9DYAOJUq`A{tHag{B4aU z?6V_Jyl;Q?1|XFL17{LLFU9ptZf7M1dUk|g~U9DNjvWu(N^ z``4SeoCR_+th@tlE95s|(}dpO_K>xH{m@wZ{P_yOzPsV>ujceqWfe9A>C4RI*anv z?t)aBKnC!9==Wr%+xI(6NG^fi2Sy(1w?QZZ{=ML-gQ99m*LsR-`5t6|`xhPp1H5~eP_MMyAnqiQmhEM%<(@fgW)`ww!uMaSV-218NI{*J(v1ChBC01OQc z0r*BHR5NzYGBz>%07*qoM6N<$f_E+w4gdfE literal 0 HcmV?d00001 diff --git a/textures/farming_parsley_1.png b/textures/farming_parsley_1.png new file mode 100644 index 0000000000000000000000000000000000000000..632928c877811053b7231567673dc784f4185110 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Vt`MGE0C_(XqU25uH=wf(GvT{ zm64q*Bv*hIj>QDMKRx0zZ$5ByCldjnBhMh)Rxs=1qy3<}%WA~E%7?@8VR4jjzA z&KAG&E#f}i2$kxPk1$qX{3H3;J?2Zb@O9T5ALdA@f-e%nB6HVGeIz->p=_$x$yb7_ ipGD?Ov~bz;h|#m3G4ovAtV2Lk89ZJ6T-G@yGywqRfJY4g literal 0 HcmV?d00001 diff --git a/textures/farming_parsley_3.png b/textures/farming_parsley_3.png new file mode 100644 index 0000000000000000000000000000000000000000..e4aacb94bd9e861ef0a2cb35241c95eec553890a GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Zh%jSE0C_)=3KGSE@h=$-EotW zLu&aObsASjR$oypT4EnLUApGH#>_jRoi8=J?^s3l-gp7jz+V#N7tHV<1w8GYw+txN z=;`7ZA~Chs&y$bYkmEB0EBmsa|BJbWSH9XP!?bM=%a39`hcDeCNfnh}7V_`;5f$ln zMEOSLOAj8XHR4CKe|g9dy!xMH1s+>_knJ z#27-13?@n%2C4yV0+ANuDOnl#T&bjB_?|a|5?}7;vCQSVA z$jhZ!W{}icWFryJh2UggZf9oIEHg-C0~P`Wv^ckt)|9$i$%5wZyF)y@}e! zk_BtqO-AqEqi4W{=J#TCy3+PWf}X!}#2{XuM7E}p>Bj{ks$15^EJpnKsYOI}%cqBR zBC1;?)Fl$?lIMdKSsSzHx#|{C-LgK3OpT)`B}mnaHUmcznF3--=mvuH*CE)f@D?v3%XIzyB(YUyi*)CjZ>VHnROhv6vBvodu_Y1A?`j#oE%!S#w`4(^ z-RZ?fK*I(K_;^mJ0ov_Q666=m@SidutUb>VXx1H17sn8b-n$dH`wlDcxFm0AakMa6 zIqSE4>G28tcf)KQ)V)NW+piS>;TD&YD<(0mKa7}I zyflT5UJ2Qq$kXWOs8xJl>Bzl@{7IbKC%o=@y!}#=59_M`-DfsWD6A^)OPD6`LPV^H zSyx#!WX9o8hQ{3w1syDZ=+kSRn_TzEV1bOzo_F?|<#rG5 ZpOZgq!@G^u%*G28U!JahF6*2UngEpu&*cCB literal 0 HcmV?d00001 diff --git a/textures/farming_vanilla_flan.png b/textures/farming_vanilla_flan.png new file mode 100644 index 0000000000000000000000000000000000000000..c8b9ff06a63d54e5208ede2b8e3d1d8a5c7a11ff GIT binary patch literal 1216 zcmWkudoWD6JZ~v=VF{JJoVxrA$zMa| zt)w!SQR$1RoMls2%&8ph$(Twto=jghkiNPjn^k|F+f=}7&UH}T+%{QeOWk6UiY=tl zk=%766%N!*7AfCCZf~W^?a3b-sbXuY(3&c;)s%Aot@LQV=2mr<+h651`cOdCdJyR@ zA`_4XZ_*$n^4&z{MWg~E^Cb0rQtM70xsn?GRGn~4x>r%eufE{i`(W=x<9^bzpD48O zCyD@~@FPz}q(zGWO{4#(DxaZR-!~OLL-N3HPlJdeXi5>Jmim3XD~RySoPm2gy`^e@oa@=WpbBIB5+b?V+SCl(ZfoZ6TyPLH#A;V|SYI z!nqQOBrPpXsZ^Ghmd3@!CAsW-qy1yrVGnmtu>1ZD*6Qmn90vhQ(b^$#ZD22vMopN6 zJ_t77F5{{?JyKRg9=zx6x|EagCQr=X&pmbxeHPwnap&WozFRNQ&L$j|3eL0C`J`b6iBYFkNi;;fvmk__~Wj!;{BkenoF-iHT0)XN&3j zHHAjgO~Q4ay;^>TGqd>l_CV{+%q1CFnR|3Io949yTI4R;$x8`PH#YX<81UMaZ8thb zcN}0CCl-kAoM^hyTV8$lk!kwtuJUTD$Z+3$-SCK^fxh7*M@~^klk5vOH7_vCw)~*! zxi7THZQGI96#XzhDJqoao%==QZExSDiqYjsjvk2=P7c!x zoKS!EVVIZr9#7B}G_YxodS)eiFZ9|M%@Qs@an3<`LS3!?F=bBqyhCYoxF(NNVM;IA zC2Cl>D)YUUTgUujf9q?(ytzxA^yHil!GeIdEfGqutfbBV)f1!RFK6;;!)~(^IorOc NkPFwHbKB8R{69GRG*18k literal 0 HcmV?d00001