From 5bb5516706274122060b81043e82e37227ba33b1 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 1 Apr 2017 04:41:59 +0200 Subject: [PATCH] 8 stages of wheat --- .../mcl_farming/textures/farming_wheat_1.png | Bin 229 -> 0 bytes .../mcl_farming/textures/farming_wheat_2.png | Bin 625 -> 0 bytes .../mcl_farming/textures/farming_wheat_3.png | Bin 748 -> 0 bytes .../textures/mcl_farming_wheat_stage_0.png | Bin 0 -> 345 bytes .../textures/mcl_farming_wheat_stage_1.png | Bin 0 -> 424 bytes .../textures/mcl_farming_wheat_stage_2.png | Bin 0 -> 644 bytes .../textures/mcl_farming_wheat_stage_3.png | Bin 0 -> 833 bytes .../textures/mcl_farming_wheat_stage_4.png | Bin 0 -> 975 bytes .../textures/mcl_farming_wheat_stage_5.png | Bin 0 -> 941 bytes .../textures/mcl_farming_wheat_stage_6.png | Bin 0 -> 958 bytes ...heat.png => mcl_farming_wheat_stage_7.png} | Bin mods/ITEMS/mcl_farming/wheat.lua | 128 +++++++----------- 12 files changed, 48 insertions(+), 80 deletions(-) delete mode 100644 mods/ITEMS/mcl_farming/textures/farming_wheat_1.png delete mode 100644 mods/ITEMS/mcl_farming/textures/farming_wheat_2.png delete mode 100644 mods/ITEMS/mcl_farming/textures/farming_wheat_3.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_0.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_1.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_2.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_3.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_4.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_5.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_6.png rename mods/ITEMS/mcl_farming/textures/{farming_wheat.png => mcl_farming_wheat_stage_7.png} (100%) diff --git a/mods/ITEMS/mcl_farming/textures/farming_wheat_1.png b/mods/ITEMS/mcl_farming/textures/farming_wheat_1.png deleted file mode 100644 index 68537f39a3f088db3d5c95289817596a40c946eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy_5nU2uK)l4XIRY2u$+lu6(hqA zCWhUN42Kz*k1;TxWZ?2;;0t8nPiGOY;FL&amdavPXy#F=;qsm(7_^-$_#k`aX71AM zis3+`7)yfuf*Bm1-ADs+LOfj@LoEE?p0ea?P!MrAsNT(`@#^^R`B&SVdb}4+?!~YPE&OwF?0S1;oW(#Z(^e<{UP{Cm&(cbH$qP~zr Zdd@e-KWvs|=Yi%kc)I$ztaD0e0ssD&7efFScnKGI2^eDo z7<&pCMF1K?02*oq8g&R9MF1R$4jqgS9&raCO8_8)3?Y{iBzy`bR01z%2sdmBKzt8D zgAqrR5=)v9OPmo;st-}J3{kTSQnw0Hzz0*l2vflaSZfbivkO{w4_mhiTfhfg!v$Y^ z5MRv!WP%T5w+d*84r+`JYSI90kqmH?40M_acb^G+nhJui0FJr7&CH6;zfsyY$Wyo8^WVR5?11crJHi2(-y9d${w{Y%I3U!H-15#(CmJDn zu9iveYuvo@%h3n5>@_Y&9ZA>;we=^BzCVPWk$jDAF*W0l%A%Y&b73M0Nr^W;vKlPg+N;o7TFuT8JfPj$E?xO98KPw` zv@~uMOHxDJ19*c6mv00qz&n^0sAk_Ms)6HDA{wk?(tugikd#y;qv?@>z00000 LNkvXXu0mjf1OeoT diff --git a/mods/ITEMS/mcl_farming/textures/farming_wheat_3.png b/mods/ITEMS/mcl_farming/textures/farming_wheat_3.png deleted file mode 100644 index c42e3796597e7274237b0170904b96a42274e6f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 748 zcmV)-&^0_*_j2%wzMI29R5V9Z2=$V?%jGQh~lKn@@_(2zO? zV4axZj?lsC1_VFDwOunPhs!|-DpVYnCKzB4~;U=!7+guwrXCPWjOMA6wBi)KZ^aHo?B;bXsbCpNSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgp%~y3;`;ype}?5u%*Pm* zPcks9Vr0!?WjM^BQo|LwnVVrTD^OM^&dU?1n6V_tFPOpM*^M+1C&}C0g)8I2moOlQ zy~NYkmHii#Kfb+=n%#f<1nXD zwW+aD_y{wD$tT9Iul}8#4%DMs;u=wsl30>zm0Xkxq!^4049#^7OmqzlLkvu;jLfVI u47Cl6tPBheiq5@^q9HdwB{QuOU4xO8F;s)OPSZD_1_n=8KbLh*2~7a9BV8T< literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_1.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_1.png new file mode 100644 index 0000000000000000000000000000000000000000..be0e8e0b63b3be747cb8f470b0a772c07d7f99ea GIT binary patch literal 424 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10!YRNf#P$FG{|w8Sm`^e= ztYTz7#t^xgn=g=o;V^?r4VU*ULH=|Wh8;`{i&+_VGfHK#1|MYS@?{9x&Lxq|EMCE> z(98qWZg4E(H_$Z3k|4ie28U-i(m#Aqyjmv>eBQzwAJv zFi#i95R22v2@L73Efi`zWab|t_0LJ|d3e5`4%>uKS924^xCol<4VA2y|WoT?*lK4LB%q5@=swJ)w zB`Jv|saDBFsX&Us$iUEC*T6*Az%azX#LCFr%Gf~Lz{twLfKC6`E))&9`6-!cmAEyO T7df#3H86O(`njxgN@xNA@E>vR literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_2.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b9728791030508960c80f17f8a0983f5a56db3f8 GIT binary patch literal 644 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10Vtas3i0l9V|CvuPFf3=1 z?crxW$-tMw%nUSl6{AciU&?kal^U+d&D^Y)7#Mai@dYw)SurpiW>B0i#GlT>u$xgT zi`9FUAj4wTpzU1Z6`WkY3<}LW4C|QW3fV=oS%VL)uJ$Kk(< zKkE_$Ul2p!CZ3qXto%_7ft$Ibf!ZrM1+rL$Q%5KCUp1!W^ z4_O#l#N=dt|?os9xL`x-Yg^<3dxyx@Qdqev=o%P?7?@ZYnOPZ_Ya19@ r85k@&y5c2@hTQy=%(O~$4MtYRh7b+rI!)hz8W=oX{an^LB{Ts5s{F|c literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_3.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_3.png new file mode 100644 index 0000000000000000000000000000000000000000..85e7e8a15a0a610ddc53c1081dcfe4a845bdc42d GIT binary patch literal 833 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+0810z#_Pl)UP|Nog!Ffc4< zlI`JVKFPqB!pyLWk@*-y|DMKLEE_`l9|OTI2D?C7}hb#6|#$Fvj%SBk*Ma1KENJxn3X?@ zA#gKy&;fRVY}Vj?98#qm{;T-2E-~;0F%(SZ5y)bV-p&<&mQlQtQ#gg0H<3xkm4RU@ zt7EgEKr}<{L>@_3hQ3`4?o)(BOF2Y&k&K#?>$FQ zHH67Lhbz8XAghOO$_f@KCx)mper`jCl3AS9v$!%k_!PVu^wT&*?HGXGR~KRfg(PE1 zkY6x^!?PP{AWo9Ey9+}HtE>l*!(QU)>&pI+nUR^D&n3TVHBegL)5S5w;`G}K(ZNj) zBJ3Y7|E)Wiw>wi{(k?AU1uvI}T1(tiB5VJjzqIKcvsv)DD_^cvS`?>!H~(y3%<%8E ze^#boMBGo^h}h^U8~+(^n8-eRb7D4M&SzH38-fYt`uyK4EfU@aXnk0|_-9WO!}0qJ zoPK_i7S0j|2Y#wIbhA!r3}RcNf1s5oAV}}(rVzHbtBm+h9bI+GfmcGILnCVMqNYjA zEsbq=)-=}TZVB){N_IlcWjs>ZSixbUn%dFtBu)H9+AUiv^Am3(@(D!Q}Z43Td z&pBG6GvTD|$6bxr9v?_(;96iDu(gKoSL01)D-LDlMf@caOtMPzn-6SXoFwusxA;io z@dFVI=DYX(J>i&R->XnLZ%N#&Jw3~XJ(jI^W_zopr0H&@IJ^%m! literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_4.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_4.png new file mode 100644 index 0000000000000000000000000000000000000000..736983a2a0ce3ece5861347977404fbbedff5d76 GIT binary patch literal 975 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+081EXVrPl)UP|Nog!Ffc4< zlI`JVKFPqB!pyLWk@*;dOebIDW^UF?3@O{WRBE`mtQZ&$Gbm0MV%WjtJxh>3orPgB zE5mL^sVr8$K!%|0T;dg+T)qs!2iYZ(nHknG$rZ9IH1k9sU=KRLE>X=Tn#~%xi6`bT zD}NM2;AZaNeH{L)__HoC2xPNLm2yM_wO4WqWU&gTF!Kd56inucKg;OYEXbS4B;(4! zFqKuLkX_Q1K{Sh1Aetd}B2V8g2KOmKqNN<=^Eug#7#wQ&o7OXkJ2Rv-@keCyd(RQf z>fxKRf<-li$vlTEzFMGU7N>q12e%=EloLZ#8GrRGu8a;o1#bpXJBE}-{?rz}q&j{@ zKL!>>hU^wTHcf`m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.png similarity index 100% rename from mods/ITEMS/mcl_farming/textures/farming_wheat.png rename to mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_7.png diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index 5f98bea525..0537a80220 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -10,78 +10,52 @@ minetest.register_craftitem("mcl_farming:wheat_seeds", { end }) -minetest.register_node("mcl_farming:wheat_1", { - description = "Premature Wheat Plant (First Stage)", - _doc_items_entry_name = "Premature Wheat Plant", - _doc_items_longdesc = "Premature wheat plants grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.", - paramtype = "light", - paramtype2 = "meshoptions", - place_param2 = 3, - sunlight_propagates = true, - walkable = false, - drawtype = "plantlike", - drop = "mcl_farming:wheat_seeds", - tiles = {"farming_wheat_1.png"}, - inventory_image = "farming_wheat_1.png", - wield_image = "farming_wheat_1.png", - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5} - }, - }, - groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1}, - sounds = mcl_sounds.node_sound_leaves_defaults(), - _mcl_blast_resistance = 0, -}) +local sel_heights = { + -5/16, + -2/16, + 0, + 3/16, + 5/16, + 6/16, + 7/16, +} -minetest.register_node("mcl_farming:wheat_2", { - description = "Premature Wheat Plant (Second Stage)", - _doc_items_create_entry = false, - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "meshoptions", - place_param2 = 3, - walkable = false, - drawtype = "plantlike", - drop = "mcl_farming:wheat_seeds", - tiles = {"farming_wheat_2.png"}, - inventory_image = "farming_wheat_2.png", - wield_image = "farming_wheat_2.png", - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5} - }, - }, - groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1}, - sounds = mcl_sounds.node_sound_leaves_defaults(), - _mcl_blast_resistance = 0, -}) +for i=1,7 do + local create, name, longdesc + if i == 1 then + create = true + name = "Premature Wheat Plant" + longdesc = "Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature." + else + create = false + end -minetest.register_node("mcl_farming:wheat_3", { - description = "Premature Wheat Plant (Third Stage)", - _doc_items_create_entry = false, - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "meshoptions", - place_param2 = 3, - walkable = false, - drawtype = "plantlike", - drop = "mcl_farming:wheat_seeds", - tiles = {"farming_wheat_3.png"}, - inventory_image = "farming_wheat_3.png", - wield_image = "farming_wheat_3.png", - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5} + minetest.register_node("mcl_farming:wheat_"..i, { + description = string.format("Premature Wheat Plant (Stage %d)", i), + _doc_items_create_entry = create, + _doc_items_entry_name = name, + _doc_items_longdesc = longdesc, + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 3, + sunlight_propagates = true, + walkable = false, + drawtype = "plantlike", + drop = "mcl_farming:wheat_seeds", + tiles = {"mcl_farming_wheat_stage_"..(i-1)..".png"}, + inventory_image = "mcl_farming_wheat_stage_"..(i-1)..".png", + wield_image = "mcl_farming_wheat_stage_"..(i-1)..".png", + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, sel_heights[i], 0.5} + }, }, - }, - groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1}, - sounds = mcl_sounds.node_sound_leaves_defaults(), - _mcl_blast_resistance = 0, -}) + groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1}, + sounds = mcl_sounds.node_sound_leaves_defaults(), + _mcl_blast_resistance = 0, + }) +end minetest.register_node("mcl_farming:wheat", { description = "Mature Wheat Plant", @@ -92,9 +66,9 @@ minetest.register_node("mcl_farming:wheat", { place_param2 = 3, walkable = false, drawtype = "plantlike", - tiles = {"farming_wheat.png"}, - inventory_image = "farming_wheat.png", - wield_image = "farming_wheat.png", + tiles = {"mcl_farming_wheat_stage_7.png"}, + inventory_image = "mcl_farming_wheat_stage_7.png", + wield_image = "mcl_farming_wheat_stage_7.png", drop = { max_items = 4, items = { @@ -104,18 +78,12 @@ minetest.register_node("mcl_farming:wheat", { { items = {'mcl_farming:wheat_item'} } } }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, 0.35, 0.5} - }, - }, groups = {dig_immediate=3, not_in_creative_inventory=1, dig_by_water=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) -mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3"}, 50, 20) +mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 50, 20) minetest.register_craftitem("mcl_farming:wheat_item", { description = "Wheat", @@ -190,7 +158,7 @@ minetest.register_craft({ }) if minetest.get_modpath("doc") then - for i=2,3 do + for i=2,7 do doc.add_entry_alias("nodes", "mcl_farming:wheat_1", "nodes", "mcl_farming:wheat_"..i) end end