From e3bf5f92a7d6faccce0f6e0f8569d43d20ddf897 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 15 Sep 2024 11:36:11 +0100 Subject: [PATCH 01/21] revert to old cocoa register_on_generate function, new one had memory leak --- crops/cocoa.lua | 46 ++++++++++++++++++++++++++++----- crops/cocoa_mapgen.lua | 58 ------------------------------------------ 2 files changed, 40 insertions(+), 64 deletions(-) delete mode 100644 crops/cocoa_mapgen.lua diff --git a/crops/cocoa.lua b/crops/cocoa.lua index 9f35174..db555a5 100644 --- a/crops/cocoa.lua +++ b/crops/cocoa.lua @@ -143,10 +143,44 @@ farming.registered_plants["farming:cocoa_beans"] = { steps = 4 } --- register async mapgen script +-- add random cocoa pods to jungle tree's -if minetest.register_mapgen_script then - minetest.register_mapgen_script(farming.path .. "/crops/cocoa_mapgen.lua") -else - dofile(farming.path .. "/crops/cocoa_mapgen.lua") -end +local random = math.random -- localise for speed + +minetest.register_on_generated(function(minp, maxp) + + if maxp.y < 0 then return end + + local pos, dir + local cocoa = minetest.find_nodes_in_area(minp, maxp, + {"default:jungletree", "mcl_core:jungletree"}) + + for n = 1, #cocoa do + + pos = cocoa[n] + + if minetest.find_node_near(pos, 1, + {"default:jungleleaves", "moretrees:jungletree_leaves_green", + "mcl_core:jungleleaves"}) then + + dir = random(80) + + if dir == 1 then pos.x = pos.x + 1 + elseif dir == 2 then pos.x = pos.x - 1 + elseif dir == 3 then pos.z = pos.z + 1 + elseif dir == 4 then pos.z = pos.z -1 + end + + if dir < 5 + and minetest.get_node(pos).name == "air" + and minetest.get_node_light(pos) > 12 then + +--print ("Cocoa Pod added at " .. minetest.pos_to_string(pos)) + + minetest.set_node(pos, { + name = "farming:cocoa_" .. tostring(random(4)) + }) + end + end + end +end) diff --git a/crops/cocoa_mapgen.lua b/crops/cocoa_mapgen.lua deleted file mode 100644 index f4bc191..0000000 --- a/crops/cocoa_mapgen.lua +++ /dev/null @@ -1,58 +0,0 @@ - --- Localize things for speed - -local random = math.random -local jungletree_nodes = {"default:jungletree", "mcl_core:jungletree"} -local jungletree_leaves = { - "default:jungleleaves", "moretrees:jungletree_leaves_green", "mcl_core:jungleleaves"} - --- check area to place cocoa pods near jungle trees - -local function generate(vmanip, minp, maxp) - - if maxp.y < 0 then return end - - local min, max = vmanip:get_emerged_area() - local area = VoxelArea:new({MinEdge = min, MaxEdge = max}) - local data = vmanip:get_light_data() - local cocoa = minetest.find_nodes_in_area(minp, maxp, jungletree_nodes) - - for n = 1, #cocoa do - - local pos = cocoa[n] - - if minetest.find_node_near(pos, 1, jungletree_leaves) then - - local dir = random(80) - - if dir == 1 then pos.x = pos.x + 1 - elseif dir == 2 then pos.x = pos.x - 1 - elseif dir == 3 then pos.z = pos.z + 1 - elseif dir == 4 then pos.z = pos.z -1 - end - - if dir < 5 and minetest.get_node(pos).name == "air" then - - local index = area:index(pos.x, pos.y, pos.z) - - if data[index] > 12 then -- light at pos > 12 - - minetest.set_node(pos, {name = "farming:cocoa_" .. random(4)}) ---print("Cocoa Pod added at " .. minetest.pos_to_string(pos)) - end - end - end - end -end - --- mapgen - -if minetest.save_gen_notify then -- async env (5.9+) - minetest.register_on_generated(function(vmanip, minp, maxp, blockseed) - generate(vmanip, minp, maxp) - end) -else -- main thread (5.8 and earlier) - minetest.register_on_generated(function(minp, maxp, blockseed) - generate(minetest.get_mapgen_object("voxelmanip"), minp, maxp) - end) -end From c0104b32b4195d8cc02456083e4d9081aa6273be Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 15 Sep 2024 16:51:47 +0100 Subject: [PATCH 02/21] tweak pineapple textures to be more bushlike --- textures/farming_pineapple_1.png | Bin 109 -> 112 bytes textures/farming_pineapple_2.png | Bin 120 -> 124 bytes textures/farming_pineapple_3.png | Bin 126 -> 134 bytes textures/farming_pineapple_4.png | Bin 136 -> 148 bytes textures/farming_pineapple_5.png | Bin 164 -> 151 bytes textures/farming_pineapple_6.png | Bin 201 -> 186 bytes textures/farming_pineapple_7.png | Bin 209 -> 194 bytes textures/farming_pineapple_8.png | Bin 194 -> 177 bytes 8 files changed, 0 insertions(+), 0 deletions(-) diff --git a/textures/farming_pineapple_1.png b/textures/farming_pineapple_1.png index 262eff7d827c21c07f820ce72879603a1786710e..99fdd89d337b8700efc0aa3ce29171764c6aa07c 100644 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaP3?%1DUd;wloB=)|u0T3*eW-t|4o8andmx9g zB*-tA!Qt7BG$2RR)5S4_<9c#}#1sc+pCXe6O*I8p1}+0e%Wc)I$ztaD0e F0s!D78JhqA literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;*aCb)Toc!a`p4?%C5S%&iZGT0 z`2{mLJiCzwJ|%*@QdxtTGA;cm@-paKR@S3j3^P6Eal|aXmRfBI5v~qNsyPa4_?Xf3u literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;*aCb)T$6J{{bO}L)ba)ZMHowh z{DK)Ap4~_Tsr7Vm4B@z*oFKvCz}PWUrlBQ;c|yWpW|bMU8(5N=nHf}8F*A#wV!I4f O%i!ti=d#Wzp$Pz3Umhs{ diff --git a/textures/farming_pineapple_3.png b/textures/farming_pineapple_3.png index 90464a17d4003d7fcd10d9306681a6a580995c55..7922460935f4ac5716f55e81011710945b1e3565 100644 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaP3?%1DUd;wloB=)|u0VSFqfq}?o$ND;!axpV zNswPKgTu2MX+Vy)r;B3<$Mxid1=bImCirqCM6JwboUyxs*(1x;w84VcYqdfXuYx0+ b+5!cJwH|B_Cu>duX=Cto^>bP0l+XkK1)n1@ literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;*aCb)T&F(@^^eu@Jy9qF6k#k0 z@(X5gcy=QV$WiljaSY+Oo}3_|aezljN4A0GwVc3rfe9;e7=+f=JKRxIIC$d#14HZ& W*5%-T6MI2aCH=3e``bN3{mAq<|belF{r5}E+goG23j literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;*aCb)TzN}F{bO||3GcTAiZGT0 z`2{mLJiCzws7!{@MQ6QjqLbL>KAxEp*Eal|aXmR2T49l(r9T3T8=nyF_VF=`F>RXuLD9)xZ|Ei#l ty21-7hQO0eYm7vcUN8uyB(QKXF$9~lTkVVHo(43B!PC{xWt~$(697wtCl&wz literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnH3?%tPCZz)@&H$efR|bZ3|5%;Lp$Rz#-}r!n zj3q&S!3+-1ZlnP@o}Mm_ArhC96C^SYSTddp@NP7UU|zuE#%{uvtuRIKz$+=HsZCm9 zr7d2T99C^kp}P$ljz-8X%wl1QWljj&u;4XUtEc4#g-9-jZ$~*N%7=^T0u5#GboFyt I=akR{07Azs9RL6T diff --git a/textures/farming_pineapple_6.png b/textures/farming_pineapple_6.png index 741e0e36ad70ec524883ee825eb3aaed028855e0..587bba00c8a616cdb5cca888d32425648e4a0884 100644 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;1;w{s5m4S0L>lt5XvtH#sz6dakN1 zpTz>85MxP@UoeBivm0qZPNb)cV~E7%wfz@)8yq;C9c351DPW#4hk1texA`xfdZzH( zKV8i~%dF#%eHYWaEAGhpL**Hw1mOa)z4*}Q$iB}*-k!L literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv{s5m4*VGbS|5%-xD7nd@3Da{` zz16PB0;L#Bg8YIR9G=}s19CDvT^vI+&Y$f+$lGAR!z`S@P~Fbg5W?n=`+Yv=C&oGK zH7h@TJn9#;dA_|nQ}T*9uiK(M3lrX@iW=nFTFe$LHKsy;cUHx3vIVCg!01PQa0{{R3 diff --git a/textures/farming_pineapple_7.png b/textures/farming_pineapple_7.png index 22bad23734179fbec0974e61801f43c464898048..dab2f953d73a8718957916417a4eb345599240c5 100644 GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;1;w{s5m4S0L>lt5XvtH#sz6dakN1 zpTz>85MxP@UoeBivm0qZPNJuaV~E7%sr?su8w@yHEMp(sSjar%1|!dg|30@Q7Rvvf zxW2l;(&34_pm2lmoVcp*Wh!6ZO?+^z)^=ltuHrne8#?Pw@tyv9YF7i3z$$rd%USDP owi)I;ous(a@AA!QiC@3*-p}B4+jHsL4xnWWp00i_>zopr09!CchyVZp literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv{s5m4*VGbS|5%-xD7nd@3Da{` zz16PB0;L#Bg8YIR9G=}s19A#HT^vI+&hPC%$lGAR!z>(e;NC)Jg^P>e!Oq-@RtbMw4=goa)q7U5o4BjW# zD;#|q!Ya#E+#WoOqo-eUy5!+Se9}ViHDh#zKH0ou+o{MU%w19W4QMxmr>mdKI;Vst E08h?HmH+?% diff --git a/textures/farming_pineapple_8.png b/textures/farming_pineapple_8.png index 5182c4f710f7d6ea733ca7c7e39fc06c7e682160..2c153e25fb04ab0c00ee14b58ec2f0f399039e74 100644 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaP3?%1DUd;wlJOMr-u0Yy9R;MOPZhEe&evz~^ zkk42W?_Aab8sK=aiLhD9JR$Ys07n|@hFxtAOBcKoEN#&$6DZ+nwYu8MsB`QUN2s#G p3n_-rtlYcS1Cf From 256eac1f0fbd1c96ad8bb5487fcdf1df3bf8240c Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 16 Sep 2024 08:33:29 +0100 Subject: [PATCH 03/21] tweaked pineapple textures --- textures/farming_pineapple.png | Bin 140 -> 164 bytes textures/farming_pineapple_1.png | Bin 112 -> 124 bytes textures/farming_pineapple_2.png | Bin 124 -> 141 bytes textures/farming_pineapple_3.png | Bin 134 -> 163 bytes textures/farming_pineapple_4.png | Bin 148 -> 188 bytes textures/farming_pineapple_5.png | Bin 151 -> 199 bytes textures/farming_pineapple_6.png | Bin 186 -> 226 bytes textures/farming_pineapple_7.png | Bin 194 -> 243 bytes textures/farming_pineapple_8.png | Bin 177 -> 230 bytes textures/farming_pineapple_top.png | Bin 143 -> 163 bytes 10 files changed, 0 insertions(+), 0 deletions(-) diff --git a/textures/farming_pineapple.png b/textures/farming_pineapple.png index febf22a9d82ea3f2c83f9f2fd88f4311a11c69cc..e9859746e64c147dba344a510ecc2b091e64169f 100644 GIT binary patch delta 148 zcmeBST*5d(qMn7Bfq~)e-A6${N;<$N#MO|2p(aW$Fx@aLTR$MzEI7|Fw9q)X%zS#T z>PnO1B%m_Jk|4ie28U-i(tsRuPZ!4!j_b(@4osXm0<&7z9$-9F#Myq~j1L#9z_b>Y xmb9FloCYq3R;k8@3_(6lPDZvB0-J;xFsVc^C+NK6b#QvmJK@G&X^%bC?airsnLR$(Hb}5A YTz|`VKulyMCr~GYr>mdKI;Vst0QAx(xc~qF diff --git a/textures/farming_pineapple_1.png b/textures/farming_pineapple_1.png index 99fdd89d337b8700efc0aa3ce29171764c6aa07c..7daa917647e2eff0b1ce7937b4448de4b052a334 100644 GIT binary patch delta 105 zcmXS@nIMtE!py+HAQY)^8bk&7gt#)~=L96_1!fopW*Pl38;p_)78&qol`;+ E0RD;|*8l(j delta 93 zcmb;^m>?0s#LU3JFjw+wHjv^B@Ck7R(uwOs{bO}FQrzDIIgBMie!&b5&u*jvIij8} rjv*Y^lM^JSI57JZnKWpsDX=nd888~}o?dYgsDQ!K)z4*}Q$iB}Q3n`$ diff --git a/textures/farming_pineapple_2.png b/textures/farming_pineapple_2.png index b4b60719cc92bb25b3550df32d3e13fd8844895e..6fe2a14baa105fdccb9eb500a6299f7063e705ee 100644 GIT binary patch delta 123 zcmb>FWt<>U%EHXRz#tTEak7aXC3bB2$5(^CVBY5$6Ug1r>>zQ=Be8uyJHmiS1!Z;9`iW WVv04f*?a-0gTd3)&t;ucLK6UQkR%uY delta 106 zcmeBWteGH@!o&Xcc83z~@MIBUvgPCV6-;%}H@hFSI+lY~s(XNYmtGmh38$iVjp00i_>zopr E0NZID%>V!Z diff --git a/textures/farming_pineapple_3.png b/textures/farming_pineapple_3.png index 7922460935f4ac5716f55e81011710945b1e3565..e9a625ab384e4ebcb715c23c991e3e9a5137a076 100644 GIT binary patch delta 147 zcmZo;T+BE@qMn7Bfq_9NQsFd^5)JSPam_Ev4Nle%Og9S2)(^}x4=FGTEH>3!$ZiZ& zz*rLG7tG-B>_!@pW8>-K7$R{wIYFXNLG&O`VM40whlofXr%MlPg45aB7!0~SJsV9K x)Ycq0aAwJ)M@->rD-IlZ!0^~Wt3i{2OOa*wtx1VTcz^~mc)I$ztaD0e0swmSFMt35 delta 117 zcmZ3?*v2?PB9Dogfq`MJw zd%8G=a9mGLSYZ92X@W0TLe$D^#u>XCm_4#gO&ctDy;dtU@hUj7sVz`oSnI*|aI)qk PkTwQSS3j3^P6ZJ3 zz*rLG7tG-B>_!@p6YA;W7$R{wIYHu$0^`iX$Jmk$rKL9XrArAllUrCO zC~$B{Z`g70tHB0C>m7$e4JD+F4I~;OdzzTeuo)z>skYy3j1_n=8KbLh*2~7Z^7&aFG delta 131 zcmdnPIE8V7L=6)&0|Ucc$*b8wiZj3`#1%;MmWKMr>TD5zZwBNrmIV0)GdMiEkp|>g zdb&7Wz&v zbsP8YkvV3rtHHq8)Ubgu+aiXa*}B+4B1W`%qaky%0ppCL8X5<37=*(T5>m`~wVSnt hS*#fHM3s-2G9<=wUVAU`;yutN22WQ%mvv4FO#na5Illk^ delta 134 zcmX@kIGu5VL_HHT0|Ucc$*b8wiZj3`#1%;U$LdTDO;A#7Nd3paUY=3>_k+B@BUlO??X!9L3ob=3f=mQCD~&#SnP1X^oMH i(hCNmlmr$oCWc^hcB_5S+|z*OFnGH9xvX?nNj7 delta 158 zcmV;P0Ac^)0lEQ@B!3T3OjJbx002*2EPPrXlT~1sZ6!SpIG_Lk00DGTPE!Ct=GbNc z003D@L_t&-)2)xu4S+xhLqQ#&>~I5^oCBCU_MhoOjFb;Q<*N^xHi-N`iURJ`M;kZ6 zov_b#CT!QNm%)qlo+SqMKvbb-FB=fcM{2G$Y;;LTe5YBpWfvHqTdgn#j&sWGO#lD@ M07*qoM6N<$g3o3=*8l(j diff --git a/textures/farming_pineapple_7.png b/textures/farming_pineapple_7.png index dab2f953d73a8718957916417a4eb345599240c5..5158af32d7eb48897d63ff6ed1292350d049ed79 100644 GIT binary patch delta 215 zcmV;|04V>$0rLTnB!3=IOjJbx004Yi9#Lm8R%oTpZXMV4MO57EtyAj*bo(->snmBnSd3 z4s024Jq#Qy3F&ZE3@$DV3=R;_C@HWwz=RDLm{{D>+u_QT6c`xbRxv4nDF88y8JEzK RX+i)1002ovPDHLkV1f|eOi2I$ delta 166 zcmV;X09pU@0m1>0B!3T3OjJbx002*2EPPrXlT~1sZ6!SpIG_Lk00DGTPE!Ct=GbNc z003c0L_t&-)0L0W4S+BRL^)mH*r5ZM*Z~Z%|4iB#p&$K`uX}JgK;%ae6Mz$(UV8U- zB=qi);MRRTv1lzJo=Vs(uF4L}^~$<{0uZVnD><64M7A+(&TfCjbBd diff --git a/textures/farming_pineapple_8.png b/textures/farming_pineapple_8.png index 2c153e25fb04ab0c00ee14b58ec2f0f399039e74..cc1692439a6c3894d72fe14d3bbf4ae2ad815620 100644 GIT binary patch delta 214 zcmV;{04e{m0p*000|MOjJc7004Yi9#Lm8R%}F}w^sWhz;af1M4OW!fh1bdiQCbVHQcpSyqp;GAUrw*}fWqRK z&NiIJ->H2UF#$ QW&i*H07*qoM6N<$f)`g)YybcN delta 161 zcmaFHxRG&!L_HHT0|Ucc$*b8wiYLG)#1%;U$LiEX$xY8y)i08k2J#t8g8YIR9G=}s z19E~rT^vI=t|uoXBnT!jFgl7G9F=M~^Y|XavM=`;CanH8>WQdrH?%3;+Y#Ud%u*u)@sU!-x~i&dY2<}-M@ L`njxgN@xNA2;Vl^ diff --git a/textures/farming_pineapple_top.png b/textures/farming_pineapple_top.png index f653d83fd449934badaf052de2833be0c4fe4590..29a8b81982055c6354da543557ac193c551205f2 100644 GIT binary patch delta 134 zcmeBYT+BE@rCu(;C&ZP3fuSZ!E->9NEL%Sy*DN^CFtpG(xXgTduIla`JQo~~2?A9x zmIV0)GdMiEkp|=#d%8G=a9mGLP!Lqv;Fuw{jftJ(w5p7gv9YFzLxhl!z^siMH!_}? lFvqf3$;BlgfMNYdhPYj9!k;V-^a8arc)I$ztaD0e0syzVDc1l1 delta 114 zcmZ3?*v~jYC7VCMC&V?iMAtu7rzT2ndamm39Xv^Gw?8s4Fff(``2{mLJiCzw Date: Tue, 17 Sep 2024 12:50:46 +0100 Subject: [PATCH 04/21] tweak pineapple final stage and items --- textures/farming_pineapple.png | Bin 164 -> 164 bytes textures/farming_pineapple_8.png | Bin 230 -> 231 bytes textures/farming_pineapple_top.png | Bin 163 -> 166 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/textures/farming_pineapple.png b/textures/farming_pineapple.png index e9859746e64c147dba344a510ecc2b091e64169f..c2d2ceb13eff267835945cba58395d71235b3c6b 100644 GIT binary patch delta 130 zcmZ3&xP)Y}b_N>3;OXk;vd$@?2>?O7Cv^Y- diff --git a/textures/farming_pineapple_8.png b/textures/farming_pineapple_8.png index cc1692439a6c3894d72fe14d3bbf4ae2ad815620..006a54ef059ce166855b7afa854717ebd21e28f1 100644 GIT binary patch delta 198 zcmV;%06G8W0p|gbDSt5l08wW#R%aAkr53=D9q7zMx-06L=@RM6~}P5=M^07*qoM6N<$f}iz6 A=>Px# delta 197 zcmV;$06PEY0pZc)lP;O(kLL)?0XqGdbyY%~DBQsx;K5P=pFPa|e#00000NkvXXu0mjf5o}QP diff --git a/textures/farming_pineapple_top.png b/textures/farming_pineapple_top.png index 29a8b81982055c6354da543557ac193c551205f2..78e3f36ae0cf4997a50402ca0f49df71d36d7cdc 100644 GIT binary patch delta 114 zcmV-&0FD2n0j2?vBq||LOjJbx002>EF;;6YP;E9-ZZTDHGgEdqkZB^Xe=YaMD*xeX znoChTkxLsr1h7JAX4V7)2+P@B1{3l) Rz>NR^002ovPDHLkV1kktBiR4| From d59efa22d7907184177ea54f9e4977d2be0f262e Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 19 Sep 2024 07:48:44 +0100 Subject: [PATCH 05/21] new burger texture --- crops/cocoa.lua | 2 +- textures/farming_burger.png | Bin 288 -> 375 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/crops/cocoa.lua b/crops/cocoa.lua index db555a5..ee1cfce 100644 --- a/crops/cocoa.lua +++ b/crops/cocoa.lua @@ -168,7 +168,7 @@ minetest.register_on_generated(function(minp, maxp) if dir == 1 then pos.x = pos.x + 1 elseif dir == 2 then pos.x = pos.x - 1 elseif dir == 3 then pos.z = pos.z + 1 - elseif dir == 4 then pos.z = pos.z -1 + elseif dir == 4 then pos.z = pos.z - 1 end if dir < 5 diff --git a/textures/farming_burger.png b/textures/farming_burger.png index 59bc3405b39f95ba8fef76a62bb88cb1c2f0fcfb..652f36a32cbc263eba5c688645ea10d5e0487d8b 100644 GIT binary patch delta 348 zcmV-i0i*t)0`~%tB!7WWOjJbx03d!S0$e&Hlr#WxNG*3vF?&)ld{r!qS1pQIIGJBO zpJqIM89<$y?9E@dJ@HZCCYmqft4D?g#de+7}JL;)RF+=jx(IGCGVIv?wUaI zr2z7)Y_P{D@UwUK$DjPqtpC(!{?&s2+G+gOxBuIr-tnR1`+uVU_v!!t{~Fnj@c;k- z0d!JMQvg8b*k%9#0HjGoK~xyiZI9g&f*=q^snik|@RyK{jKVPA{{aKFt~@h)@tyf* zXP1y&ls3-Ve=Lh{MZ{<4@=S4i7upX%PV0c|QfTSSp88 z)A?qi-PFZ=OjYx=>F=2rj0(Dntm)5rQBX#sAW4#?kX?W>wykK}Ya8a~oYqkQa9#zZ u($6Re=e({fDJ9~2y&dYZ4hSLk9{&Ozz7AW{$QGgi0000<0-yqrB!5d#OjJcN003_!08TU@WC zL{JeJ2vLRlfarT7JzpuQwdTJbOC;0000< KMNUMnLSTYi<8#aa From a23866a4878d5a45f00aa461effe1efffb0d0ea0 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 19 Sep 2024 09:06:13 +0100 Subject: [PATCH 06/21] dont register decoration if ethereal active --- crops/artichoke.lua | 4 +++- crops/asparagus.lua | 2 ++ crops/beans.lua | 2 ++ crops/beetroot.lua | 2 ++ crops/blackberry.lua | 2 ++ crops/blueberry.lua | 2 ++ crops/cabbage.lua | 2 ++ crops/carrot.lua | 2 ++ crops/chili.lua | 4 +++- crops/coffee.lua | 2 ++ crops/corn.lua | 2 ++ crops/cotton.lua | 3 ++- crops/cucumber.lua | 2 ++ crops/eggplant.lua | 2 ++ crops/garlic.lua | 2 ++ crops/ginger.lua | 2 ++ crops/grapes.lua | 2 ++ crops/hemp.lua | 2 ++ crops/lettuce.lua | 2 ++ crops/melon.lua | 2 ++ crops/mint.lua | 2 ++ crops/onion.lua | 2 ++ crops/parsley.lua | 2 ++ crops/peas.lua | 2 ++ crops/pepper.lua | 2 ++ crops/pineapple.lua | 4 +++- crops/potato.lua | 2 ++ crops/pumpkin.lua | 2 ++ crops/raspberry.lua | 2 ++ crops/rhubarb.lua | 2 ++ crops/soy.lua | 2 ++ crops/spinach.lua | 2 ++ crops/strawberry.lua | 2 ++ crops/sunflower.lua | 2 ++ crops/tomato.lua | 2 ++ crops/vanilla.lua | 2 ++ init.lua | 3 ++- 37 files changed, 77 insertions(+), 5 deletions(-) diff --git a/crops/artichoke.lua b/crops/artichoke.lua index 6a986aa..cbfef90 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -82,6 +82,7 @@ farming.registered_plants["farming:artichoke"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -96,7 +97,8 @@ minetest.register_decoration({ }, y_min = 1, y_max = 13, - decoration = {"farming:artichoke_5"}, + decoration = "farming:artichoke_5", spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/asparagus.lua b/crops/asparagus.lua index 5cd4d02..ca2d89d 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -89,6 +89,7 @@ farming.registered_plants["farming:asparagus"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ name = "farming:asparagus_5", deco_type = "simple", @@ -107,3 +108,4 @@ minetest.register_decoration({ decoration = "farming:asparagus_5", param2 = 3 }) +end diff --git a/crops/beans.lua b/crops/beans.lua index 22ca1bd..6954b02 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -235,6 +235,7 @@ minetest.register_node("farming:beanbush", { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -251,3 +252,4 @@ minetest.register_decoration({ y_max = 38, decoration = "farming:beanbush" }) +end diff --git a/crops/beetroot.lua b/crops/beetroot.lua index 149b978..9c2d88c 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -85,6 +85,7 @@ farming.registered_plants["farming:beetroot"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -101,3 +102,4 @@ minetest.register_decoration({ y_max = 20, decoration = "farming:beetroot_5" }) +end diff --git a/crops/blackberry.lua b/crops/blackberry.lua index 2d308ac..5de92ea 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -80,6 +80,7 @@ farming.registered_plants["farming:blackberry"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -96,3 +97,4 @@ minetest.register_decoration({ y_max = 20, decoration = "farming:blackberry_4" }) +end diff --git a/crops/blueberry.lua b/crops/blueberry.lua index 85bbeeb..e5d6266 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -79,6 +79,7 @@ farming.registered_plants["farming:blueberries"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -95,3 +96,4 @@ minetest.register_decoration({ y_max = 15, decoration = "farming:blueberry_4" }) +end diff --git a/crops/cabbage.lua b/crops/cabbage.lua index c72c43f..1d3cb38 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -87,6 +87,7 @@ farming.registered_plants["farming:cabbage"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -103,3 +104,4 @@ minetest.register_decoration({ y_max = 15, decoration = "farming:cabbage_6" }) +end diff --git a/crops/carrot.lua b/crops/carrot.lua index 26f69c9..b07fe39 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -115,6 +115,7 @@ def = { num = mg and 1 or -1, } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -133,3 +134,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/chili.lua b/crops/chili.lua index 00ae994..8ec7c4f 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -98,6 +98,7 @@ farming.registered_plants["farming:chili_pepper"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { @@ -115,7 +116,8 @@ minetest.register_decoration({ }, y_min = 5, y_max = 35, - decoration = {"farming:chili_8"}, + decoration = "farming:chili_8", spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/coffee.lua b/crops/coffee.lua index e1f254b..d45c97f 100644 --- a/crops/coffee.lua +++ b/crops/coffee.lua @@ -89,6 +89,7 @@ def = { "mcl_core:dirt_with_grass"} } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.spawn_on, @@ -105,3 +106,4 @@ minetest.register_decoration({ y_max = def.y_max, decoration = "farming:coffee_5" }) +end diff --git a/crops/corn.lua b/crops/corn.lua index b56d9c8..8ee6936 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -111,6 +111,7 @@ farming.registered_plants["farming:corn"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -127,3 +128,4 @@ minetest.register_decoration({ y_max = 25, decoration = "farming:corn_7" }) +end diff --git a/crops/cotton.lua b/crops/cotton.lua index bc1d142..fe51ddd 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -180,6 +180,7 @@ def = { biome = mg and {"jungle"} or {"savanna"} } +if not farming.eth then minetest.register_decoration({ name = "farming:cotton_wild", deco_type = "simple", @@ -198,7 +199,7 @@ minetest.register_decoration({ y_min = 1, decoration = "farming:cotton_wild" }) - +end --[[ Cotton using api farming.register_plant("farming:cotton", { diff --git a/crops/cucumber.lua b/crops/cucumber.lua index 66d3867..884c410 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -87,6 +87,7 @@ def = { num = mg and 1 or -1, } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -105,3 +106,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/eggplant.lua b/crops/eggplant.lua index 941e6ee..b852a31 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -84,6 +84,7 @@ farming.registered_plants["farming:eggplant"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -102,3 +103,4 @@ minetest.register_decoration({ decoration = "farming:eggplant_4", param2 = 3 }) +end diff --git a/crops/garlic.lua b/crops/garlic.lua index 51cd03c..6d2c23a 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -82,6 +82,7 @@ farming.registered_plants["farming:garlic"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -100,3 +101,4 @@ minetest.register_decoration({ spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/ginger.lua b/crops/ginger.lua index 103f1e0..d6e6fca 100644 --- a/crops/ginger.lua +++ b/crops/ginger.lua @@ -83,6 +83,7 @@ farming.registered_plants["farming:ginger"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ name = "farming:ginger_4", deco_type = "simple", @@ -101,3 +102,4 @@ minetest.register_decoration({ decoration = "farming:ginger_3", param2 = 3 }) +end diff --git a/crops/grapes.lua b/crops/grapes.lua index 6e0fd6d..5aba1d4 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -248,6 +248,7 @@ minetest.register_node("farming:grapebush", { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -264,3 +265,4 @@ minetest.register_decoration({ y_max = 50, decoration = "farming:grapebush" }) +end diff --git a/crops/hemp.lua b/crops/hemp.lua index 4bb595b..42f5b65 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -136,6 +136,7 @@ farming.registered_plants["farming:hemp"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { @@ -157,3 +158,4 @@ minetest.register_decoration({ spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/lettuce.lua b/crops/lettuce.lua index a950d0f..986d5a4 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -81,6 +81,7 @@ farming.registered_plants["farming:lettuce"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -97,3 +98,4 @@ minetest.register_decoration({ y_max = 35, decoration = "farming:lettuce_5" }) +end diff --git a/crops/melon.lua b/crops/melon.lua index b123eb0..87f04f3 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -115,6 +115,7 @@ def = { num = mg and 1 or -1, } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.spawn_on, @@ -133,3 +134,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/mint.lua b/crops/mint.lua index 9894e7e..8d9a66c 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -101,6 +101,7 @@ farming.registered_plants["farming:mint"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { @@ -122,3 +123,4 @@ minetest.register_decoration({ spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) +end diff --git a/crops/onion.lua b/crops/onion.lua index 1c56b4f..8b445d0 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -94,6 +94,7 @@ farming.registered_plants["farming:onion"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -110,3 +111,4 @@ minetest.register_decoration({ y_max = 28, decoration = "farming:onion_5" }) +end diff --git a/crops/parsley.lua b/crops/parsley.lua index 4be7ab9..167377b 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -73,6 +73,7 @@ farming.registered_plants["farming:parsley"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -89,3 +90,4 @@ minetest.register_decoration({ y_max = 40, decoration = "farming:parsley_3" }) +end diff --git a/crops/peas.lua b/crops/peas.lua index 467d08e..f569abe 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -92,6 +92,7 @@ farming.registered_plants["farming:pea_pod"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -108,3 +109,4 @@ minetest.register_decoration({ y_max = 55, decoration = "farming:pea_5" }) +end diff --git a/crops/pepper.lua b/crops/pepper.lua index 2147929..41a3d61 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -159,6 +159,7 @@ def = { "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"} } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.grow_on, @@ -177,3 +178,4 @@ minetest.register_decoration({ spawn_by = "group:tree", num_spawn_by = 1 }) +end diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 3f18eed..2b61f02 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -126,6 +126,7 @@ def = { num = mg and 1 or -1 } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.grow_on, @@ -140,7 +141,8 @@ minetest.register_decoration({ }, y_min = 11, y_max = 30, - decoration = {"farming:pineapple_8"}, + decoration = "farming:pineapple_8", spawn_by = def.grow_near, num_spawn_by = def.num }) +end diff --git a/crops/potato.lua b/crops/potato.lua index 1f76493..2429bc8 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -100,6 +100,7 @@ farming.registered_plants["farming:potato"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -116,3 +117,4 @@ minetest.register_decoration({ y_max = 40, decoration = "farming:potato_3" }) +end diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index de3fe08..6f9f78f 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -116,6 +116,7 @@ def = { num = mg and 1 or -1, } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -134,3 +135,4 @@ minetest.register_decoration({ spawn_by = def.near, num_spawn_by = def.num }) +end diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 210225d..268512e 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -80,6 +80,7 @@ farming.registered_plants["farming:raspberries"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -96,3 +97,4 @@ minetest.register_decoration({ y_max = 15, decoration = "farming:raspberry_4" }) +end diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index 15ff9df..ae357d8 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -85,6 +85,7 @@ farming.registered_plants["farming:rhubarb"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -101,3 +102,4 @@ minetest.register_decoration({ y_max = 20, decoration = "farming:rhubarb_3" }) +end diff --git a/crops/soy.lua b/crops/soy.lua index 78e9390..2745481 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -118,6 +118,7 @@ def = { "mcl_core:dirt_with_grass"} } +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = def.spawn_on, @@ -134,3 +135,4 @@ minetest.register_decoration({ y_max = 50, decoration = "farming:soy_6" }) +end diff --git a/crops/spinach.lua b/crops/spinach.lua index e84f976..a6a3373 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -84,6 +84,7 @@ farming.registered_plants["farming:spinach"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -102,3 +103,4 @@ minetest.register_decoration({ decoration = "farming:spinach_4", param2 = 3 }) +end diff --git a/crops/strawberry.lua b/crops/strawberry.lua index 9d49485..572964a 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -112,6 +112,7 @@ farming.registered_plants["ethereal:strawberry"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -128,3 +129,4 @@ minetest.register_decoration({ y_max = 55, decoration = "ethereal:strawberry_7" }) +end diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 9738d5e..0f218e8 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -130,6 +130,7 @@ farming.registered_plants["farming:sunflower"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -146,3 +147,4 @@ minetest.register_decoration({ y_max = 40, decoration = "farming:sunflower_8" }) +end diff --git a/crops/tomato.lua b/crops/tomato.lua index b97246c..23b4457 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -109,6 +109,7 @@ farming.registered_plants["farming:tomato"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -125,3 +126,4 @@ minetest.register_decoration({ y_max = 25, decoration = "farming:tomato_7" }) +end diff --git a/crops/vanilla.lua b/crops/vanilla.lua index 307cd46..bc11b9d 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -107,6 +107,7 @@ farming.registered_plants["farming:vanilla"] = { -- mapgen +if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -123,3 +124,4 @@ minetest.register_decoration({ y_max = 35, decoration = "farming:vanilla_7" }) +end diff --git a/init.lua b/init.lua index a562edc..100ec51 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,7 @@ local S = minetest.get_translator("farming") farming = { mod = "redo", - version = "20240912", + version = "20240919", path = minetest.get_modpath("farming"), select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}}, select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}}, @@ -21,6 +21,7 @@ farming = { mapgen = minetest.get_mapgen_setting("mg_name"), use_utensils = minetest.settings:get_bool("farming_use_utensils") ~= false, mtg = minetest.get_modpath("default"), + eth = minetest.get_modpath("ethereal"), mcl = minetest.get_modpath("mcl_core"), mcl_hardness = 0.01, translate = S From 9d471bf6d8e11f214cce1e22d3aee44d551c8e59 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 21 Sep 2024 13:00:05 +0100 Subject: [PATCH 07/21] 16px burger --- textures/farming_burger.png | Bin 375 -> 371 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/textures/farming_burger.png b/textures/farming_burger.png index 652f36a32cbc263eba5c688645ea10d5e0487d8b..94e38fcb05af8e3c699188a6e0cde6a53f65cd54 100644 GIT binary patch delta 334 zcmV-U0kQt~0`mfpE`I=AIwO=c0CPw!cT6#SQ80W}EQ?nyi�EU_7yE8?A3e!gwOS zcuLE963coXft4A0n+?T=1k{Hq)RF+>jx?FEB=4Cv@R~pJr2z7!T=A)7u*WF&u5t9V zc=fo1`N5U?%&Gs+dH>U9|JiB(+o9d@p#J8<|Lxo2`=Wv+$bYE-0004WQchCNkl6snVfJxysI_K74681I>!z0cC(fANz!ti-ycaTkx5t`U!- zyE_e>0f!|}*+(5K0AP>AJob0Fz1#91k2?Pu8? gMJ*DX^R18n0JQ-PlAxc?VgLXD07*qoM6N<$f)Nd&D*ylh delta 338 zcmV-Y0j>V?0`~%tE`I`CIwO=c0CGqzcT6#RQZRf~EQ?nyidZaq?9A@&~s0v)~%ThquEq5uE@07*qoM6N<$g2ZB^ga7~l From 2b31a87a32faf863b61a76126a14d24f8c44e7ab Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 24 Sep 2024 12:31:06 +0100 Subject: [PATCH 08/21] crop deco with ethereal added. --- crops/artichoke.lua | 16 ++++++++------ crops/asparagus.lua | 5 +---- crops/beans.lua | 5 +---- crops/beetroot.lua | 13 ++++++----- crops/blackberry.lua | 9 ++++---- crops/blueberry.lua | 9 ++++---- crops/cabbage.lua | 5 +---- crops/carrot.lua | 21 +++++------------- crops/chili.lua | 10 +++------ crops/coffee.lua | 22 +++++++++---------- crops/corn.lua | 9 ++++---- crops/cotton.lua | 29 +++++++++++-------------- crops/cucumber.lua | 19 +++++------------ crops/eggplant.lua | 8 ++----- crops/garlic.lua | 13 ++++++----- crops/ginger.lua | 10 ++++----- crops/grapes.lua | 9 ++++---- crops/hemp.lua | 10 +++------ crops/lettuce.lua | 9 ++++---- crops/melon.lua | 23 ++++++-------------- crops/mint.lua | 10 +++------ crops/onion.lua | 9 ++++---- crops/parsley.lua | 10 ++++----- crops/peas.lua | 9 ++++---- crops/pepper.lua | 20 ++++++----------- crops/pineapple.lua | 25 +++++++++------------- crops/potato.lua | 10 ++++----- crops/pumpkin.lua | 21 ++++++------------ crops/raspberry.lua | 9 ++++---- crops/rhubarb.lua | 9 ++++---- crops/soy.lua | 21 ++++++------------ crops/spinach.lua | 6 +----- crops/strawberry.lua | 9 ++++---- crops/sunflower.lua | 9 ++++---- crops/tomato.lua | 9 ++++---- crops/vanilla.lua | 9 ++++---- farming.conf_example | 49 +++++++++++++++++++++--------------------- init.lua | 51 ++++++++++++++++++++++---------------------- 38 files changed, 224 insertions(+), 325 deletions(-) diff --git a/crops/artichoke.lua b/crops/artichoke.lua index cbfef90..bec1e49 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -82,10 +82,15 @@ farming.registered_plants["farming:artichoke"] = { -- mapgen -if not farming.eth then +local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"} + +if farming.eth then + spawn_on = {"ethereal:grove_dirt"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -95,10 +100,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 13, + y_min = 1, y_max = 13, decoration = "farming:artichoke_5", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/asparagus.lua b/crops/asparagus.lua index ca2d89d..c881440 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -89,7 +89,6 @@ farming.registered_plants["farming:asparagus"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ name = "farming:asparagus_5", deco_type = "simple", @@ -103,9 +102,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 8, - y_max = 32, + y_min = 8, y_max = 32, decoration = "farming:asparagus_5", param2 = 3 }) -end diff --git a/crops/beans.lua b/crops/beans.lua index 6954b02..0ebba69 100644 --- a/crops/beans.lua +++ b/crops/beans.lua @@ -235,7 +235,6 @@ minetest.register_node("farming:beanbush", { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -248,8 +247,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 18, - y_max = 38, + y_min = 18, y_max = 38, decoration = "farming:beanbush" }) -end diff --git a/crops/beetroot.lua b/crops/beetroot.lua index 9c2d88c..179e796 100644 --- a/crops/beetroot.lua +++ b/crops/beetroot.lua @@ -85,10 +85,15 @@ farming.registered_plants["farming:beetroot"] = { -- mapgen -if not farming.eth then +local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"} + +if farming.eth then + spawn_on = {"ethereal:prairie_dirt"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -98,8 +103,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 20, + y_min = 1, y_max = 20, decoration = "farming:beetroot_5" }) -end diff --git a/crops/blackberry.lua b/crops/blackberry.lua index 5de92ea..d21c3ba 100644 --- a/crops/blackberry.lua +++ b/crops/blackberry.lua @@ -80,10 +80,11 @@ farming.registered_plants["farming:blackberry"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -93,8 +94,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 20, + y_min = 3, y_max = 20, decoration = "farming:blackberry_4" }) -end diff --git a/crops/blueberry.lua b/crops/blueberry.lua index e5d6266..f4f3b3a 100644 --- a/crops/blueberry.lua +++ b/crops/blueberry.lua @@ -79,10 +79,11 @@ farming.registered_plants["farming:blueberries"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -92,8 +93,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 15, + y_min = 3, y_max = 15, decoration = "farming:blueberry_4" }) -end diff --git a/crops/cabbage.lua b/crops/cabbage.lua index 1d3cb38..b42eda7 100644 --- a/crops/cabbage.lua +++ b/crops/cabbage.lua @@ -87,7 +87,6 @@ farming.registered_plants["farming:cabbage"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -100,8 +99,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 2, - y_max = 15, + y_min = 2, y_max = 15, decoration = "farming:cabbage_6" }) -end diff --git a/crops/carrot.lua b/crops/carrot.lua index b07fe39..41911a2 100644 --- a/crops/carrot.lua +++ b/crops/carrot.lua @@ -107,18 +107,11 @@ farming.registered_plants["farming:carrot"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 30 or 20, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -128,10 +121,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, - decoration = "farming:carrot_8", - spawn_by = def.near, - num_spawn_by = def.num + y_min = 1, y_max = 30, + decoration = "farming:carrot_7" }) -end diff --git a/crops/chili.lua b/crops/chili.lua index 8ec7c4f..98ad043 100644 --- a/crops/chili.lua +++ b/crops/chili.lua @@ -98,12 +98,11 @@ farming.registered_plants["farming:chili_pepper"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_rainforest_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" }, sidelen = 16, noise_params = { @@ -114,10 +113,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 45, decoration = "farming:chili_8", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/coffee.lua b/crops/coffee.lua index d45c97f..6b9f024 100644 --- a/crops/coffee.lua +++ b/crops/coffee.lua @@ -80,19 +80,19 @@ farming.registered_plants["farming:coffee"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 50 or 55, - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"} +local spawn_on = { + "default:dirt_with_dry_grass", "default:dirt_with_rainforest_litter", + "default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass", + "ethereal:prairie_dirt" } -if not farming.eth then +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -102,8 +102,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = def.y_max, + y_min = 20, y_max = 55, decoration = "farming:coffee_5" }) -end diff --git a/crops/corn.lua b/crops/corn.lua index 8ee6936..7dcbbb2 100644 --- a/crops/corn.lua +++ b/crops/corn.lua @@ -111,10 +111,11 @@ farming.registered_plants["farming:corn"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -124,8 +125,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 12, - y_max = 25, + y_min = 12, y_max = 27, decoration = "farming:corn_7" }) -end diff --git a/crops/cotton.lua b/crops/cotton.lua index fe51ddd..1dc2ae4 100644 --- a/crops/cotton.lua +++ b/crops/cotton.lua @@ -172,34 +172,31 @@ minetest.register_node("farming:cotton_wild", { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or {"default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"}, - biome = mg and {"jungle"} or {"savanna"} +local spawn_on = { + "default:dry_dirt_with_dry_grass", "default:dirt_with_dry_grass", + "mcl_core:dirt_with_grass" } -if not farming.eth then +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ name = "farming:cotton_wild", deco_type = "simple", - place_on = def.grow_on, + place_on = spawn_on, sidelen = 16, noise_params = { - offset = -0.1, - scale = 0.1, - spread = {x = 50, y = 50, z = 50}, + offset = 0, + scale = farming.cotton, + spread = {x = 100, y = 100, z = 100}, seed = 4242, octaves = 3, - persist = 0.7 + persist = 0.6 }, - biomes = def.biome, - y_max = 31000, - y_min = 1, + y_min = 1, y_max = 120, decoration = "farming:cotton_wild" }) -end --[[ Cotton using api farming.register_plant("farming:cotton", { diff --git a/crops/cucumber.lua b/crops/cucumber.lua index 884c410..871eb43 100644 --- a/crops/cucumber.lua +++ b/crops/cucumber.lua @@ -80,17 +80,11 @@ farming.registered_plants["farming:cucumber"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -100,10 +94,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = 20, + y_min = 1, y_max = 20, decoration = "farming:cucumber_4", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) -end diff --git a/crops/eggplant.lua b/crops/eggplant.lua index b852a31..0dd26bb 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -84,7 +84,6 @@ farming.registered_plants["farming:eggplant"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -97,10 +96,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - biomes = {"deciduous_forest"}, - y_max = 31000, - y_min = 1, - decoration = "farming:eggplant_4", + y_min = 1, y_max = 40, + decoration = "farming:eggplant_3", param2 = 3 }) -end diff --git a/crops/garlic.lua b/crops/garlic.lua index 6d2c23a..350e1f0 100644 --- a/crops/garlic.lua +++ b/crops/garlic.lua @@ -82,10 +82,12 @@ farming.registered_plants["farming:garlic"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt", + "default:dirt_with_rainforest_litter" + }, sidelen = 16, noise_params = { offset = 0, @@ -95,10 +97,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 35, + y_min = 3, y_max = 45, decoration = "farming:garlic_5", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/ginger.lua b/crops/ginger.lua index d6e6fca..7bc6ff5 100644 --- a/crops/ginger.lua +++ b/crops/ginger.lua @@ -83,11 +83,13 @@ farming.registered_plants["farming:ginger"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ name = "farming:ginger_4", deco_type = "simple", - place_on = {"default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass", + "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -97,9 +99,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_max = 80, - y_min = 1, + y_min = 1, y_max = 80, decoration = "farming:ginger_3", param2 = 3 }) -end diff --git a/crops/grapes.lua b/crops/grapes.lua index 5aba1d4..55104d7 100644 --- a/crops/grapes.lua +++ b/crops/grapes.lua @@ -248,10 +248,11 @@ minetest.register_node("farming:grapebush", { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -261,8 +262,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 25, - y_max = 50, + y_min = 25, y_max = 50, decoration = "farming:grapebush" }) -end diff --git a/crops/hemp.lua b/crops/hemp.lua index 42f5b65..f36ef14 100644 --- a/crops/hemp.lua +++ b/crops/hemp.lua @@ -136,12 +136,11 @@ farming.registered_plants["farming:hemp"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_rainforest_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" }, sidelen = 16, noise_params = { @@ -152,10 +151,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 45, + y_min = 3, y_max = 45, decoration = "farming:hemp_7", - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/lettuce.lua b/crops/lettuce.lua index 986d5a4..43c6e6d 100644 --- a/crops/lettuce.lua +++ b/crops/lettuce.lua @@ -81,10 +81,11 @@ farming.registered_plants["farming:lettuce"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -94,8 +95,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = "farming:lettuce_5" }) -end diff --git a/crops/melon.lua b/crops/melon.lua index 87f04f3..89d02a9 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -105,20 +105,12 @@ farming.registered_plants["farming:melon"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 20 or 6, - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"}, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass" + }, sidelen = 16, noise_params = { offset = 0, @@ -128,10 +120,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, + y_min = 1, y_max = 6, decoration = "farming:melon_8", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group_sand"}, num_spawn_by = 1 }) -end diff --git a/crops/mint.lua b/crops/mint.lua index 8d9a66c..00a99c0 100644 --- a/crops/mint.lua +++ b/crops/mint.lua @@ -101,12 +101,11 @@ farming.registered_plants["farming:mint"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = { "default:dirt_with_grass", "default:dirt_with_coniferous_litter", - "mcl_core:dirt_with_grass" + "mcl_core:dirt_with_grass", "ethereal:bamboo_dirt" }, sidelen = 16, noise_params = { @@ -117,10 +116,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 0, - y_max = 75, + y_min = 1, y_max = 75, decoration = "farming:mint_4", - spawn_by = {"group:water", "group:sand"}, - num_spawn_by = 1 + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) -end diff --git a/crops/onion.lua b/crops/onion.lua index 8b445d0..e62eb44 100644 --- a/crops/onion.lua +++ b/crops/onion.lua @@ -94,10 +94,11 @@ farming.registered_plants["farming:onion"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -107,8 +108,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 28, + y_min = 5, y_max = 28, decoration = "farming:onion_5" }) -end diff --git a/crops/parsley.lua b/crops/parsley.lua index 167377b..b63b96a 100644 --- a/crops/parsley.lua +++ b/crops/parsley.lua @@ -73,10 +73,12 @@ farming.registered_plants["farming:parsley"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt", + "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -86,8 +88,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 10, - y_max = 40, + y_min = 10, y_max = 40, decoration = "farming:parsley_3" }) -end diff --git a/crops/peas.lua b/crops/peas.lua index f569abe..4dc1ec3 100644 --- a/crops/peas.lua +++ b/crops/peas.lua @@ -92,10 +92,11 @@ farming.registered_plants["farming:pea_pod"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -105,8 +106,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 25, - y_max = 55, + y_min = 25, y_max = 55, decoration = "farming:pea_5" }) -end diff --git a/crops/pepper.lua b/crops/pepper.lua index 41a3d61..df24ac8 100644 --- a/crops/pepper.lua +++ b/crops/pepper.lua @@ -152,17 +152,12 @@ farming.registered_plants["farming:pepper"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or { - "default:dirt_with_rainforest_litter", "mcl_core:dirt_with_grass"} -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = def.grow_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -172,10 +167,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = {"farming:pepper_5", "farming:pepper_6", "farming:pepper_7"}, - spawn_by = "group:tree", - num_spawn_by = 1 + spawn_by = "group:tree", num_spawn_by = 1 }) -end diff --git a/crops/pineapple.lua b/crops/pineapple.lua index 2b61f02..f4076ff 100644 --- a/crops/pineapple.lua +++ b/crops/pineapple.lua @@ -117,19 +117,18 @@ farming.registered_plants["farming:pineapple"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - grow_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dry_dirt_with_dry_grass", "mcl_core:dirt_with_grass"}, - grow_near = mg and "group:sand" or nil, - num = mg and 1 or -1 +local spawn_on = { + "default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass", + "mcl_core:dirt_with_grass" } -if not farming.eth then +if farming.mapgen == "v6" then + spawn_on = {"default:dirt_with_grass"} +end + minetest.register_decoration({ deco_type = "simple", - place_on = def.grow_on, + place_on = spawn_on, sidelen = 16, noise_params = { offset = 0, @@ -139,10 +138,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 11, - y_max = 30, - decoration = "farming:pineapple_8", - spawn_by = def.grow_near, - num_spawn_by = def.num + y_min = 11, y_max = 30, + decoration = "farming:pineapple_8" }) -end diff --git a/crops/potato.lua b/crops/potato.lua index 2429bc8..f32ca93 100644 --- a/crops/potato.lua +++ b/crops/potato.lua @@ -100,10 +100,12 @@ farming.registered_plants["farming:potato"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -113,8 +115,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 15, - y_max = 40, + y_min = 5, y_max = 40, decoration = "farming:potato_3" }) -end diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index 6f9f78f..1cad2ea 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -108,18 +108,12 @@ farming.registered_plants["farming:pumpkin"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - y_max = mg and 20 or 6, - near = mg and "group:water" or nil, - num = mg and 1 or -1, -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "default:dirt_with_rainforest_litter", + "mcl_core:dirt_with_grass" + }, sidelen = 16, noise_params = { offset = 0, @@ -129,10 +123,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, - y_max = def.y_max, + y_min = 1, y_max = 6, decoration = "farming:pumpkin_8", - spawn_by = def.near, - num_spawn_by = def.num + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) -end diff --git a/crops/raspberry.lua b/crops/raspberry.lua index 268512e..6e04e6b 100644 --- a/crops/raspberry.lua +++ b/crops/raspberry.lua @@ -80,10 +80,11 @@ farming.registered_plants["farming:raspberries"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -93,8 +94,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 15, + y_min = 3, y_max = 15, decoration = "farming:raspberry_4" }) -end diff --git a/crops/rhubarb.lua b/crops/rhubarb.lua index ae357d8..afbffc1 100644 --- a/crops/rhubarb.lua +++ b/crops/rhubarb.lua @@ -85,10 +85,11 @@ farming.registered_plants["farming:rhubarb"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -98,8 +99,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 3, - y_max = 20, + y_min = 3, y_max = 20, decoration = "farming:rhubarb_3" }) -end diff --git a/crops/soy.lua b/crops/soy.lua index 2745481..194243c 100644 --- a/crops/soy.lua +++ b/crops/soy.lua @@ -110,18 +110,13 @@ farming.registered_plants["farming:soy_pod"] = { -- mapgen -local mg = farming.mapgen == "v6" - -def = { - spawn_on = mg and {"default:dirt_with_grass"} or {"default:dirt_with_dry_grass", - "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", - "mcl_core:dirt_with_grass"} -} - -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = def.spawn_on, + place_on = { + "default:dirt_with_grass", "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", + "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -131,8 +126,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = 50, - decoration = "farming:soy_6" + y_min = 20, y_max = 50, + decoration = "farming:soy_5" }) -end diff --git a/crops/spinach.lua b/crops/spinach.lua index a6a3373..5830300 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -84,7 +84,6 @@ farming.registered_plants["farming:spinach"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, @@ -97,10 +96,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - biomes = {"deciduous_forest"}, - y_max = 31000, - y_min = 1, + y_min = 1, y_max = 100, decoration = "farming:spinach_4", param2 = 3 }) -end diff --git a/crops/strawberry.lua b/crops/strawberry.lua index 572964a..8c95ff5 100644 --- a/crops/strawberry.lua +++ b/crops/strawberry.lua @@ -112,10 +112,11 @@ farming.registered_plants["ethereal:strawberry"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -125,8 +126,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 20, - y_max = 55, + y_min = 15, y_max = 55, decoration = "ethereal:strawberry_7" }) -end diff --git a/crops/sunflower.lua b/crops/sunflower.lua index 0f218e8..55e0fdb 100644 --- a/crops/sunflower.lua +++ b/crops/sunflower.lua @@ -130,10 +130,11 @@ farming.registered_plants["farming:sunflower"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -143,8 +144,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 10, - y_max = 40, + y_min = 10, y_max = 40, decoration = "farming:sunflower_8" }) -end diff --git a/crops/tomato.lua b/crops/tomato.lua index 23b4457..a53b8bf 100644 --- a/crops/tomato.lua +++ b/crops/tomato.lua @@ -109,10 +109,11 @@ farming.registered_plants["farming:tomato"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:prairie_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -122,8 +123,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 25, + y_min = 5, y_max = 25, decoration = "farming:tomato_7" }) -end diff --git a/crops/vanilla.lua b/crops/vanilla.lua index bc11b9d..d07680c 100644 --- a/crops/vanilla.lua +++ b/crops/vanilla.lua @@ -107,10 +107,11 @@ farming.registered_plants["farming:vanilla"] = { -- mapgen -if not farming.eth then minetest.register_decoration({ deco_type = "simple", - place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, @@ -120,8 +121,6 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 5, - y_max = 35, + y_min = 5, y_max = 35, decoration = "farming:vanilla_7" }) -end diff --git a/farming.conf_example b/farming.conf_example index 9840d7a..e075fe0 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -9,39 +9,40 @@ farming.asparagus = 0.002 farming.eggplant = 0.002 farming.spinach = 0.002 -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.carrot = 0.002 +farming.potato = 0.002 +farming.tomato = 0.002 +farming.cucumber = 0.002 +farming.corn = 0.002 +farming.coffee = 0.002 +farming.melon = 0.009 +farming.pumpkin = 0.009 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.raspberry = 0.002 +farming.blueberry = 0.002 +farming.rhubarb = 0.002 +farming.beans = 0.002 +farming.grapes = 0.002 farming.barley = true -- true or false only farming.chili = 0.003 farming.hemp = 0.003 -farming.garlic = 0.001 -farming.onion = 0.001 +farming.garlic = 0.002 +farming.onion = 0.002 farming.pepper = 0.002 -farming.pineapple = 0.001 -farming.peas = 0.001 -farming.beetroot = 0.001 +farming.pineapple = 0.003 +farming.peas = 0.002 +farming.beetroot = 0.002 farming.mint = 0.005 -farming.cabbage = 0.001 +farming.cabbage = 0.002 farming.blackberry = 0.002 -farming.lettuce = 0.001 -farming.soy = 0.001 -farming.vanilla = 0.001 -farming.artichoke = 0.001 +farming.lettuce = 0.002 +farming.soy = 0.002 +farming.vanilla = 0.002 +farming.artichoke = 0.002 farming.parsley = 0.002 -farming.sunflower = 0.001 +farming.sunflower = 0.002 farming.ginger = 0.002 +farming.cotton = 0.003 farming.strawberry = not minetest.get_modpath("ethereal") and 0.002 farming.grains = true -- true or false only farming.rice = true diff --git a/init.lua b/init.lua index 100ec51..8ff4fe4 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,7 @@ local S = minetest.get_translator("farming") farming = { mod = "redo", - version = "20240919", + version = "20240924", path = minetest.get_modpath("farming"), select = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}}, select_final = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -2.5/16, 0.5}}, @@ -656,40 +656,41 @@ end farming.asparagus = 0.002 farming.eggplant = 0.002 farming.spinach = 0.002 -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.carrot = 0.002 +farming.potato = 0.002 +farming.tomato = 0.002 +farming.cucumber = 0.002 +farming.corn = 0.002 +farming.coffee = 0.002 +farming.melon = 0.009 +farming.pumpkin = 0.009 farming.cocoa = true -farming.raspberry = 0.001 -farming.blueberry = 0.001 -farming.rhubarb = 0.001 -farming.beans = 0.001 -farming.grapes = 0.001 +farming.raspberry = 0.002 +farming.blueberry = 0.002 +farming.rhubarb = 0.002 +farming.beans = 0.002 +farming.grapes = 0.002 farming.barley = true farming.chili = 0.003 farming.hemp = 0.003 -farming.garlic = 0.001 -farming.onion = 0.001 +farming.garlic = 0.002 +farming.onion = 0.002 farming.pepper = 0.002 -farming.pineapple = 0.001 -farming.peas = 0.001 -farming.beetroot = 0.001 +farming.pineapple = 0.003 +farming.peas = 0.002 +farming.beetroot = 0.002 farming.mint = 0.005 -farming.cabbage = 0.001 +farming.cabbage = 0.002 farming.blackberry = 0.002 -farming.soy = 0.001 -farming.vanilla = 0.001 -farming.lettuce = 0.001 -farming.artichoke = 0.001 +farming.soy = 0.002 +farming.vanilla = 0.002 +farming.lettuce = 0.002 +farming.artichoke = 0.002 farming.parsley = 0.002 -farming.sunflower = 0.001 +farming.sunflower = 0.002 farming.ginger = 0.002 farming.strawberry = 0.002 +farming.cotton = 0.003 farming.grains = true farming.rice = true From 6356dfcdb529d9120e15a9e343672da1ecb6a784 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 25 Sep 2024 10:21:16 +0100 Subject: [PATCH 09/21] fix typo, tweak deco --- crops/artichoke.lua | 10 +++------- crops/melon.lua | 4 ++-- crops/pumpkin.lua | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/crops/artichoke.lua b/crops/artichoke.lua index bec1e49..cb9d7a7 100644 --- a/crops/artichoke.lua +++ b/crops/artichoke.lua @@ -82,15 +82,11 @@ farming.registered_plants["farming:artichoke"] = { -- mapgen -local spawn_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"} - -if farming.eth then - spawn_on = {"ethereal:grove_dirt"} -end - minetest.register_decoration({ deco_type = "simple", - place_on = spawn_on, + place_on = { + "default:dirt_with_grass", "mcl_core:dirt_with_grass", "ethereal:grove_dirt" + }, sidelen = 16, noise_params = { offset = 0, diff --git a/crops/melon.lua b/crops/melon.lua index 89d02a9..83d4451 100644 --- a/crops/melon.lua +++ b/crops/melon.lua @@ -120,7 +120,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, y_max = 6, + y_min = 1, y_max = 3, decoration = "farming:melon_8", - spawn_by = {"group:water", "group_sand"}, num_spawn_by = 1 + spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) diff --git a/crops/pumpkin.lua b/crops/pumpkin.lua index 1cad2ea..d133dfe 100644 --- a/crops/pumpkin.lua +++ b/crops/pumpkin.lua @@ -123,7 +123,7 @@ minetest.register_decoration({ octaves = 3, persist = 0.6 }, - y_min = 1, y_max = 6, + y_min = 1, y_max = 3, decoration = "farming:pumpkin_8", spawn_by = {"group:water", "group:sand"}, num_spawn_by = 1 }) From 56fb88f48470f47d810b59223a3e989bb11b5468 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 26 Sep 2024 09:02:36 +0100 Subject: [PATCH 10/21] remove check --- farming.conf_example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/farming.conf_example b/farming.conf_example index e075fe0..d22ba2e 100644 --- a/farming.conf_example +++ b/farming.conf_example @@ -43,7 +43,7 @@ farming.parsley = 0.002 farming.sunflower = 0.002 farming.ginger = 0.002 farming.cotton = 0.003 -farming.strawberry = not minetest.get_modpath("ethereal") and 0.002 +farming.strawberry = 0.002 farming.grains = true -- true or false only farming.rice = true From e302b83c4323b209a7ede8ef3f94f3ee5ae3c047 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 27 Sep 2024 09:03:23 +0100 Subject: [PATCH 11/21] mortar and juicer now use group:stone --- item_recipes.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/item_recipes.lua b/item_recipes.lua index 6b8d265..8cb77ad 100644 --- a/item_recipes.lua +++ b/item_recipes.lua @@ -1118,8 +1118,8 @@ minetest.register_craft({ minetest.register_craft({ output = "farming:mortar_pestle", recipe = { - {a.stone, "group:stick", a.stone}, - {"", a.stone, ""} + {"group:stone", "group:stick", "group:stone"}, + {"", "group:stone", ""} } }) @@ -1139,8 +1139,8 @@ minetest.register_craft({ minetest.register_craft({ output = "farming:juicer", recipe = { - {"", a.stone, ""}, - {a.stone, "", a.stone} + {"", "group:stone", ""}, + {"group:stone", "", "group:stone"} } }) From b840b812b3c33434720cfff64e75acd72c021c26 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 15 Oct 2024 13:10:59 +0100 Subject: [PATCH 12/21] add drink group to soups --- item_food.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/item_food.lua b/item_food.lua index c7f7f19..2de1ed8 100644 --- a/item_food.lua +++ b/item_food.lua @@ -180,7 +180,7 @@ farming.add_eatable("farming:muffin_blueberry", 2) minetest.register_craftitem("farming:tomato_soup", { description = S("Tomato Soup"), inventory_image = "farming_tomato_soup.png", - groups = {compostability = 65}, + groups = {compostability = 65, drink = 1}, on_use = minetest.item_eat(8, "farming:bowl") }) @@ -662,7 +662,8 @@ farming.add_eatable("farming:gingerbread_man", 2) minetest.register_craftitem("farming:mint_tea", { description = S("Mint Tea"), inventory_image = "farming_mint_tea.png", - on_use = minetest.item_eat(2, a.drinking_glass) + on_use = minetest.item_eat(2, a.drinking_glass), + groups = {drink = 1} }) farming.add_eatable("farming:mint_tea", 2) @@ -1008,7 +1009,8 @@ if not farming.mcl then minetest.register_craftitem("farming:beetroot_soup", { description = S("Beetroot Soup"), inventory_image = "farming_beetroot_soup.png", - on_use = minetest.item_eat(6, "farming:bowl") + on_use = minetest.item_eat(6, "farming:bowl"), + groups = {drink = 1} }) farming.add_eatable("farming:beetroot_soup", 6) From ba678f7bb655659c0ec4371866693c8b7c51c27c Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 16 Oct 2024 11:00:37 +0100 Subject: [PATCH 13/21] add {drink} group to soup --- item_food.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/item_food.lua b/item_food.lua index 2de1ed8..36ae280 100644 --- a/item_food.lua +++ b/item_food.lua @@ -672,7 +672,7 @@ farming.add_eatable("farming:mint_tea", 2) minetest.register_craftitem("farming:onion_soup", { description = S("Onion Soup"), inventory_image = "farming_onion_soup.png", - groups = {compostability = 65}, + groups = {compostability = 65, drink = 1}, on_use = minetest.item_eat(6, a.bowl) }) @@ -683,7 +683,7 @@ farming.add_eatable("farming:onion_soup", 6) minetest.register_craftitem("farming:pea_soup", { description = S("Pea Soup"), inventory_image = "farming_pea_soup.png", - groups = {compostability = 65}, + groups = {compostability = 65, drink = 1}, on_use = minetest.item_eat(4, a.bowl) }) From 712005d2ac6c2c281c56685689675110e75cc8e2 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 3 Nov 2024 08:16:06 +0000 Subject: [PATCH 14/21] tweak asparagus,ginger,spinach offset --- crops/asparagus.lua | 2 +- crops/eggplant.lua | 2 +- crops/spinach.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crops/asparagus.lua b/crops/asparagus.lua index c881440..10ae3ba 100644 --- a/crops/asparagus.lua +++ b/crops/asparagus.lua @@ -95,7 +95,7 @@ minetest.register_decoration({ place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = -0.1, + offset = 0, scale = farming.asparagus, spread = {x = 100, y = 100, z = 100}, seed = 234, diff --git a/crops/eggplant.lua b/crops/eggplant.lua index 0dd26bb..a6877fb 100644 --- a/crops/eggplant.lua +++ b/crops/eggplant.lua @@ -89,7 +89,7 @@ minetest.register_decoration({ place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = -0.1, + offset = 0, scale = farming.eggplant, spread = {x = 100, y = 100, z = 100}, seed = 356, diff --git a/crops/spinach.lua b/crops/spinach.lua index 5830300..56a8455 100644 --- a/crops/spinach.lua +++ b/crops/spinach.lua @@ -89,7 +89,7 @@ minetest.register_decoration({ place_on = {"default:dirt_with_grass", "mcl_core:dirt_with_grass"}, sidelen = 16, noise_params = { - offset = -0.1, + offset = 0, scale = farming.spinach, spread = {x = 100, y = 100, z = 100}, seed = 910, From ae10efceffbf543f234d85774d0fe15486d12a43 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 2 Dec 2024 10:45:45 +0000 Subject: [PATCH 15/21] update german translation (thx Wuzzy) --- locale/farming.de.tr | 283 ++++++++++++++++++++++--------------------- 1 file changed, 148 insertions(+), 135 deletions(-) diff --git a/locale/farming.de.tr b/locale/farming.de.tr index 815e115..f2da0c6 100644 --- a/locale/farming.de.tr +++ b/locale/farming.de.tr @@ -1,88 +1,79 @@ # textdomain: farming -Artichoke= -Asparagus= -Barley Seed=Gerstenkörner -Barley=Gerste -Green Beans=Grüne Bohnen -Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen) -Beetroot=Rote Beete -Beetroot Soup=Rote Beete Suppe -Blackberries= -Wild Blueberries=Wilde Blaubeeren -Blueberry Muffin=Blaubeermuffin -Blueberry Pie=Blaubeerkuchen -Cabbage=Kohl -Carrot=Möhre -Carrot Juice=Möhrensaft -Golden Carrot=Goldene Möhre -Chili Pepper=Chili -Bowl of Chili=Chili Schale -Chili Powder= -Raw Cocoa Beans= -Cocoa Beans=Kakaobohne -Cookie=Keks -Bar of Dark Chocolate=Tafel Zartbitterschokolade -Chocolate Block=Schokoladenstück -Coffee Beans=Kaffeebohnen -Cup of Coffee=Tasse Kaffee Banana=Banane Banana Leaves=Bananenblätter -Orange=Apfelsine +Orange=Orange +Artichoke=Artischocke + Crop=-Pflanze +Asparagus=Spargel +Barley Seed=Gerstensamen +Barley=Gerste +Green Beans=Grüne Bohnen +Bean Pole (place on soil before planting beans)=Bohnenstange (vor dem Pflanzen der Bohnen auf den@nAckerboden stellen) +Beetroot=Rote Beete +Blackberries=Brombeeren +Blackberry=Brombeere +Wild Blueberries=Wilde Blaubeeren +Blueberry=Blaubeere +Cabbage=Kohl +Carrot=Möhre +Chili Pepper=Chili +Raw Cocoa Beans=Rohe Kakaobohnen +Cocoa Beans=Kakaobohnen +Coffee Beans=Kaffeebohnen +Coffee=Kaffee Corn=Mais -Corn on the Cob=Maiskolben -Popcorn= -Cornstarch=Speisestärke -Bottle of Ethanol=Flasche Ethanol -Wild Cotton=Wilde Baumwolle Cotton Seed=Baumwollsamen Cotton=Baumwolle -String=Faden +Wild Cotton=Wilde Baumwolle Cucumber=Gurke -Eggplant= -Glass of Water= -Sugar=Zucker -Sugar Cube= -Caramel= -Salt=Salz -Mayonnaise= -Rose Water=Rosenwasser -Turkish Delight=Lokum -Garlic Bread=Knoblauchbrot -Donut=Donut -Chocolate Donut=Schokodonut -Apple Donut=Apfeldonut -Porridge=Haferbrei -Jaffa Cake=Jaffakeks -Apple Pie=Apfelkuchen -Cactus Juice=Kaktussaft -Pasta=Pasta -Mac & Cheese= -Spaghetti=Spaghetti -Bibimbap=Bibimbap -Burger= -Salad=Salat -Triple Berry Smoothie= -Spanish Potatoes= -Potato omelet= -Paella= -Vanilla Flan= -Vegan Cheese= -Onigiri= -Gyoza= -Mochi= -Gingerbread Man= +Eggplant=Aubergine Garlic clove=Knoblauchzehe Garlic=Knoblauch -Garlic Braid=Knoblauchzopf -Ginger= +Ginger=Lebkuchen Grapes=Weintrauben -Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen) +Trellis (place on soil before planting grapes)=Spalier (vor dem Pflanzen der Weintrauben auf den@nAckerboden stellen) Hemp Seed=Hanfsamen Hemp Leaf=Hanfblatt -Bottle of Hemp Oil=Flasche mit Hanföl -Hemp Fibre=Hanffaser -Hemp Block=Hanfblock -Hemp Rope=Hanfseil +Hemp=Hanf +Lettuce=Kopfsalat +Melon Slice=Melonenscheibe +Melon=Melone +Mint Seeds=Minzsamen +Mint Leaf=Minzblatt +Mint=Minze +Onion=Zwiebel +Parsley=Petersilie +Pea Pod=Erbsenschote +Pea=Erbse +Peppercorn=Pfefferkorn +Green Pepper=Grüne Paprika +Yellow Pepper=Gelbe Paprika +Red Pepper=Rote Paprika +Pepper=Paprika +Pineapple Top=Ananasdeckel +Pineapple=Ananas +Potato=Kartoffel +Pumpkin Slice=Kürbisscheibe +Pumpkin=Kürbis +Raspberries=Himbeeren +Raspberry=Himbeere +Rhubarb=Rhabarber +Rice Seed=Reissamen +Rice=Reis +Rye seed=Roggensamen +Rye=Roggen +Oat seed=Hafersamen +Oats=Hafer +Soy Pod=Sojaschote +Soy=Soja +Spinach=Spinat +Strawberry=Erdbeere +Sunflower Seeds=Sonnenblumensamen +Sunflower=Sonnenblume +Tomato=Tomate +Vanilla=Vanille +Wheat Seed=Weizensamen +Wheat=Weizen Hoe=Hacke Wooden Hoe=Holzhacke Stone Hoe=Steinhacke @@ -90,72 +81,90 @@ Steel Hoe=Stahlhacke Bronze Hoe=Bronzehacke Mese Hoe=Mesehacke Diamond Hoe=Diamanthacke -Wood Hoe= -Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen) -Mithril Scythe (Use to harvest and replant crops)= +Wood Hoe=Holzhacke +Hoe Bomb (use or throw on grassy areas to hoe land)=Hackenbombe (Auf Grasland werfen oder benutzen,@num Land zu bestellen) +Mithril Scythe (Use to harvest and replant crops)=Mithrilsichel (Benutzen, um Nutzpflanzen zu ernten und neu zu pflanzen) Seed=Saatgut -Lettuce= -Melon Slice=Melonenscheibe -Melon=Melone -Mint Seeds=Minzsamen -Mint Leaf=Minzblatt +Flour=Mehl +Garlic Braid=Knoblauchzopf +Corn on the Cob=Maiskolben +Popcorn=Popcorn +Cornstarch=Speisestärke +Cup of Coffee=Tasse Kaffee +Bar of Dark Chocolate=Tafel Zartbitterschokolade +Chocolate Block=Schokoladenblock +Bowl of Chili=Schüssel mit Chili +Chili Powder=Chilipulver +Carrot Juice=Möhrensaft +Blueberry Pie=Blaubeerkuchen +Blueberry Muffin=Blaubeermuffin +Tomato Soup=Tomatensuppe +Sliced Bread=Geschnittenes Brot +Toast=Toast +Toast Sandwich=Toast-Sandwich +Glass of Water=Glas Wasser +Sugar Cube=Zuckerwürfel +Caramel=Karamell +Salt=Salz +Salt crystal=Salzkristall +Mayonnaise=Mayonnaise +Rose Water=Rosenwasser +Turkish Delight=Lokum +Garlic Bread=Knoblauchbrot +Donut=Donut +Chocolate Donut=Schokodonut +Apple Donut=Apfeldonut +Porridge=Haferbrei +Jaffa Cake=Jaffa +Apple Pie=Apfelkuchen +Cactus Juice=Kaktussaft +Pasta=Pasta +Mac & Cheese=Makkaroni mit Käse +Spaghetti=Spaghetti +Bibimbap=Bibimbap +Burger=Burger +Salad=Salat +Triple Berry Smoothie=Dreibeersmoothie +Spanish Potatoes=Spanische Kartoffeln +Potato omelette=Kartoffelomelette +Paella=Paella +Vanilla Flan=Vanilletorte +Vegan Cheese=Veganer Käse +Vegan Butter=Vegane Butter +Onigiri=Onigiri +Gyoza=Gyoza +Mochi=Mochi +Gingerbread Man=Lebkuchenmann Mint Tea=Minztee -Onion=Zwiebel Onion Soup=Zwiebelsuppe -Parsley= -Pea Pod=Erbsenschote Pea Soup=Erbsensuppe -Peppercorn=Pfefferkorn -Green Pepper= -Yellow Pepper= -Red Pepper= Ground Pepper=Gemahlener Pfeffer -Pineapple Top=Ananasdeckel -Pineapple=Ananas Pineapple Ring=Ananasscheibe Pineapple Juice=Ananassaft -Potato=Kartoffel -Baked Potato=Ofenkartoffel -Cucumber and Potato Salad=Kartoffelsalat mit Gurke -Pumpkin Slice=Kürbisscheibe -Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Punch zum Ein- und Ausschalten) -Scarecrow Bottom=Vogelscheuchengestell -Pumpkin Bread=Kürbisbrot +Cucumber and Potato Salad=Gurken-Kartoffelsalat Pumpkin Dough=Kürbisteig -Pumpkin=Kürbis -Raspberries=Himbeeren +Pumpkin Bread=Kürbisbrot Raspberry Smoothie=Himbeersmoothie -Rhubarb=Rhabarber Rhubarb Pie=Rhabarberkuchen -Rice Seed= -Rice=Reis -Rice Bread=Reiswaffel Rice Flour=Reismehl -Rye seed=Roggensaat -Rye=Roggen -Oat seed=Hafersamen -Oats=Hafer +Rice Bread=Reiswaffel Multigrain Flour=Mehrkornmehl Multigrain Bread=Mehrkornbrot -Savanna Soil=Savannaerde -Wet Savanna Soil=Feuchte Savannaerde -Soil=Ackerboden -Wet Soil=Bewässerter Ackerboden -Soy Pod= -Soy Sauce= -Soy Milk= -Tofu= -Cooked Tofu= -Spinach= -Strawberry=Erdbeere -Sunflower= -Sunflower Seeds= -Toasted Sunflower Seeds= -Bottle of Sunflower Oil= -Sunflower Seed Bread= -Tomato=Tomate -Tomato Soup= -Wooden Bowl=Holzschale +Soy Sauce=Sojasoße +Soy Milk=Sojamilch +Tofu=Tofu +Cooked Tofu=Gekochter Tofu +Toasted Sunflower Seeds=Geröstete Sonnenblumensamen +Bottle of Sunflower Oil=Flasche Sonnenblumenöl +Sunflower Seed Bread=Sonnenblumensamenbrot +Vanilla Extract=Vanilleextrakt +Jerusalem Artichokes=Jerusalemartischocken +Bread=Brot +Cookie=Keks +Golden Carrot=Goldene Möhre +Beetroot Soup=Rote-Beete-Suppe +Sugar=Zucker +Baked Potato=Ofenkartoffel Saucepan=Kasserolle Cooking Pot=Kochtopf Baking Tray=Kuchenblech @@ -164,13 +173,17 @@ Mortar and Pestle=Mörser und Stößel Cutting Board=Schneidebrett Juicer=Entsafter Glass Mixing Bowl=Glasschüssel -Vanilla= -Vanilla Extract= -Wheat Seed=Weizenkörner -Wheat=Weizen +Bottle of Ethanol=Flasche Ethanol Straw=Stroh -Flour=Mehl -Bread=Brot -Sliced Bread=Geschnittenes Brot -Toast=Toast -Toast Sandwich=Toast Sandwich +Bottle of Hemp Oil=Flasche mit Hanföl +Hemp Fibre=Hanffaser +Hemp Block=Hanfblock +Hemp Rope=Hanfseil +Scarecrow Bottom=Vogelscheuchengestell +Wooden Bowl=Holzschale +String=Faden +Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Hauen zum Ein- und Ausschalten) +Savanna Soil=Savannenerde +Wet Savanna Soil=Feuchte Savannenerde +Soil=Ackerboden +Wet Soil=Feuchter Ackerboden From e247a3ea1348a6fdc8ea8113cebaa5419efdc0d3 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 12 Jan 2025 11:40:28 +0000 Subject: [PATCH 16/21] hoe bomb's replace dry dirt --- hoes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoes.lua b/hoes.lua index e686575..a035d8b 100644 --- a/hoes.lua +++ b/hoes.lua @@ -254,7 +254,7 @@ local function hoe_area(pos, player) res = minetest.find_nodes_in_area_under_air( {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, - {"group:soil"}) + {"group:soil", "ethereal:dry_dirt"}) for n = 1, #res do minetest.swap_node(res[n], {name = "farming:soil"}) From 08cdf0ef525cae8bc15d2f121ae3012b22687b00 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 26 Jan 2025 15:30:49 +0000 Subject: [PATCH 17/21] hoe bome removes dry shrub along with flora --- hoes.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hoes.lua b/hoes.lua index a035d8b..4968928 100644 --- a/hoes.lua +++ b/hoes.lua @@ -244,7 +244,8 @@ local function hoe_area(pos, player) -- remove flora (grass, flowers etc.) local res = minetest.find_nodes_in_area( {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, - {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, {"group:flora"}) + {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, + {"group:flora", "default:dry_shrub"}) for n = 1, #res do minetest.swap_node(res[n], {name = "air"}) @@ -252,9 +253,9 @@ local function hoe_area(pos, player) -- replace dirt with tilled soil res = minetest.find_nodes_in_area_under_air( - {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, - {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, - {"group:soil", "ethereal:dry_dirt"}) + {x = pos.x - r, y = pos.y - 1, z = pos.z - r}, + {x = pos.x + r, y = pos.y + 2, z = pos.z + r}, + {"group:soil", "ethereal:dry_dirt"}) for n = 1, #res do minetest.swap_node(res[n], {name = "farming:soil"}) From 2752ad259ca05193ca51ef9b238b5590d69600f4 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 14 Feb 2025 13:23:41 +0000 Subject: [PATCH 18/21] add weed and weed bale --- README.md | 2 +- compatibility.lua | 18 +++--------- item_non_food.lua | 42 +++++++++++++++++++++++++--- item_recipes.lua | 21 ++++++++++++++ lucky_block.lua | 3 +- soil.lua | 23 +++++++++++++++ textures/farming_weed.png | Bin 0 -> 225 bytes textures/farming_weed_bale_side.png | Bin 0 -> 293 bytes textures/farming_weed_bale_top.png | Bin 0 -> 275 bytes 9 files changed, 89 insertions(+), 20 deletions(-) create mode 100644 textures/farming_weed.png create mode 100644 textures/farming_weed_bale_side.png create mode 100644 textures/farming_weed_bale_top.png diff --git a/README.md b/README.md index ec4143e..fbf763d 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ on an older map are enabled and growing properly. ### Changelog: -- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files., hoes can deal damage. +- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files, hoes can deal damage. Add weed and weed bale. - 1.48 - added 'farming_use_utensils' setting to enable/disable utensils in recipes, added mayonnaise (thx felfa), added gingerbread man, Added MineClone2 compatibility - 1.47 - Now blueberries can make blue dye, tweak soil types to work better with older 0.4.x clients and add spanish translation (thx mckaygerhard), add trellis setting to registered_crops and fix pea and soy crop names (thx nixnoxus), add strawberries if ethereal mod not active, added asparagus; spinach; eggplant (thx Atlante for new textures), Sugar Cube - 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock) diff --git a/compatibility.lua b/compatibility.lua index 6895326..06da9bd 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -34,12 +34,9 @@ else sunlight_propagates = true, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2} - }, - groups = { - food_banana = 1, fleshy = 3, dig_immediate = 3 + type = "fixed", fixed = {-0.2, -0.5, -0.2, 0.2, 0.2, 0.2} }, + groups = {food_banana = 1, fleshy = 3, dig_immediate = 3}, is_ground_content = false, on_use = minetest.item_eat(2), sounds = farming.node_sound_leaves_defaults() @@ -101,12 +98,9 @@ else sunlight_propagates = true, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2} - }, - groups = { - food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2 + type = "fixed", fixed = {-0.2, -0.3, -0.2, 0.2, 0.2, 0.2} }, + groups = {food_orange = 1, fleshy = 3, dig_immediate = 3, flammable = 2}, is_ground_content = false, on_use = minetest.item_eat(4), sounds = farming.node_sound_leaves_defaults() @@ -165,7 +159,3 @@ alias("farming_plus:tomato_1", "farming:tomato_2") alias("farming_plus:tomato_2", "farming:tomato_4") alias("farming_plus:tomato_3", "farming:tomato_6") alias("farming_plus:tomato", "farming:tomato_8") - --- Weeds - -alias("farming:weed", "default:grass_2") diff --git a/item_non_food.lua b/item_non_food.lua index 99b4f3a..d118bf3 100644 --- a/item_non_food.lua +++ b/item_non_food.lua @@ -96,6 +96,42 @@ minetest.register_node("farming:straw", { _mcl_blast_resistance = 1 }) +-- weed + +minetest.register_node("farming:weed", { + description = S("Weed"), + drawtype = "plantlike", + tiles = {"farming_weed.png"}, + inventory_image = "farming_weed.png", + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 2, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + waving = 1, + selection_box = farming.select, + groups = {snappy = 3, flammable = 4, plant = 1, attached_node = 1}, + _mcl_hardness = farming.mcl_hardness, + is_ground_content = false, + sounds = farming.node_sound_leaves_defaults() +}) + +-- weed bale + +minetest.register_node("farming:weed_bale", { + description = S("Weed Bale"), + tiles = { + "farming_weed_bale_top.png", "farming_weed_bale_top.png", + "farming_weed_bale_side.png" + }, + paramtype2 = "facedir", + groups = {handy = 1, snappy = 3, flammable = 4, fall_damage_add_percent = -30}, + sounds = farming.node_sound_leaves_defaults(), + _mcl_hardness = 0.8, + _mcl_blast_resistance = 1 +}) + -- hemp oil minetest.register_node("farming:hemp_oil", { @@ -108,8 +144,7 @@ minetest.register_node("farming:hemp_oil", { is_ground_content = false, walkable = false, selection_box = { - type = "fixed", - fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} }, groups = { food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1, @@ -161,8 +196,7 @@ minetest.register_node("farming:hemp_rope", { is_ground_content = false, sounds = farming.node_sound_leaves_defaults(), selection_box = { - type = "fixed", - fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} + type = "fixed", fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7} }, _mcl_hardness = 0.8, _mcl_blast_resistance = 1 diff --git a/item_recipes.lua b/item_recipes.lua index 8cb77ad..69aa770 100644 --- a/item_recipes.lua +++ b/item_recipes.lua @@ -1253,6 +1253,25 @@ minetest.register_craft({ recipe = {{"farming:straw"}} }) + +-- weed bale + +local tmp = "farming:weed" + +minetest.register_craft({ + output = "farming:weed_bale", + recipe = { + {tmp, tmp, tmp}, + {tmp, tmp, tmp}, + {tmp, tmp, tmp} + } +}) + +minetest.register_craft({ + output = tmp .. " 9", + recipe = {{"farming:weed_bale"}} +}) + --= Recipes we shouldn't add when using Mineclonia/VoxeLibre if not farming.mcl then @@ -1400,6 +1419,8 @@ minetest.register_craft({output = a.dye_yellow, recipe = {{"group:food_onion"}}} minetest.register_craft({type = "fuel", recipe = "farming:straw", burntime = 3}) minetest.register_craft({type = "fuel", recipe = "farming:wheat", burntime = 1}) +minetest.register_craft({type = "fuel", recipe = "farming:weed_bale", burntime = 3}) +minetest.register_craft({type = "fuel", recipe = "farming:weed", burntime = 1}) minetest.register_craft({type = "fuel", recipe = "farming:bowl",burntime = 10}) minetest.register_craft({type = "fuel", recipe = "farming:string", burntime = 1}) minetest.register_craft({type = "fuel", recipe = "farming:cotton", burntime = 1}) diff --git a/lucky_block.lua b/lucky_block.lua index 5aa5f4c..5d5f724 100644 --- a/lucky_block.lua +++ b/lucky_block.lua @@ -105,5 +105,6 @@ lucky_block:add_blocks({ {name = "farming:grapebush", max = 5}, {name = "farming:asparagus", max = 7} }}, - {"dro", {"farming:chili_powder"}, 5} + {"dro", {"farming:chili_powder"}, 5}, + {"dro", {"farming:weed"}, 9}, }) diff --git a/soil.lua b/soil.lua index 7572d57..37acb02 100644 --- a/soil.lua +++ b/soil.lua @@ -194,3 +194,26 @@ minetest.register_abm({ end end }) + +-- those darn weeds + +minetest.register_abm({ + nodenames = {"group:field"}, + neighbors = {"air"}, + interval = 50, + chance = 15, + catch_up = false, + + action = function(pos, node) + + if minetest.find_node_near(pos, 4, {"farming:scarecrow_bottom"}) then + return + end + + pos.y = pos.y + 1 + + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "farming:weed", param2 = 2}) + end + end +}) diff --git a/textures/farming_weed.png b/textures/farming_weed.png new file mode 100644 index 0000000000000000000000000000000000000000..8d65d1829895c58190bda6e89fda34d5ce72d327 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6XVU3I`u#fOS+@4BLl<6 ze(pbstU$g(vPY0F14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>bP0l+XkK7w|pe literal 0 HcmV?d00001 diff --git a/textures/farming_weed_bale_side.png b/textures/farming_weed_bale_side.png new file mode 100644 index 0000000000000000000000000000000000000000..7344c22a2f60af2c9bb5524936755e86bbbb76c8 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6XVU3I`u#fOS+@4BLl<6 ze(pbstU$g(vPY0F14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>U)M4tOi{~3B~WLTwelj5RcZW>))b#R6xE#m_~RpwC|hStXmd(E4y8B&u{mKzQ4AL9=aF%^tf=}{xMJsFiqy&wHKzA^By85}Sb4q9e0I_*z5&!@I literal 0 HcmV?d00001 diff --git a/textures/farming_weed_bale_top.png b/textures/farming_weed_bale_top.png new file mode 100644 index 0000000000000000000000000000000000000000..29e6cf1fe21e2430bdc8fe854e0ccffde27a3107 GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6XVU3I`u#fOS+@4BLl<6 ze(pbstU$g(vPY0F14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>Xx<{cFs1Nw8mlSQOkTTzn4I%GEW!B5Q)pW{_VU640w|M))yblT*4#G!y?8R zc)M2eN!&DA79SvR#p?Y@$|YruUmhF zBba`D*m!Q~-<~sPYX9jUcbUGW@>7-MzB|23Zk9=TKX9#TT(u?Z|MOk8cJKBu9yDW# REeE=Q!PC{xWt~$(698#-VA%iw literal 0 HcmV?d00001 From 45c346e7635f2f088bc64e46ab5462500a4e426c Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 16 Feb 2025 08:35:53 +0000 Subject: [PATCH 19/21] tweak weed bale texture --- textures/farming_weed_bale_top.png | Bin 275 -> 758 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/textures/farming_weed_bale_top.png b/textures/farming_weed_bale_top.png index 29e6cf1fe21e2430bdc8fe854e0ccffde27a3107..648423b9dc746b10540b5f64100661860fbc7cfe 100644 GIT binary patch delta 674 zcmV;T0$u%+0`>)v83+OZ005AYXf}}{OMe1%NklRa>``T#sarw;5LI?=hJg`z}4jUXX$sIDE8i1?Cw?YM&_ zwtqPP(b4&ia&)}UgRp(h0YqZH?2ySguGOjAKpin@74w}l zzg(e%t~fYc^q4GH=%1fcV$fNbtbc8pJP1F0%zG}k9inD*l?NdJ03#;*t(Xm?L06Qj z`tF`K8OMKr-vQ{i;xxIMH?`EVea=f&-R<#6%r_f_S(pHL-7Es|n532gpj@HqWE?k| zSpasKu5FpitK{8*b8|U@jHVU>wzI~ZEHasR9&FqLt+ab!Q&%48}C{=X;Yg^{& ziJuZk5^cm}sj8>bNEDKOs(*q<%MMA^oil%9hqTW*G3bJ!ynLGzJOa>YX2n#b95d-6 z23=7s&3HhmWn}9q7P9(6qgIgz;jbUDqQvD2b$eWOdpzwp?dlPt+vELKe0t&!x;%2~pd98RTA;9Q7bjObV~-vEw&Ut}#aI z5`^M+A2^v7UHHX|$EOWOc6?s3%dU<}+WZq(0{ZZ=&ZYf~%*=iMFULfew0ZJ+87RKo pjilLj8cX0sdV#96YX9fDJwEQd0l_u|U3UNg002ovPDHLkV1jv Date: Sun, 16 Feb 2025 16:50:13 +0000 Subject: [PATCH 20/21] chance weeds from 1 in 15 to 1 in 35 --- soil.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soil.lua b/soil.lua index 37acb02..cf983db 100644 --- a/soil.lua +++ b/soil.lua @@ -201,7 +201,7 @@ minetest.register_abm({ nodenames = {"group:field"}, neighbors = {"air"}, interval = 50, - chance = 15, + chance = 35, catch_up = false, action = function(pos, node) From 1416f6e6157b0307439831aebc4e380d13d73052 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 17 Feb 2025 08:09:55 +0000 Subject: [PATCH 21/21] add setting to disable weeds --- README.md | 2 +- settingtypes.txt | 2 ++ soil.lua | 36 ++++++++++++++++++++---------------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index fbf763d..a850824 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ on an older map are enabled and growing properly. ### Changelog: -- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files, hoes can deal damage. Add weed and weed bale. +- 1.49 - Added {eatable=1} groups to food items with the value giving HP when eaten, improved mineclone support, separated foods from crop files, hoes can deal damage. Add weed and weed bale (with setting to disable weed growth). - 1.48 - added 'farming_use_utensils' setting to enable/disable utensils in recipes, added mayonnaise (thx felfa), added gingerbread man, Added MineClone2 compatibility - 1.47 - Now blueberries can make blue dye, tweak soil types to work better with older 0.4.x clients and add spanish translation (thx mckaygerhard), add trellis setting to registered_crops and fix pea and soy crop names (thx nixnoxus), add strawberries if ethereal mod not active, added asparagus; spinach; eggplant (thx Atlante for new textures), Sugar Cube - 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames), added soya, vanilla and sunflowers (thanks Felfa), added tofu, added salt crystals (thanks gorlock) diff --git a/settingtypes.txt b/settingtypes.txt index 7573de9..6eded44 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -2,3 +2,5 @@ farming_stage_length (Farming Stage Length) float 160.0 farming_use_utensils (Use utensil recipes) bool true + +farming_disable_weeds (Disable Weed growth) bool false diff --git a/soil.lua b/soil.lua index cf983db..aa6a2c9 100644 --- a/soil.lua +++ b/soil.lua @@ -197,23 +197,27 @@ minetest.register_abm({ -- those darn weeds -minetest.register_abm({ - nodenames = {"group:field"}, - neighbors = {"air"}, - interval = 50, - chance = 35, - catch_up = false, +if minetest.settings:get_bool("farming_disable_weeds") ~= true then - action = function(pos, node) + minetest.register_abm({ + nodenames = {"group:field"}, + neighbors = {"air"}, + interval = 50, + chance = 35, + catch_up = false, - if minetest.find_node_near(pos, 4, {"farming:scarecrow_bottom"}) then - return + action = function(pos, node) + + if minetest.find_node_near(pos, 4, {"farming:scarecrow_bottom"}) then + return + end + + pos.y = pos.y + 1 + + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "farming:weed", param2 = 2}) + end end + }) +end - pos.y = pos.y + 1 - - if minetest.get_node(pos).name == "air" then - minetest.set_node(pos, {name = "farming:weed", param2 = 2}) - end - end -})