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!ia0y~yU{C;I4rT@h2A3sW#~2tG>;rs4T>t<7&#;)4VL21S zDn^DKObojj84fcrA7fxX$-w2yz!%8CpUxs)!6}i4ESpJwTutCtjsOdljhmk~k guaAoQLJsLU-x&X}S(cq=U|?YIboFyt=akR{01|UZp8x;= diff --git a/mods/ITEMS/mcl_farming/textures/farming_wheat_2.png b/mods/ITEMS/mcl_farming/textures/farming_wheat_2.png deleted file mode 100644 index 4d721efbd65314cb85e8b3aa113b19822ff24c74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 625 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4rT@h2A3sW#~2tG{s;Jkxc>kDpJ6I1!(vv3 z+6=93Jpml)WM7`Ut$xO^G74HM@MT?M$eqYjFqx-h7H9c<&gxlQP3sx@b}>v@!LqsSuo43U17k^$ zUoeBivm0p)42%k%E{-7*l5Y<>b_*5CFkE<^?^d{dYgBmaQjtY(gB)cKseZV$(D_36 zJMWU$#xC6*>&~9(I=escmf4Bm?e{+4-(UEq;Z3XcA;y{aWyG)l(<^tkP`J`}=hHcV zbt%Qlb<;fGW#8HJ>GVbRt#3^A++{s)aBlso-n-AfW$wh9-aJFo$1C?v@R?u2we@(G z^7huf-!|*}tV#^O{`+XOwc^WNGLQZkpIS7>qBv2B)3ejuZj+SG?OUraL`9uFCupOlqzAH+RN?9AKe?HVa~5QRj#{e-^R!}ug>fKnyhf;*X+w@W48U%T3N8x c@EddWT8~3pv;z1T7#J8lUHx3vIVCg!00aT#hyVZp 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 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4rT@h2A3sW#~2tGjRJf^T>t<7&%n&Uz{bGD z!@wfUz^1^!rpUmi%)q9>z^2K-WyQd2$iNrKz!${8Z^XbK#UK#PAQZ$Pl)xmE$RwP? zESkkCn$0Sa%q(fnAX&&RS;Q{o#31F&AeF@`Rmvf4#USI#AX~{PSI90`%cao7qtMKw z)WxS#!=>uSV3^2e8pmp$!)0B{Yn#Gum&V~x!|xQt=N``I*(Kx^#qS%-=bykIl)@jB z${#dOAb2r)^F=16GB7YOmIV0) zGdMiEk;cHlnBnQ-7-Hdn_WbRjrT`JP2cc@NZL{9`R%#T^Zk@XzWDE1s#K5qSq>1gD zgzo`-tnt{w8a426pB3&+{DOw|qX?xA~v)c4vq8 zjlR-nzB?9q@ErIUw6I+B(1nNuNxAUEL>Y@-o0{g+4LocPPd3ON0Hsh`E$?yDk^?3_0LSvle0hCS0AiSHJ#j`tmWT% vS<=7llz(ITe4)pSrmBlnyb62Fw~xV-DW!lvVtU& zJ%W507^>757#dm_7=AG@Ff_biU???UV0e|lz+g3lfkC`r&aOZk1_lPj0G|-o|Ns9p zEN5aq#=v}%fngORYZfcRVFr~NuE@>Y42xO+|NpNO=jF-3z`$4%`sfLl#CBG5J%Oo9{3%FlczXIEHAPPfn0vJRdP{kVo554k%6JP zu7QcJfnkV&iItI=m4TtQfsvJg!9mfvmr*q2=BH$)RibM!vNDEhFxP4N#=yY9;OXk; Jvd$@?2>`MqT^;}c 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!ia0y~yU{C;I4rT@h2A3sW#~2tGSkfJR9T^xl_H+M9WCckk zdj$D1FjT2AFf_C;UjAaCe_Hg`sGW_|ep#{CTn%?ixT0<)ML6Z04+FbPgz(i352Xl!7T z_&)2*B?blt)e_f;l9a@fRIB8o)Wnih1|tJQb6o=yT?4}q0~0GFb1P#5Z381K0|Pew hU%OB=|dPaqa*B 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!ia0y~yU{C;I4rT@h2A3sW#~2tGSkfJR9T^xl_H+M9WCckk zdj$D1FjT2AFf_Cx*R zfoO(;$vp9A8AS@&C0!Xrvsl@U7-U=-{{R0Uu66q&0|NtNNswPKgTu2MX&_FLx4R2N z2dk_H0|NtliKnkC`$HB+7BTr#nVau0Ffi=(ba4!^IQ{nQaiJy$0hSA9?mXEMVUB`g zg03QlzyJSNT{DHNwd#Y{{AJ7H&oV@As_}UzenR{o>(QWByZ%UNzg(bouAb49@fDMa z-0n0V55bIum--x*&t_oRTgSlWlECxWeud6Pfu4Ph8<~2pa4ueOz=YAHavA#p2M!Oe z2aE<&cQR%#%ywzs8?$#SPrIV>Kpdb_q{Md1GKhW#72-;j@Kx4d?7v7Szr z%>gMc`;VLJH?C)T!MMZrplk)J(4(s5hd^;}&$`6G7sOC7nMWXtHF`T&{8>ivN>1SvX5K_5 z8CM2|sjQC8f&$SDxf6LLT^agzF}P0=5-sHrDP$MTVr4gCaH!!gpU;`n#4qm5(6pW* zBAefPj-YA?lX(tTe6>JU58sp(EK*JkQDywxh72XMIICxIWpwZIWM=1c$*)??z`&^Q z>Eak-ar*6r=-?&?5%v$4|JEJM+np&eX_uCwf|tufttD=_*2C*&CKhVk(5Tti?QwZDJRYv@$j;=c8 zz$>B9p%JxrQPU*mmd3U_YZ~ivw*+{bzrMjBdp&JG$AZ+v#fj#(WmfQ5SY8lZke!`d zkZ-d{==-&gwgrE!=Nv83nQ+qfcn(G>v=o%P?7?@ZYnOhl{ zYa19@85sDoAHI&FAvZrIGp!P;!5FN;*vi1%%FsmHz|hLTU{BAl5C#SY22WQ%mvv4F FO#r5@5eO$0S$CuF%XAeSkga0J}srmuNO? z;3l4!!>s&K41t@ugZFXxuj0?T#2}E(Dpkr6y`4+El2agyRXBy2FNmRFGEe+jM#pAB z-b5xDR|bZutRjW%lCBJ*S*!xl47n3|`gSq6PZ1I=~-;@|?dW)HZCMKypWAs>jK#AGwGS6upBb`$= zSN{KJuB{1ZHa3eZxgPg+&+jvPjJZGXr>96r$o|%rm@je7(9&S86xXuC{oHAHa<=iG zNi=xhz{;vAy2UXe6;9W`pBI2c{f8hG>%m+n75T6-0Q9 zC0xp82naU4$Xg@7f#b-_y(|g`f^t-5^%x3#Yz&$8UAVEN&_JIK7w~ncsjF@&Ncc$LB)49T9La?9b@@EFTTbMr;J>y~KW4y}D#Po2B zQ?{e;`Oh3Hp6@!A`KmSQf}?H#7u%*o)(cL=PcxVxpi!;xyk`FXN7~m#7i)-n2kbS} z3R+qfy-qS$4UpLGkYS=D?sXU48f+wL@GozF|3v41l+ z5ZGW7;QAo6MmYNY+HH3?zP_;aw(jDqZzIo|mCSB?$-cMmZ=)k~qd$Md2UcF;*sve= z$@vTn45}rr5hW>!C8<`)MX8A;sSHL2hUU5kCb|ZOAqFN^MrKxqhS~;3Rt5&V`{(+i jXvob^$xN$6*I;C24Ao$+)AWsjfq}u()z4*}Q$iB}7b!V` literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_5.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_5.png new file mode 100644 index 0000000000000000000000000000000000000000..7aec173b91a94487f240cd987ac33fd456cbb2ef GIT binary patch literal 941 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4rT@h2A3sW#~2tGSkfJR9T^xl_H+M9WCckk zdj$D1FjT2AFf_C0X`wF|NsAw z+{`VS%^H82$+Jr+a-KlSb}peHhSWoB;j8%Lk29;(aB*2N$klR%EaewUWD1%m5WbdI zBAGdHBac)TD_U zKr}J^Y<}|`F6&a>_)-DWIM%A^-1YN0r>tNpnaE?9$W}dzi$$10 z%84N;h2JiXqiZc=b~Ar=3!juTLrS#(nGJak|2LA+pej^6o zSUxso1~v@_HU$Q+D1J$EhRg>3*kXZ@bbdBPhM-h_1~vvJ9tH+x2KR8j&`g2<|Nooy z3(aO=U|=i>@(X5gcy=QV#7XjYcVXyYmGxj?U|=ut^mS!_$jr#h&gYU}wVHu}F~ifv zF~s8Z+4GsfO#vco512*YF3p{G!Iblr){9W3Lz{{?wWn{0@rpKB{r|r>lc&13d-|_S ze?Od?``OMoo$tW@>MI@&|3!Uzm<%intW3EKF8iIcFuZM>vX0+C*5G|Zt6sz#VcQK` z-n{hLV_(Lw=D;hdHT=xd`_Afbc$(hG{2}*0Qym{8i%f%tILp4qxeEJlGj0(OnaIB4 zfgHnGrR}bI4+OXK>n+H2_|DMG=#=RB%y2u0prMRw&Jp2f$^wao?Xe9q3W;?b3Oqu| zg{po(m;?BeZ%tgWY2ySgE!T=iOmCPn4L&5Xxqm%U$mFfQfTQY@$*PWDGnr0VPAgzv zGJ!j&xzXX0%juM-I-c@# zD85r#8`4z&zz`)?? L>gTe~DWM4fmu4|0 literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_6.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_6.png new file mode 100644 index 0000000000000000000000000000000000000000..972b3136b19fe82bf5179e74934b71427f706cde GIT binary patch literal 958 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4rT@h2A3sW#~2tGSkfJR9T^xl_H+M9WCckk zdj$D1FjT2AFf_CCw@n^b(=5)&c>?ikd4+-)QnquY9%7rclr`%TL(*1ml^QO&LiV`TeA0Pr zowK-%BA6#EU=N)lD3Q#ZxRFOHi*?>6hN=!eqe$ijI~W|YI43V>?VQD_>&H;r$2)li zvuP}=)&zltdl{?~*`}{%k~C+SvzF1nOKAFPX45!U_j2Bj={!}Pe6}g<(^fK@#j!dU za(7JUp0a{v&N@Z`eTJq9ymQwxcvSI~HS+6tGtAqn5{PZEBqpF45z4ab54gXh~TBVN20Yi~H@cz`{FVcN9zBjz0I)_giE z)l%0euqNNZfx&sJf(oYCIkCnZkdc|cB;@lIod;_;)1P14so22%`_QB&B|W(*Zzi2> ztju)HZTDTpt5QGJUaY}wi?(LM@y$k>!hA{7uZym_WYih7g01j^h{H+UM9mcwr3zz? zKRvM8Jdfvi!JRI~u*oLLOc|HdCN}lVUb!u!yQrZ0`i}IKuK5}^HdX!e80OvbpC@8- zIeqozcUvqgDr+l0-`nf=`(AT@)%H5=hI{GjwHf0rpXIz$-u@MoT~te4BT7;dOH!?p zi&7IyQW=a449#^7OmqzlLkvu;jLfWz47Cl6tPBjA4Q8!lU|>LK$jwj5OshoKU}R+s W)nKmE^o@amfx*+&&t;ucLK6VSLQ7Eq literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/farming_wheat.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_wheat_stage_7.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 5f98bea5..0537a802 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