From 9253d08cd441111837fef45f1e35f22d797c037f Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 6 Jan 2019 10:28:24 +0000 Subject: [PATCH 01/23] added oats, rye and rice thanks to ademants grains mod --- crops/barley.lua | 10 ++- crops/ryeoatrice.lua | 132 ++++++++++++++++++++++++++++++++ farming.conf_example | 1 + grass.lua | 5 +- init.lua | 4 +- license.txt | 5 ++ textures/farming_oat.png | Bin 0 -> 274 bytes textures/farming_oat_1.png | Bin 0 -> 114 bytes textures/farming_oat_2.png | Bin 0 -> 143 bytes textures/farming_oat_3.png | Bin 0 -> 173 bytes textures/farming_oat_4.png | Bin 0 -> 190 bytes textures/farming_oat_5.png | Bin 0 -> 219 bytes textures/farming_oat_6.png | Bin 0 -> 236 bytes textures/farming_oat_7.png | Bin 0 -> 255 bytes textures/farming_oat_8.png | Bin 0 -> 310 bytes textures/farming_oat_seed.png | Bin 0 -> 142 bytes textures/farming_rice.png | Bin 0 -> 325 bytes textures/farming_rice_1.png | Bin 0 -> 114 bytes textures/farming_rice_2.png | Bin 0 -> 143 bytes textures/farming_rice_3.png | Bin 0 -> 173 bytes textures/farming_rice_4.png | Bin 0 -> 189 bytes textures/farming_rice_5.png | Bin 0 -> 217 bytes textures/farming_rice_6.png | Bin 0 -> 245 bytes textures/farming_rice_7.png | Bin 0 -> 261 bytes textures/farming_rice_8.png | Bin 0 -> 336 bytes textures/farming_rice_bread.png | Bin 0 -> 392 bytes textures/farming_rice_flour.png | Bin 0 -> 272 bytes textures/farming_rice_seed.png | Bin 0 -> 201 bytes textures/farming_rye.png | Bin 0 -> 242 bytes textures/farming_rye_1.png | Bin 0 -> 114 bytes textures/farming_rye_2.png | Bin 0 -> 143 bytes textures/farming_rye_3.png | Bin 0 -> 173 bytes textures/farming_rye_4.png | Bin 0 -> 189 bytes textures/farming_rye_5.png | Bin 0 -> 217 bytes textures/farming_rye_6.png | Bin 0 -> 237 bytes textures/farming_rye_7.png | Bin 0 -> 254 bytes textures/farming_rye_8.png | Bin 0 -> 310 bytes textures/farming_rye_seed.png | Bin 0 -> 142 bytes 38 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 crops/ryeoatrice.lua create mode 100644 textures/farming_oat.png create mode 100644 textures/farming_oat_1.png create mode 100644 textures/farming_oat_2.png create mode 100644 textures/farming_oat_3.png create mode 100644 textures/farming_oat_4.png create mode 100644 textures/farming_oat_5.png create mode 100644 textures/farming_oat_6.png create mode 100644 textures/farming_oat_7.png create mode 100644 textures/farming_oat_8.png create mode 100644 textures/farming_oat_seed.png create mode 100644 textures/farming_rice.png create mode 100644 textures/farming_rice_1.png create mode 100644 textures/farming_rice_2.png create mode 100644 textures/farming_rice_3.png create mode 100644 textures/farming_rice_4.png create mode 100644 textures/farming_rice_5.png create mode 100644 textures/farming_rice_6.png create mode 100644 textures/farming_rice_7.png create mode 100644 textures/farming_rice_8.png create mode 100644 textures/farming_rice_bread.png create mode 100644 textures/farming_rice_flour.png create mode 100644 textures/farming_rice_seed.png create mode 100644 textures/farming_rye.png create mode 100644 textures/farming_rye_1.png create mode 100644 textures/farming_rye_2.png create mode 100644 textures/farming_rye_3.png create mode 100644 textures/farming_rye_4.png create mode 100644 textures/farming_rye_5.png create mode 100644 textures/farming_rye_6.png create mode 100644 textures/farming_rye_7.png create mode 100644 textures/farming_rye_8.png create mode 100644 textures/farming_rye_seed.png diff --git a/crops/barley.lua b/crops/barley.lua index 6f3cb97..cc5ca0f 100644 --- a/crops/barley.lua +++ b/crops/barley.lua @@ -110,5 +110,13 @@ farming.registered_plants["farming:barley"] = { seed = "farming:seed_barley", minlight = 13, maxlight = 15, - steps = 8 + steps = 7 } + +-- Fuel + +minetest.register_craft({ + type = "fuel", + recipe = "farming:barley", + burntime = 1, +}) diff --git a/crops/ryeoatrice.lua b/crops/ryeoatrice.lua new file mode 100644 index 0000000..9344201 --- /dev/null +++ b/crops/ryeoatrice.lua @@ -0,0 +1,132 @@ + +--= A nice addition from Ademant's grain mod :) + +-- Rye + +farming.register_plant("farming:rye", { + description = "Rye seed", + paramtype2 = "meshoptions", + inventory_image = "farming_rye_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"savannah"}, + groups = {flammable = 4}, + place_param2 = 3, +}) + +minetest.override_item("farming:rye", { + groups = {food_rye = 1, flammable = 4} +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flour", + recipe = { + "farming:rye", "farming:rye", "farming:rye", "farming:rye", + "farming:mortar_pestle" + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}, +}) + +-- Oats + +farming.register_plant("farming:oat", { + description = "Oat seed", + paramtype2 = "meshoptions", + inventory_image = "farming_oat_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"savannah"}, + groups = {flammable = 4}, + place_param2 = 3, +}) + +minetest.override_item("farming:oat", { + groups = {food_oats = 1, flammable = 4} +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flour", + recipe = { + "farming:oat", "farming:oat", "farming:oat", "farming:oat", + "farming:mortar_pestle" + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}, +}) + +-- Rice + +farming.register_plant("farming:rice", { + description = "Rice grains", + paramtype2 = "meshoptions", + inventory_image = "farming_rice_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"savannah"}, + groups = {flammable = 4}, + place_param2 = 3, +}) + +minetest.override_item("farming:rice", { + groups = {food_rice = 1, flammable = 4} +}) + +minetest.register_craftitem("farming:rice_bread", { + description = "Rice Bread", + inventory_image = "farming_rice_bread.png", + on_use = minetest.item_eat(5), + groups = {food_rice_bread = 1, flammable = 2}, +}) + +minetest.register_craftitem("farming:rice_flour", { + description = "Rice Flour", + inventory_image = "farming_rice_flour.png", + groups = {food_rice_flour = 1, flammable = 1}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:rice_flour", + recipe = { + "farming:rice", "farming:rice", "farming:rice", "farming:rice", + "farming:mortar_pestle" + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}, +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:rice_bread", + recipe = "farming:rice_flour" +}) + +-- Fuels + +minetest.register_craft({ + type = "fuel", + recipe = "farming:rice_bread", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:rye", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:oat", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:rice", + burntime = 1, +}) diff --git a/farming.conf_example b/farming.conf_example index f652e9c..9d1769a 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -29,6 +29,7 @@ farming.pepper = true farming.pineapple = true farming.peas = true farming.beetroot = true +farming.grains = true -- rarety of crops on map, default is 0.001 (higher number = more crops) farming.rarety = 0.002 diff --git a/grass.lua b/grass.lua index 9644254..447926f 100644 --- a/grass.lua +++ b/grass.lua @@ -8,6 +8,7 @@ for i = 4, 5 do max_items = 1, items = { {items = {'farming:seed_wheat'}, rarity = 5}, + {items = {'farming:seed_oat'},rarity = 10}, {items = {'default:grass_1'}}, } }, @@ -21,7 +22,8 @@ for i = 4, 5 do drop = { max_items = 1, items = { - {items = {'farming:seed_barley'}, rarity = 6}, + {items = {'farming:seed_barley'}, rarity = 5}, + {items = {'farming:seed_rye'},rarity = 10}, {items = {'default:dry_grass_1'}}, } }, @@ -37,6 +39,7 @@ minetest.override_item("default:junglegrass", { max_items = 1, items = { {items = {'farming:seed_cotton'}, rarity = 8}, + {items = {'farming:seed_rice'},rarity = 16}, {items = {'default:junglegrass'}}, } }, diff --git a/init.lua b/init.lua index 04fe300..09c7592 100644 --- a/init.lua +++ b/init.lua @@ -591,7 +591,7 @@ farming.registered_plants[mname .. ":" .. pname] = { minlight = def.minlight, maxlight = def.maxlight } -print(dump(farming.registered_plants[mname .. ":" .. pname])) +--print(dump(farming.registered_plants[mname .. ":" .. pname])) -- Return info return {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname} end @@ -621,6 +621,7 @@ farming.pepper = true farming.pineapple = true farming.peas = true farming.beetroot = true +farming.grains = true farming.rarety = 0.002 -- 0.006 @@ -685,6 +686,7 @@ ddoo("pineapple.lua", farming.pineapple) ddoo("peas.lua", farming.peas) ddoo("beetroot.lua", farming.beetroot) ddoo("chili.lua", farming.chili) +ddoo("ryeoatrice.lua", farming.grains) dofile(farming.path.."/food.lua") dofile(farming.path.."/mapgen.lua") diff --git a/license.txt b/license.txt index b7bb7a9..480aa8e 100644 --- a/license.txt +++ b/license.txt @@ -128,3 +128,8 @@ Created by TenPlus1 farming_rhubarb.png farming_rhubarb_pie.png farming_hemp*.png + +Created by ademant (CC-BY-3.0) + farming_rye*.png + farming_oat*.png + farming_rice*.png diff --git a/textures/farming_oat.png b/textures/farming_oat.png new file mode 100644 index 0000000000000000000000000000000000000000..e8d5c230d91c18fea294cfc0bbfc421edb99738d GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Uw}`DE0A7WZM?bJ{Qv*|vt~`6 zU*@>1%4t=d+p1NIf#RDw{eV*2+pV`xj^EkkuxDD-zFA58C%GP*<#+7Z!IMj}PtOm& zxIF&ymgZYq%N{*?V4>`z4K$IZB*+hB1HWV1-2E+MzODmU{@+_F^^>VhFk~6QtqSE8?^VV9jGHqKV QwiVjD zT~-&)`R!e6APAITED7=pW^j0RBMr#W@N{tu;gC&ESfFjda8vETfm06-95|sMaNq!2 m$_4`t2F_^=tY&QuEDVavnAYok@IMRG!{F)a=d#Wzp$P!Z`zq}K literal 0 HcmV?d00001 diff --git a/textures/farming_oat_3.png b/textures/farming_oat_3.png new file mode 100644 index 0000000000000000000000000000000000000000..5aba10868276534010d3968af97a5c9663161500 GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDU1=5oy>#khkx^9ifu5Dra zcEp@JS#jZL&dmMQJwQ3ek|4ie28U-i(tsRiPZ!4!4%y^{1$G7ul9~q&oO*EJzzGF` z0|)q0HW+X)a86@jEo*CFViOl*WuC^sF4|TyjfJ(0on4qsJ&cuAl$EuVVaa~Blhsd` R{s9`t;OXk;vd$@?2>>6vG)n*g literal 0 HcmV?d00001 diff --git a/textures/farming_oat_4.png b/textures/farming_oat_4.png new file mode 100644 index 0000000000000000000000000000000000000000..833b134818ee194a891587600a76fef8cb226a68 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa3-AeX1=7>zn9Q4Nv1*;m#tng6 zH-;YEn|$;@=B3k3mrs_i)LLZ@RKZvh}L5F?pqN0LYSqNEA}+Yn$tpij>mH~Gxd4}WOP<1Y4w+&t5)$!Ev$b07-%wsr>mdKI;Vst09>Xx7sn6|*|`T7 z3bq)CxL!QH=2wcV*8znab}txz`mi{&?ufV}&tkmeMlPeMfAE(BmU}Kw`023ZXl6&N zfQ+(Ly*AgB?#olw{y38xda(9!#?r{B89t>az8=rJbYW%sU#(uR$ILT*#qX@+3{?Tz O#^CAd=d#Wzp$P!@kyXe5 literal 0 HcmV?d00001 diff --git a/textures/farming_oat_6.png b/textures/farming_oat_6.png new file mode 100644 index 0000000000000000000000000000000000000000..847adc56bef774a97578a7b29882a1921067844e GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv5AX?b1=3SH&1bY*&1$n-Imdm? z?63`seKs$S+_N%c|HjmV>v9jRPddITa6(d^F;FRENswPKgTu2MX+Tb~r;B3Vc2j3)vk4jedq`M{Zj3oabk(3I@Rz<;Ib?}S5rJ+xK@$S(SESRr6}U~B_tL>ps; z+&@*BGa(jfGAda{eIXz0td&#mg+0-Xk6U)pOYX-Ft@)pO({*_-P2HTCd%X1g;U(Jw zA8ZPhzv{m0Y~C*O%ZFBSdEeG)%q!;jDDjA2PF~KxWp~CWpmP{JUHx3vIVCg!0H-En Ao&W#< literal 0 HcmV?d00001 diff --git a/textures/farming_oat_8.png b/textures/farming_oat_8.png new file mode 100644 index 0000000000000000000000000000000000000000..c7a5540685317e12bbdceed7ea153812d40f218a GIT binary patch literal 310 zcmV-60m=S}P)m& z8dm*l^m442g2lHeHWuTG*wq@wOlQ=Cb3(Tq&XI1XPJDUP-T9$xlov0;xj7SgWmb^- z^lKyqz5GmT4u}eRa*zlmAl{8RsNCb!7+H@3PC4JvtGpuSKgh@jbQc2&ssI2007*qo IM6N<$g28ru6aWAK literal 0 HcmV?d00001 diff --git a/textures/farming_oat_seed.png b/textures/farming_oat_seed.png new file mode 100644 index 0000000000000000000000000000000000000000..893c93c0d0b0dcdd44f9563bd532709e322fab37 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=7=^oaV;6FG=;;R+Dg~ zx9I$WPTP%UoInZ2k|4ie28U-i(tsRwPZ!4!j_Bls15A?=dED9BL?musWjK`}#1Ndr kx1xsSz$(_8J~j*tLR!q_G3`6~fm#?mUHx3vIVCg!03;(PkN^Mx literal 0 HcmV?d00001 diff --git a/textures/farming_rice.png b/textures/farming_rice.png new file mode 100644 index 0000000000000000000000000000000000000000..3d64c7e25533bf3c6770a941d11118929696800d GIT binary patch literal 325 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}MSxF;E0A8YWXYN}Yqo6JvTfV8 zJ$v@-+qdt~p+iTG965RNC@-W zpTBgTe~DWM4f DHO-t! literal 0 HcmV?d00001 diff --git a/textures/farming_rice_1.png b/textures/farming_rice_1.png new file mode 100644 index 0000000000000000000000000000000000000000..715bb2e6a5b9cfa17e24ca242018d4c9a7b36db9 GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`mYyz-Ar_~T6C_v{Cy4L_32bnE zYH#?eB%Sk5dIAt60r3fo6qf5pPM_@zHZ-~&<=oi_1dI$p)4A5p;+$#?G=#y^)z4*} HQ$iB}qR1kn literal 0 HcmV?d00001 diff --git a/textures/farming_rice_2.png b/textures/farming_rice_2.png new file mode 100644 index 0000000000000000000000000000000000000000..2662d42bc7f57b4d6b23803fecd613eb2b276c41 GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=6;?qG5~G<5uZpZ#6C6 zWi{o3Uu{RqTc8AENswPKgTu2MX+VyKr;B30O22WQ%mvv4FO#p+1DmVZD literal 0 HcmV?d00001 diff --git a/textures/farming_rice_3.png b/textures/farming_rice_3.png new file mode 100644 index 0000000000000000000000000000000000000000..fee87b216a05185646167dd51a675297d624695d GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa2=EDU1=2~Ab*opp*01yE+Z8r# zU(D)r6{|1g9AV2i43uLm3GxeOaCmkj4ajl!ba4#fkWEflU}wM}sd?bQsRsuRoKO%r zaDXpmg8>Hv=QIY^vbF{$HgPdl=4lMzopr0CX@i)c^nh literal 0 HcmV?d00001 diff --git a/textures/farming_rice_4.png b/textures/farming_rice_4.png new file mode 100644 index 0000000000000000000000000000000000000000..97b026f6c2be918dcd3b5441a69023e349a43e4c GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa3-AeX1=6W=O!DVhRIGDp-5A)t zHFU3 zU(Jv+>p=ZfN4JIk1}}oQH1sZsnUyeozX%(v)YJtRguWlhIGC%cF0XfaL(jSFV7bDA iu$A7{vorOQ*U4AQ^SXRrJKYv&FoUP7pUXO@geCxA%|e&} literal 0 HcmV?d00001 diff --git a/textures/farming_rice_5.png b/textures/farming_rice_5.png new file mode 100644 index 0000000000000000000000000000000000000000..c249851ccc34cfe343b1c8de79474da095050ba3 GIT binary patch literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv5AX?b1=5lI_OVkPllz@Br?}-V z_Agl;TD?5FepN!>w!F!^ibP0l+XkKve-^a literal 0 HcmV?d00001 diff --git a/textures/farming_rice_6.png b/textures/farming_rice_6.png new file mode 100644 index 0000000000000000000000000000000000000000..c0e7233a5d923b7691fdb37ed78fe9af60faa358 GIT binary patch literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!S%6Q7E09i@V3R)CzHo_8`Rc&N z6;Ung;`(-FO*j}nac}yhB@L5z$@0_;o@YF3wmh8^t6$a{LED7=p zW^j0RBMr#O^>lFzk&s+_u(Pp6L4TJ`-g6we6`atLYmEgT#nj44Lj2zsJVKIm!|1g#i!Sd?%bNBwsech($eQo r^{)2Et&)$;ud;UEe=hCI>i>*BibP0l+XkK1Rr7K literal 0 HcmV?d00001 diff --git a/textures/farming_rice_7.png b/textures/farming_rice_7.png new file mode 100644 index 0000000000000000000000000000000000000000..9d251ee264a45fdd9a70ea58e3b514f85d9991e0 GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Wq?nJE0B(#=a9I-DSy3x;R=_E zjgc*z6WeyAbR8`0I-WV{P|@@gWz#Pg@4dR}=-ut7AMCyO^w6#MXKsHzt-N9HA)sc) zk|4ie28U-i(tw;QPZ!4!iSX9$i$aGKcv#F`7qD!3^}l{i`PG-Jc{Uf{^nUPucYK9Z zf3d~mt3DpjXS?(2+)Py literal 0 HcmV?d00001 diff --git a/textures/farming_rice_8.png b/textures/farming_rice_8.png new file mode 100644 index 0000000000000000000000000000000000000000..41b37e03c11d74c7eb2d1ad0a43de0f9bcf54e77 GIT binary patch literal 336 zcmV-W0k8gvP)^zaIHgdu10mTOnIYQdZtQxr%!sg zP<*;TgRftMvtNX;WQ4#}hp%If$Y{aA!NbGD#l^+a($dq@)7IA3+}zyY;NZ^_uJQl? z00DGTPE!Ct=GbNc005XtL_t&-S1pVS5`r)cM4uF;6bM*RK>Tt4OS)m`blz-sH{pfe zj<4el>mhej0~^?(SF%LG(>ymfgw3$*s|Cu7jh~F#uh^!%HkJZgsMRofE=F#d8X7)x zD>i2?9l7DoDR<5XbHzL`5T?o*Nh7_CSjO8sxVgExy1Kf%ySu%;y}rJ_zrVl0z`()5!NS7A!^6YG#KgtL z#m2_Q$H&LW$jHjd%FD~k%*@Qq&CSrz(9_e?)z#J3*4Ee8*Vx$D-rnBg;^O4wgww2>+9_7?CtIC?(XjI@9*&N@bdEV^Yioc^z`-h_4fAm_xJbt z`T6_%`~Lp^|NsAY&-5Yy0004WQchC*o2$l2&4Hz1J#F mUwv8h9e%WG-+7};jPn7f1`M8hjRAuI0000)6~?|*x1%+;=;-L_>FMg~>g((4?Ck9B?(XpL z@bU5S^78WY^Yird^!4@i_V)Jo_xJet`1$$y`uh6({QUj>{r>*`|Ns9r+$stH0004W zQchCo6b8`8dnA!^QF8zPuQX=nv&}j9)!b^lq$Q0M z@rdLMY3pz+oaZ@itL$-6!3MUpbT-3f*hxt?eqoQ38z;paA~#0hl(4Mwx)nxj_~Zaz W*9DoK%SUqn0000l$(7{U>qoN$1N@36!>9-ie2I(}^L zIUTYX1&l-u3jJ~Fo#LDhXVx^#;4~EA5;IU> YW{|qV_2;$c2Q`rCp00i_>zopr0I;S>i2wiq literal 0 HcmV?d00001 diff --git a/textures/farming_rye.png b/textures/farming_rye.png new file mode 100644 index 0000000000000000000000000000000000000000..ebc5b3795d94b2a8b2ab13316e362c700fee6393 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Q-Dv1E0A8hAbaiFl^Yi4ZCqNs zWmV1g6^T37r0-mtyK`gbu3g*qY_8b5rFH-I?n684j_qwazJKzWBRv-`oV#>-$<=dn zpFe-vHo5Ew&=kg!AirP+hi5m^fSfo_7sn6@$)yJagzopr0Oa0f`Tzg` literal 0 HcmV?d00001 diff --git a/textures/farming_rye_1.png b/textures/farming_rye_1.png new file mode 100644 index 0000000000000000000000000000000000000000..932b6212a4d9232e8c6206029a74976bd5fe7bc7 GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`mYyz-Ar_~T6C_v{Cy4L_U8q)g zU~l;9Q@Pat^aLPC0^%9v3e4*|Cp$7MPfFQlw_B4L1Q@Oh^L%S_pJ5F&gu&C*&t;uc GLK6Ukl_1an literal 0 HcmV?d00001 diff --git a/textures/farming_rye_2.png b/textures/farming_rye_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b6a69b7026dd08788e09fef98dc2dc57c3a6759d GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=8{B&C7Q9)$I)L+Lbn8 zckc3&^}N4TRs$s%OM?7@862M7NCR>-JY5_^IAoI(7HAtV+*CVo;M9Wy2Tmvm95}$1 mvcZ6ZfpZ!It65tE3xnb^ruBLs{LcdQFnGH9xvXox1bv+$nOm+<|h8B|(0{3=Yq3qyah3o-U3d9J0v?3+xOSBsC8lIQ8JbffEV> z2M(~MY%t(p;GD+5YSz}k!X_@p$~=vMU9`<;8WXD-JG(HOdKfFKC@ZTe!;-0NS2D#G R`vZ+*@O1TaS?83{1ONq)G1UM7 literal 0 HcmV?d00001 diff --git a/textures/farming_rye_4.png b/textures/farming_rye_4.png new file mode 100644 index 0000000000000000000000000000000000000000..ea1246eff5cda20eadde4180ed3e9801b2f11444 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa3-AeX1=39$qPjOEOx{v7drRGd z?TxDr_HH;janJeL`!6g}(Qvo|RKZvh|zL-q3R{J6Nu; jAZ(?#_3TW&gTe~DWM4fM$kk* literal 0 HcmV?d00001 diff --git a/textures/farming_rye_5.png b/textures/farming_rye_5.png new file mode 100644 index 0000000000000000000000000000000000000000..b359673cd85630541a06c28b1d09f0a35f365eee GIT binary patch literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFv5AX?b1=5`><9pYnOk9~fbydcU z4P|pT)hyW9xMWMq`h62NADnvd?EJ$QR%E1ZS^`wcSQ6wH%;50sMjDWl;OXKR!XZ2N z;6lL`0}W#(g zwp4A{*tmIH%bo*$`}R#ZaH!|dp(%$CHCF9sod8tISQ6wH%;50sMjDV);_2cT!XcZS zpui+yU|?(@Vz9x`fYDPSxUq3|BGZJ$8yXwi)0vFbn-8(H&7C7HR3TwDCvC>bnE?lO zCOWAdmO97EX(Ox_V&wDK&*OxT$BD#(=ROe%ksBOlB`T#mH7#*y;&5gOck1F2Ftpgz gF>MRilr0Pl+k+&(S}gf~4ro7vr>mdKI;Vst0HFy~m;e9( literal 0 HcmV?d00001 diff --git a/textures/farming_rye_7.png b/textures/farming_rye_7.png new file mode 100644 index 0000000000000000000000000000000000000000..fc78198cd4a986b7f759ae3b45d555f78bf4b4b0 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHF3h)VW1=7p6B`n{Tv~E|~rrot$ zcBb##+r0Zw+rE<%_aEsxe75_@sR<{}O*wac@_IAfr$E(=B|(0{3=Yq3qyafio-U3d z9J0Cx7xEr*kZ61OeP2)%%Sn4CW&;;?hbxl>ZY+>$cPm)8O}b!FMA7R9dZsLw4}YmV z;-qsWs40D^c=@TmX00-Z+b451uTS_g@2$qJy+X}r4Q)*>s;K%%i(9rDyquQVWa=NQ zXmn)#FQ35etuH@IzZH6;^L*3S8R6%qu0MNQUb$NJcc9q3??Bfuc)I$ztaD0e0sv?a BYfb(|n zb+f2jv#DdVs&}-eR<^5hxvposrB}eQYRJBPK12)K00001bW%=J06^y0W&i*HkV!;A zR2Ww+i~$mZAP@t$fK@44#jB{;2+U5B3rCO6g|}md=Pj>Lh6Z-)ryC;Cd~O~H z&9LTQqnBgD6wJOwu`wHG#LlZ>jC4lZIR Date: Sun, 6 Jan 2019 10:30:49 +0000 Subject: [PATCH 02/23] update readme and version --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 55ddee0..28e3d0b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: +- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. - 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable - 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) - 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes From a4350abba1992a8a85c8e06b84d8477c8dfd0df8 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 6 Jan 2019 10:37:41 +0000 Subject: [PATCH 03/23] added new oatmeal recipe --- food.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/food.lua b/food.lua index f099e53..3419613 100644 --- a/food.lua +++ b/food.lua @@ -185,4 +185,14 @@ minetest.after(0, function() }, replacements = {{fluid_return, "bucket:bucket_empty"}} }) + + minetest.register_craft({ + type = "shapeless", + output = "farming:porridge", + recipe = { + "group:food_oats", "group:food_oats", "group:food_oats", + "group:food_oats", "group:food_bowl", fluid + }, + replacements = {{fluid_return, "bucket:bucket_empty"}} + }) end) From 44a238888763824485003c542d2f4a494b8a7f63 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 6 Jan 2019 10:44:41 +0000 Subject: [PATCH 04/23] updated seed chest lucky box --- lucky_block.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lucky_block.lua b/lucky_block.lua index 6f656ff..f8ad0eb 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -67,6 +67,9 @@ if minetest.get_modpath("lucky_block") then {name = "farming:seed_barley", max = 15}, {name = "farming:seed_barley", max = 15}, {name = "farming:seed_hemp", max = 15}, + {name = "farming:seed_rye", max = 15}, + {name = "farming:seed_rice", max = 15}, + {name = "farming:seed_oat", max = 15}, {name = "farming:soil_wet", max = 10}, }}, }) From f908ccf6602ddbf2c49dc799ce479aca2a5af7f0 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 8 Jan 2019 10:23:28 +0000 Subject: [PATCH 05/23] add jaffa cake --- food.lua | 22 ++++++++++++++++++++++ textures/farming_jaffa_cake.png | Bin 0 -> 185 bytes 2 files changed, 22 insertions(+) create mode 100644 textures/farming_jaffa_cake.png diff --git a/food.lua b/food.lua index 3419613..1670f1f 100644 --- a/food.lua +++ b/food.lua @@ -196,3 +196,25 @@ minetest.after(0, function() replacements = {{fluid_return, "bucket:bucket_empty"}} }) end) + +--= Jaffa Cake + +minetest.register_craftitem("farming:jaffa_cake", { + description = S("Jaffa Cake"), + inventory_image = "farming_jaffa_cake.png", + on_use = minetest.item_eat(6), +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:jaffa_cake", + recipe = { + "farming:baking_tray", "group:food_egg", "group:food_sugar", + "group:food_flour", "group:food_cocoa", "group:food_orange", + "group:food_milk" + }, + replacements = { + {"farming:baking_tray", "farming:baking_tray"}, + {"mobs:bucket_milk", "bucket:bucket_empty"} + } +}) diff --git a/textures/farming_jaffa_cake.png b/textures/farming_jaffa_cake.png new file mode 100644 index 0000000000000000000000000000000000000000..87cc0036d19e0b29691ed9e383ea87f887fcef84 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHV5AX?bO)b$?m1Xs{QH!(Y-7+a+ z?jn)XKq$$xLc^MQrST1s@L@*r8X4uZu`}cZDfxf)C zyc&06XPw5Gx3iflX8CM>D44(?+ Date: Fri, 11 Jan 2019 10:23:22 +0000 Subject: [PATCH 06/23] fix seed changes when digging grass, force start timer on seed place --- grass.lua | 6 +++--- init.lua | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/grass.lua b/grass.lua index 447926f..53ea606 100644 --- a/grass.lua +++ b/grass.lua @@ -8,7 +8,7 @@ for i = 4, 5 do max_items = 1, items = { {items = {'farming:seed_wheat'}, rarity = 5}, - {items = {'farming:seed_oat'},rarity = 10}, + {items = {'farming:seed_oat'},rarity = 5}, {items = {'default:grass_1'}}, } }, @@ -23,7 +23,7 @@ for i = 4, 5 do max_items = 1, items = { {items = {'farming:seed_barley'}, rarity = 5}, - {items = {'farming:seed_rye'},rarity = 10}, + {items = {'farming:seed_rye'},rarity = 5}, {items = {'default:dry_grass_1'}}, } }, @@ -39,7 +39,7 @@ minetest.override_item("default:junglegrass", { max_items = 1, items = { {items = {'farming:seed_cotton'}, rarity = 8}, - {items = {'farming:seed_rice'},rarity = 16}, + {items = {'farming:seed_rice'},rarity = 8}, {items = {'default:junglegrass'}}, } }, diff --git a/init.lua b/init.lua index 09c7592..6e8e9b5 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20180929", + version = "20190111", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -457,6 +457,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname) minetest.set_node(pt.above, {name = plantname, param2 = p2}) --minetest.get_node_timer(pt.above):start(1) +farming.handle_growth(pt.above)--, node) minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}) @@ -630,16 +631,14 @@ local input = io.open(farming.path.."/farming.conf", "r") if input then dofile(farming.path .. "/farming.conf") input:close() - input = nil end -- load new world-specific settings if found inside world folder local worldpath = minetest.get_worldpath() -local input = io.open(worldpath.."/farming.conf", "r") +input = io.open(worldpath.."/farming.conf", "r") if input then dofile(worldpath .. "/farming.conf") input:close() - input = nil end From f872075d9974facad5cc45a7ca125095b05a5180 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 11 Jan 2019 11:01:41 +0000 Subject: [PATCH 07/23] tweaked grains growing vars --- README.md | 2 +- crops/ryeoatrice.lua | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/README.md b/README.md index 28e3d0b..7064b61 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: -- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. +- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake. - 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable - 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) - 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes diff --git a/crops/ryeoatrice.lua b/crops/ryeoatrice.lua index 9344201..934b160 100644 --- a/crops/ryeoatrice.lua +++ b/crops/ryeoatrice.lua @@ -8,10 +8,6 @@ farming.register_plant("farming:rye", { paramtype2 = "meshoptions", inventory_image = "farming_rye_seed.png", steps = 8, - minlight = 13, - maxlight = default.LIGHT_MAX, - fertility = {"savannah"}, - groups = {flammable = 4}, place_param2 = 3, }) @@ -36,10 +32,6 @@ farming.register_plant("farming:oat", { paramtype2 = "meshoptions", inventory_image = "farming_oat_seed.png", steps = 8, - minlight = 13, - maxlight = default.LIGHT_MAX, - fertility = {"savannah"}, - groups = {flammable = 4}, place_param2 = 3, }) @@ -64,10 +56,6 @@ farming.register_plant("farming:rice", { paramtype2 = "meshoptions", inventory_image = "farming_rice_seed.png", steps = 8, - minlight = 13, - maxlight = default.LIGHT_MAX, - fertility = {"savannah"}, - groups = {flammable = 4}, place_param2 = 3, }) From 0d3faf53e7736bfd332484dc5bbc385583336ccd Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Thu, 24 Jan 2019 11:38:21 +0000 Subject: [PATCH 08/23] added multigrain flour and bread --- README.md | 2 +- crops/ryeoatrice.lua | 42 ++++++++++++++++++++++++++ init.lua | 2 +- license.txt | 6 ++++ textures/farming_bread_multigrain.png | Bin 0 -> 583 bytes textures/farming_flour_multigrain.png | Bin 0 -> 161 bytes 6 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 textures/farming_bread_multigrain.png create mode 100644 textures/farming_flour_multigrain.png diff --git a/README.md b/README.md index 7064b61..603e0c8 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: -- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake. +- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread. - 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable - 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) - 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes diff --git a/crops/ryeoatrice.lua b/crops/ryeoatrice.lua index 934b160..d064626 100644 --- a/crops/ryeoatrice.lua +++ b/crops/ryeoatrice.lua @@ -1,4 +1,6 @@ +local S = farming.intllib + --= A nice addition from Ademant's grain mod :) -- Rye @@ -93,6 +95,40 @@ minetest.register_craft({ recipe = "farming:rice_flour" }) +-- Multigrain flour + +minetest.register_craftitem("farming:flour_multigrain", { + description = S("Multigrain Flour"), + inventory_image = "farming_flour_multigrain.png", + groups = {food_flour = 1, flammable = 1}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flour_multigrain", + recipe = { + "farming:wheat", "farming:barley", "farming:oat", + "farming:rye", "farming:mortar_pestle" + }, + replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}, +}) + +-- Multigrain bread + +minetest.register_craftitem("farming:bread_multigrain", { + description = S("Multigrain Bread"), + inventory_image = "farming_bread_multigrain.png", + on_use = minetest.item_eat(7), + groups = {food_bread = 1, flammable = 2}, +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:bread_multigrain", + recipe = "farming:flour_multigrain" +}) + -- Fuels minetest.register_craft({ @@ -101,6 +137,12 @@ minetest.register_craft({ burntime = 1, }) +minetest.register_craft({ + type = "fuel", + recipe = "farming:bread_multigrain", + burntime = 1, +}) + minetest.register_craft({ type = "fuel", recipe = "farming:rye", diff --git a/init.lua b/init.lua index 6e8e9b5..98479a3 100644 --- a/init.lua +++ b/init.lua @@ -457,7 +457,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname) minetest.set_node(pt.above, {name = plantname, param2 = p2}) --minetest.get_node_timer(pt.above):start(1) -farming.handle_growth(pt.above)--, node) +--farming.handle_growth(pt.above)--, node) minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}) diff --git a/license.txt b/license.txt index 480aa8e..ce06d3c 100644 --- a/license.txt +++ b/license.txt @@ -133,3 +133,9 @@ Created by ademant (CC-BY-3.0) farming_rye*.png farming_oat*.png farming_rice*.png + +Created by PilzAdam and edited by SpaghettiToastBook (CC0): + farming_bread_multigrain.png + +Created by VanessaE and edited by SpaghettiToastBook (CC0): + farming_flour_multigrain.png diff --git a/textures/farming_bread_multigrain.png b/textures/farming_bread_multigrain.png new file mode 100644 index 0000000000000000000000000000000000000000..66dda0746056badd67fff3708c7b4a1e74799249 GIT binary patch literal 583 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GXl47~KPWLR{I{*iwB}3WK$(;xsE_ zRGig0997sHRM>nqd7=&3Gkv8Ul-Z)~fk>p#S1H<_2f_vl0+l%_u{o)*xhS)_sIt3g zaJVY5xvH?as2r%FXFk%ld;ttYc4>INnR%Qz};0aM-3(;Z=(P0mMv5Gv*K1=ZP?4i!kAd)M1M>V2div}KP{XN%Hgi!x!0GG&W02O{<;8}=w$ zo@hE8Y=^_!2Bc z5*>Mxti+S-MUpKFk$kf zNvk*_90Ec@Bu*r7iin7?bXqWFI!^G|WGGboFyt=akR{ E03*&XKL7v# literal 0 HcmV?d00001 From 5a5c896f5aa5555c76838377dc780b7e45118976 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 30 Jan 2019 09:11:05 +0000 Subject: [PATCH 09/23] add vessel group --- crops/carrot.lua | 1 + crops/pineapple.lua | 1 + crops/raspberry.lua | 1 + 3 files changed, 3 insertions(+) diff --git a/crops/carrot.lua b/crops/carrot.lua index b4baa8d..6ec1994 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -22,6 +22,7 @@ minetest.register_craftitem("farming:carrot_juice", { description = S("Carrot Juice"), inventory_image = "farming_carrot_juice.png", on_use = minetest.item_eat(4, "vessels:drinking_glass"), + groups = {vessel = 1}, }) minetest.register_craft({ diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 8a60310..f62042e 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -47,6 +47,7 @@ minetest.register_craftitem("farming:pineapple_juice", { description = S("Pineapple Juice"), inventory_image = "farming_pineapple_juice.png", on_use = minetest.item_eat(4, "vessels:drinking_glass"), + groups = {vessel = 1}, }) minetest.register_craft({ diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 4938658..979bdfb 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -17,6 +17,7 @@ minetest.register_craftitem("farming:smoothie_raspberry", { description = S("Raspberry Smoothie"), inventory_image = "farming_raspberry_smoothie.png", on_use = minetest.item_eat(2, "vessels:drinking_glass"), + groups = {vessel = 1}, }) minetest.register_craft({ From a6fe98b5c1f53554975994ca809160082c95d234 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 30 Jan 2019 13:50:39 +0000 Subject: [PATCH 10/23] license updates --- license.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/license.txt b/license.txt index ce06d3c..eba35f8 100644 --- a/license.txt +++ b/license.txt @@ -23,7 +23,7 @@ THE SOFTWARE. License of media (textures): ---------------------------- -Created by PilzAdam (License: WTFPL): +Created by PilzAdam (License: CC BY 3.0): farming_bread.png farming_soil.png farming_soil_wet.png @@ -41,7 +41,7 @@ Created by Calinou (License: CC BY-SA): farming_tool_mesehoe.png farming_tool_diamondhoe.png -Created by VanessaE (License: WTFPL): +Created by VanessaE (License: CC BY 3.0): farming_cotton_seed.png farming_wheat_seed.png farming_flour.png @@ -63,7 +63,7 @@ Created by VanessaE (License: WTFPL): farming_cotton_7.png farming_cotton_8.png -Created by Doc (License: WTFPL): +Created by Doc (License: CC BY 3.0): farming_cucumber.png farming_cucumber_1.png farming_cucumber_2.png @@ -80,7 +80,7 @@ Created by Doc (License: WTFPL): farming_raspberry_3.png farming_raspberry_4.png -Created by Gambit: +Created by Gambit (License: CC BY 3.0): default_junglegrass.png farming_carrot.png farming_carrot_1.png @@ -92,7 +92,7 @@ Created by Gambit: farming_carrot_7.png farming_carrot_8.png -Created by JoseTheCrafter and edited by TenPlus1: +Created by JoseTheCrafter and edited by TenPlus1 (CC BY 3.0): farming_tomato.png farming_tomato_1.png farming_tomato_2.png @@ -103,7 +103,7 @@ Created by JoseTheCrafter and edited by TenPlus1: farming_tomato_7.png farming_tomato_8.png -Created by GeMinecraft and edited by TenPlus1: +Created by GeMinecraft and edited by TenPlus1 (CC BY 3.0): farming_corn.png farming_corn_cob.png farming_corn_1.png @@ -115,7 +115,7 @@ Created by GeMinecraft and edited by TenPlus1: farming_corn_7.png farming_corn_8.png -Created by TenPlus1 +Created by TenPlus1 (CC BY 3.0) farming_cocoa_1.png farming_cocoa_2.png farming_cocoa_3.png From 58c236532d87a635ee42cd7f9d9574c28e65bed3 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 1 Feb 2019 15:36:41 +0000 Subject: [PATCH 11/23] added mithril scythe as special item --- README.md | 3 +- hoes.lua | 123 ++++++++++++++++++++++++++++ lucky_block.lua | 1 + textures/farming_scythe_mithril.png | Bin 0 -> 172 bytes 4 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 textures/farming_scythe_mithril.png diff --git a/README.md b/README.md index 603e0c8..8f3e671 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: +- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. - 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread. - 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable - 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) @@ -60,4 +61,4 @@ This mod works by adding your new plant to the {growing=1} group and numbering t - 0.1 - Fixed growing bug - 0.0 - Initial release -### Lucky Blocks: 38 +### Lucky Blocks: 39 diff --git a/hoes.lua b/hoes.lua index 633e6f0..6b38de2 100644 --- a/hoes.lua +++ b/hoes.lua @@ -330,3 +330,126 @@ minetest.register_craftitem("farming:hoe_bomb", { end end, }) + +-- Mithril Scythe (special item) + +minetest.register_tool("farming:scythe_mithril", { + description = S("Mithril Scythe (Right-click crop to harvest and replant)"), + inventory_image = "farming_scythe_mithril.png", + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level = 2, + groupcaps = { + fleshy = {times = {[2] = 0.65, [3] = 0.25}, uses = 150, maxlevel = 2}, + snappy = {times = {[2] = 0.70, [3] = 0.25}, uses = 150, maxlevel = 2}, + }, + damage_groups = {fleshy = 8}, + }, + sound = {breaks = "default_tool_breaks"}, + + on_place = function(itemstack, placer, pointed_thing) + + if pointed_thing.type ~= "node" then + return + end + + local pos = pointed_thing.under + local name = placer:get_player_name() + + if minetest.is_protected(pos, name) then + return + end + + local node = minetest.get_node_or_nil(pos) + + if not node then + return + end + + local def = minetest.registered_nodes[node.name] + + if not def then + return + end + + if not def.drop then + return + end + + if not def.groups + or not def.groups.plant then + return + end + + local drops = minetest.get_node_drops(node.name, "") + + if not drops + or #drops == 0 + or (#drops == 1 and drops[1] == "") then + return + end + + -- get crop name + local mname = node.name:split(":")[1] + local pname = node.name:split(":")[2] + local sname = tonumber(pname:split("_")[2]) + pname = pname:split("_")[1] + + if not sname then + return + end + + -- add dropped items + for _, dropped_item in pairs(drops) do + + local obj = minetest.add_item(pos, dropped_item) + + if obj then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 3, + z = math.random(-10, 10) / 9, + }) + end + end + + -- Run script hook + for _, callback in pairs(core.registered_on_dignodes) do + callback(pos, node.name) + end + + -- play sound + minetest.sound_play("default_grass_footstep", {pos = pos, gain = 1.0}) + + local replace = mname .. ":" .. pname .. "_1" + + if minetest.registered_nodes[replace] then + + local p2 = minetest.registered_nodes[replace].place_param2 or 1 + + minetest.set_node(pos, {name = replace, param2 = p2}) + else + minetest.set_node(pos, {name = "air"}) + end + + if not farming.is_creative(name) then + + itemstack:add_wear(65535 / 150) -- 150 uses + + return itemstack + end + end, +}) + +if minetest.get_modpath("moreores") then + + minetest.register_craft({ + output = "farming:scythe_mithril", + recipe = { + {"", "moreores:mithril_ingot", "moreores:mithril_ingot"}, + {"moreores:mithril_ingot", "", "group:stick"}, + {"", "", "group:stick"} + } + }) +end diff --git a/lucky_block.lua b/lucky_block.lua index f8ad0eb..5a69a68 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -34,6 +34,7 @@ if minetest.get_modpath("lucky_block") then {"dro", {"farming:hoe_bomb"}, 10}, {"dro", {"farming:turkish_delight"}, 5}, {"lig"}, + {"dro", {"farming:scythe_mithril"}, 1}, {"sch", "instafarm", 0, true, { {"farming:wheat_8", "farming:carrot_8"}, {"farming:cotton_8", "farming:rhubarb_3"}, diff --git a/textures/farming_scythe_mithril.png b/textures/farming_scythe_mithril.png new file mode 100644 index 0000000000000000000000000000000000000000..17c89c5a38cef3c7af0c5c4cb2449c507c1c0063 GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ%`eKeQV~#AZVR-Ov9URw z<0;(McE46j{x47gV@Z%-FoVOh8)-m}tEY=&2*>s0goJ>gpd<#yWm`mdKI;Vst0Nk1~bN~PV literal 0 HcmV?d00001 From 99a729e48837d01eb105ff0fdc4e28a7b531736c Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 1 Feb 2019 17:58:40 +0000 Subject: [PATCH 12/23] fix scythe harvest of beanpoles and grapes --- crops/beans.lua | 2 +- crops/grapes.lua | 2 +- hoes.lua | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/crops/beans.lua b/crops/beans.lua index a75030a..bd3b8ee 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -191,7 +191,7 @@ local crop_def = { selection_box = farming.select, groups = { snappy = 3, flammable = 3, not_in_creative_inventory = 1, - attached_node = 1, growing = 1 + attached_node = 1, growing = 1, plant = 1 }, sounds = default.node_sound_leaves_defaults() } diff --git a/crops/grapes.lua b/crops/grapes.lua index c341075..2b33427 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -186,7 +186,7 @@ local crop_def = { selection_box = farming.select, groups = { snappy = 3, flammable = 3, not_in_creative_inventory = 1, - attached_node = 1, growing = 1 + attached_node = 1, growing = 1, plant = 1 }, sounds = default.node_sound_leaves_defaults() } diff --git a/hoes.lua b/hoes.lua index 6b38de2..bd440a5 100644 --- a/hoes.lua +++ b/hoes.lua @@ -402,15 +402,19 @@ minetest.register_tool("farming:scythe_mithril", { -- add dropped items for _, dropped_item in pairs(drops) do - local obj = minetest.add_item(pos, dropped_item) + if dropped_item ~= "farming:trellis" + and dropped_item ~= "farming:beanpole" then - if obj then + local obj = minetest.add_item(pos, dropped_item) - obj:set_velocity({ - x = math.random(-10, 10) / 9, - y = 3, - z = math.random(-10, 10) / 9, - }) + if obj then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 3, + z = math.random(-10, 10) / 9, + }) + end end end From feab0cc9ca27623eb3fba45e96e965db2d111ff8 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 1 Feb 2019 19:36:47 +0000 Subject: [PATCH 13/23] add farming.add_to_scythe_not_drops(item) function for expansion --- api.txt | 6 ++++++ hoes.lua | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/api.txt b/api.txt index 0098624..acec5a0 100644 --- a/api.txt +++ b/api.txt @@ -56,3 +56,9 @@ growth_check = function(pos, node_name) end return true -- condition not met, skip next growth stage until next check end, + +### Scythe items that will not drop + +This is a function to add items to a list that scythes will not drop, e.g. farming:trellis or farming:beanpole. + +farming.add_to_scythe_not_drops(item_name) diff --git a/hoes.lua b/hoes.lua index bd440a5..6417582 100644 --- a/hoes.lua +++ b/hoes.lua @@ -333,6 +333,12 @@ minetest.register_craftitem("farming:hoe_bomb", { -- Mithril Scythe (special item) +farming.scythe_not_drops = {"farming:trellis", "farming:beanpole"} + +farming.add_to_scythe_not_drops = function(item) + table.insert(farming.scythe_not_drops, item) +end + minetest.register_tool("farming:scythe_mithril", { description = S("Mithril Scythe (Right-click crop to harvest and replant)"), inventory_image = "farming_scythe_mithril.png", @@ -402,8 +408,15 @@ minetest.register_tool("farming:scythe_mithril", { -- add dropped items for _, dropped_item in pairs(drops) do - if dropped_item ~= "farming:trellis" - and dropped_item ~= "farming:beanpole" then + -- dont drop items on this list + for _, not_item in pairs(farming.scythe_not_drops) do + + if dropped_item == not_item then + dropped_item = nil + end + end + + if dropped_item then local obj = minetest.add_item(pos, dropped_item) From a7694d26c75c17d8438d0b08ce6f8527a5c3f77e Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 12 Feb 2019 19:55:00 +0000 Subject: [PATCH 14/23] fix bug in scythe callbacks, thanks BuckarooBanzay --- hoes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoes.lua b/hoes.lua index 6417582..6ffa98f 100644 --- a/hoes.lua +++ b/hoes.lua @@ -433,7 +433,7 @@ minetest.register_tool("farming:scythe_mithril", { -- Run script hook for _, callback in pairs(core.registered_on_dignodes) do - callback(pos, node.name) + callback(pos, node) end -- play sound From ee993f9d61cb2ade8a10afd39254b6bdb09cf5ae Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Fri, 22 Mar 2019 17:17:25 +0000 Subject: [PATCH 15/23] 1 in 3 chance of raw potato being poisonous --- crops/potato.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crops/potato.lua b/crops/potato.lua index 1547fc0..256ce97 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -14,7 +14,16 @@ minetest.register_craftitem("farming:potato", { on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") end, - on_use = minetest.item_eat(1), +-- on_use = minetest.item_eat(1), + on_use = function(itemstack, user, pointed_thing) + if user then + if math.random(1, 3) == 1 then + return minetest.do_item_eat(-1, nil, itemstack, user, pointed_thing) + else + return minetest.do_item_eat(1, nil, itemstack, user, pointed_thing) + end + end + end, }) -- baked potato From 15087a735238a1f88d46a0798c9fda9035ba680e Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sun, 31 Mar 2019 20:33:03 +0100 Subject: [PATCH 16/23] add player to any callbacks when using mithril scythe --- hoes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoes.lua b/hoes.lua index 6ffa98f..430d0f7 100644 --- a/hoes.lua +++ b/hoes.lua @@ -433,7 +433,7 @@ minetest.register_tool("farming:scythe_mithril", { -- Run script hook for _, callback in pairs(core.registered_on_dignodes) do - callback(pos, node) + callback(pos, node, placer) end -- play sound From b860998589d728ac721e2700a7e4ee1d7db9bad7 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 2 Apr 2019 20:04:49 +0100 Subject: [PATCH 17/23] Added moreores silver and mithril hoe's with toolrank support --- hoes.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/hoes.lua b/hoes.lua index 430d0f7..ed833e5 100644 --- a/hoes.lua +++ b/hoes.lua @@ -469,4 +469,30 @@ if minetest.get_modpath("moreores") then {"", "", "group:stick"} } }) + + farming.register_hoe(":moreores:hoe_silver", { + description = S("%s Hoe"):format(S("Silver")), + inventory_image = "moreores_tool_silverhoe.png", + max_uses = 300, + material = "moreores:silver_ingot", + }) + + farming.register_hoe(":moreores:hoe_mithril", { + description = S("%s Hoe"):format(S("Mithril")), + inventory_image = "moreores_tool_mithrilhoe.png", + max_uses = 1000, + material = "moreores:mithril_ingot", + }) + + -- Toolranks support + if tr then + + minetest.override_item("moreores:hoe_silver", { + original_description = S("%s Hoe"):format(S("Silver")), + description = toolranks.create_description("Silver Hoe")}) + + minetest.override_item("moreores:hoe_mithril", { + original_description = S("%s Hoe"):format(S("Mithril")), + description = toolranks.create_description("Mithril Hoe")}) + end end From 1c8dfd0cba8e8665da90aa7d0fa5028c9ddefcee Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 2 Apr 2019 20:08:46 +0100 Subject: [PATCH 18/23] updated readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f3e671..939417d 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: -- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. +- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support. - 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread. - 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable - 1.37 - Added custom 'growth_check(pos, nodename) function for crop nodes to use (check cocoa.lua for example) - 1.36 - Added Beetroot, Beetroot Soup (6x beetroot, 1x bowl), fix register_plant() issue, add new recipes - 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. +- 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. - 1.32 - Added Pea plant (textures by Andrey01) - also added Wooden Bowl and Pea Soup crafts - 1.31 - Added Pineapple which can be found growing in savannah areas (place pineapple in crafting to obtain 5x rings to eat and a top for re-planting), also Salt which is made from cooking a bucket of water, added food groups so it's more compatible with Ruben's food mods. - 1.30 - Added Garlic, Pepper and Onions thanks to Grizzly Adam for sharing textures From 561d0d01a1d34ff0b589b190ba5bceca2cfd3fb4 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 27 Apr 2019 08:34:29 +0100 Subject: [PATCH 19/23] add spawn rate for each crop in settings --- README.md | 1 + farming.conf_example | 55 ++++++++++++++++++++++---------------------- init.lua | 46 ++++++++++++++++++------------------ mapgen.lua | 20 +++++++++------- 4 files changed, 64 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 939417d..e0a3333 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: +- 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf) - 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support. - 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread. - 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable diff --git a/farming.conf_example b/farming.conf_example index 9d1769a..a241263 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -5,31 +5,32 @@ world folder for map specific settings. --]] --- true to enable crop/food in-game and on mapgen -farming.carrot = true -farming.potato = true -farming.tomato = true -farming.cucumber = true -farming.corn = true -farming.coffee = true -farming.melon = true -farming.pumpkin = true -farming.cocoa = true -farming.raspberry = true -farming.blueberry = true -farming.rhubarb = true -farming.beans = true -farming.grapes = true -farming.barley = true -farming.chili = true -farming.hemp = true -farming.onion = true -farming.garlic = true -farming.pepper = true -farming.pineapple = true -farming.peas = true -farming.beetroot = true -farming.grains = true - --- rarety of crops on map, default is 0.001 (higher number = more crops) +-- true to enable crop/food in-game and on mapgen set spawn rarety +farming.carrot = 0.001 +farming.potato = 0.001 +farming.tomato = 0.001 +farming.cucumber = 0.001 +farming.corn = 0.001 +farming.coffee = 0.001 +farming.melon = 0.001 +farming.pumpkin = 0.001 +farming.cocoa = true -- true or false only +farming.raspberry = 0.001 +farming.blueberry = 0.001 +farming.rhubarb = 0.001 +farming.beans = 0.001 +farming.grapes = 0.001 +farming.barley = true -- true or false only +farming.chili = 0.002 +farming.hemp = 0.002 +farming.garlic = 0.001 +farming.onion = 0.001 +farming.pepper = 0.002 +farming.pineapple = 0.001 +farming.peas = 0.001 +farming.beetroot = 0.001 +farming.grains = true -- true or false only +farming.rarety = 0.002 + +-- rarety of crops on map, default is 0.002 (higher number = more crops) farming.rarety = 0.002 diff --git a/init.lua b/init.lua index 98479a3..aa7301e 100644 --- a/init.lua +++ b/init.lua @@ -7,7 +7,7 @@ farming = { mod = "redo", - version = "20190111", + version = "20190427", path = minetest.get_modpath("farming"), select = { type = "fixed", @@ -599,31 +599,31 @@ end -- default settings -farming.carrot = true -farming.potato = true -farming.tomato = true -farming.cucumber = true -farming.corn = true -farming.coffee = true -farming.melon = true -farming.pumpkin = true +farming.carrot = 0.001 +farming.potato = 0.001 +farming.tomato = 0.001 +farming.cucumber = 0.001 +farming.corn = 0.001 +farming.coffee = 0.001 +farming.melon = 0.001 +farming.pumpkin = 0.001 farming.cocoa = true -farming.raspberry = true -farming.blueberry = true -farming.rhubarb = true -farming.beans = true -farming.grapes = true +farming.raspberry = 0.001 +farming.blueberry = 0.001 +farming.rhubarb = 0.001 +farming.beans = 0.001 +farming.grapes = 0.001 farming.barley = true -farming.chili = true -farming.hemp = true -farming.garlic = true -farming.onion = true -farming.pepper = true -farming.pineapple = true -farming.peas = true -farming.beetroot = true +farming.chili = 0.002 +farming.hemp = 0.002 +farming.garlic = 0.001 +farming.onion = 0.001 +farming.pepper = 0.002 +farming.pineapple = 0.001 +farming.peas = 0.001 +farming.beetroot = 0.001 farming.grains = true -farming.rarety = 0.002 -- 0.006 +farming.rarety = 0.002 -- Load new global settings if found inside mod folder diff --git a/mapgen.lua b/mapgen.lua index 2554a15..6d8278d 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -1,18 +1,22 @@ -- decoration function -local function register_plant(name, min, max, spawnon, spawnby, num, enabled) +local function register_plant(name, min, max, spawnon, spawnby, num, rarety) - if enabled ~= true then + -- do not place on mapgen if no value given (or not true) + if not rarety then return end + -- set rarety value or default to farming.rarety if not a number + rarety = tonumber(rarety) or farming.rarety + minetest.register_decoration({ deco_type = "simple", place_on = spawnon or {"default:dirt_with_grass"}, sidelen = 16, noise_params = { offset = 0, - scale = farming.rarety, -- 0.006, + scale = rarety, spread = {x = 100, y = 100, z = 100}, seed = 329, octaves = 3, @@ -55,7 +59,7 @@ else register_plant("carrot_8", 1, 15, nil, "", -1, farming.carrot) register_plant("cucumber_4", 1, 10, nil, "", -1, farming.cucumber) register_plant("melon_8", 1, 6, {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter"}, "", -1, farming.melon) + "default:dirt_with_rainforest_litter"}, "", -1, farming.melon) register_plant("pumpkin_8", 1, 6, nil, "", -1, farming.pumpkin) end @@ -66,7 +70,7 @@ minetest.register_decoration({ sidelen = 16, noise_params = { offset = 0, - scale = farming.rarety, -- 0.06, + scale = tonumber(farming.hemp) or farming.rarety, spread = {x = 100, y = 100, z = 100}, seed = 420, octaves = 3, @@ -87,7 +91,7 @@ minetest.register_decoration({ sidelen = 16, noise_params = { offset = 0, - scale = farming.rarety, -- 0.06, + scale = tonumber(farming.chili) or farming.rarety, spread = {x = 100, y = 100, z = 100}, seed = 760, octaves = 3, @@ -108,7 +112,7 @@ minetest.register_decoration({ sidelen = 16, noise_params = { offset = 0, - scale = farming.rarety, -- 0.06, + scale = tonumber(farming.pepper) or farming.rarety, spread = {x = 100, y = 100, z = 100}, seed = 933, octaves = 3, @@ -129,7 +133,7 @@ minetest.register_decoration({ sidelen = 16, noise_params = { offset = 0, - scale = farming.rarety, -- 0.06, + scale = tonumber(farming.pineapple) or farming.rarety, spread = {x = 100, y = 100, z = 100}, seed = 917, octaves = 3, From aeb6b82fe65f910e731f93be5cd5476bea0cf82c Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 27 Apr 2019 08:47:36 +0100 Subject: [PATCH 20/23] update .conf example --- farming.conf_example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/farming.conf_example b/farming.conf_example index a241263..d108bb5 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -32,5 +32,5 @@ farming.beetroot = 0.001 farming.grains = true -- true or false only farming.rarety = 0.002 --- rarety of crops on map, default is 0.002 (higher number = more crops) +-- default rarety of crops on map (higher number = more crops) farming.rarety = 0.002 From 4ad40a0ecb7c1695c1428b7fb25bbaea2f98c7c9 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 8 May 2019 15:25:32 +0100 Subject: [PATCH 21/23] added named license for farming_barley.png --- license.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/license.txt b/license.txt index eba35f8..8584871 100644 --- a/license.txt +++ b/license.txt @@ -139,3 +139,6 @@ Created by PilzAdam and edited by SpaghettiToastBook (CC0): Created by VanessaE and edited by SpaghettiToastBook (CC0): farming_flour_multigrain.png + +Created by mDiyo (Natura), modified by TenPlus1 (License: CC BY-SA 3.0): + farming_barley.png From 7c22eea12cdcb9b895119f1e9dc11d323cb8bb94 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 8 May 2019 19:30:20 +0100 Subject: [PATCH 22/23] changed water checks, jackolantern protection added --- README.md | 1 + crops/pumpkin.lua | 4 ++++ init.lua | 2 +- soil.lua | 11 +++++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e0a3333..30e5673 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t ### Changelog: +- 1.42 - Soil needs water to be present within 3 blocks horizontally and 2 below to make wet soil, Jack 'o Lanterns now check protection. - 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf) - 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support. - 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread. diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index c362449..3960a26 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -46,6 +46,8 @@ minetest.register_node("farming:jackolantern", { groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2}, sounds = default.node_sound_wood_defaults(), on_punch = function(pos, node, puncher) + local name = puncher:get_player_name() or "" + if minetest.is_protected(pos, name) then return end node.name = "farming:jackolantern_on" minetest.swap_node(pos, node) end, @@ -69,6 +71,8 @@ minetest.register_node("farming:jackolantern_on", { sounds = default.node_sound_wood_defaults(), drop = "farming:jackolantern", on_punch = function(pos, node, puncher) + local name = puncher:get_player_name() or "" + if minetest.is_protected(pos, name) then return end node.name = "farming:jackolantern" minetest.swap_node(pos, node) end, diff --git a/init.lua b/init.lua index aa7301e..6291ddc 100644 --- a/init.lua +++ b/init.lua @@ -322,7 +322,7 @@ function farming.plant_growth_timer(pos, elapsed, node_name) end local growth - local light_pos = {x = pos.x, y = pos.y, z = pos.z} -- was y + 1 + local light_pos = {x = pos.x, y = pos.y, z = pos.z} local lambda = elapsed / STAGE_LENGTH_AVG if lambda < 0.1 then diff --git a/soil.lua b/soil.lua index 0b4844a..6e27d47 100644 --- a/soil.lua +++ b/soil.lua @@ -52,7 +52,14 @@ minetest.register_abm({ end -- check if there is water nearby and change soil accordingly - if minetest.find_node_near(pos, 3, {"group:water"}) then +-- if minetest.find_node_near(pos, 3, {"group:water"}) then + + -- check if water is within 3 nodes horizontally and 2 below + if #minetest.find_nodes_in_area( + {x = pos.x + 3, y = pos.y + 2, z = pos.z + 3}, + {x = pos.x - 3, y = pos.y , z = pos.z - 3}, + {"group:water"}) > 0 then + if node.name == "farming:soil" then minetest.set_node(pos, {name = "farming:soil_wet"}) end @@ -64,4 +71,4 @@ minetest.register_abm({ minetest.set_node(pos, {name = "default:dirt"}) end end, -}) \ No newline at end of file +}) From 6d5e74e30cc36d938a4a241aae98711f77033aef Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Wed, 8 May 2019 19:42:33 +0100 Subject: [PATCH 23/23] default minlight for crop growth is now 12 --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 6291ddc..a19c2df 100644 --- a/init.lua +++ b/init.lua @@ -329,7 +329,7 @@ function farming.plant_growth_timer(pos, elapsed, node_name) return true end - local MIN_LIGHT = minetest.registered_nodes[node_name].minlight or 13 + local MIN_LIGHT = minetest.registered_nodes[node_name].minlight or 12 local MAX_LIGHT = minetest.registered_nodes[node_name].maxlight or 15 --print ("---", MIN_LIGHT, MAX_LIGHT) @@ -497,7 +497,7 @@ farming.register_plant = function(name, def) -- Check def def.description = def.description or S("Seed") def.inventory_image = def.inventory_image or "unknown_item.png" - def.minlight = def.minlight or 13 + def.minlight = def.minlight or 12 def.maxlight = def.maxlight or 15 -- Register seed