From 2025505b647e3c021311d0e866aa39075275b7ae Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 1 Apr 2017 04:20:02 +0200 Subject: [PATCH] 8 potato grow stages instead of 3 --- mods/ITEMS/mcl_farming/potatoes.lua | 108 ++++++++++-------- .../mcl_farming/textures/farming_potato_1.png | Bin 200 -> 0 bytes .../mcl_farming/textures/farming_potato_2.png | Bin 270 -> 0 bytes .../mcl_farming/textures/farming_potato_3.png | Bin 374 -> 0 bytes .../textures/mcl_farming_potatoes_stage_0.png | Bin 0 -> 346 bytes .../textures/mcl_farming_potatoes_stage_1.png | Bin 0 -> 393 bytes .../textures/mcl_farming_potatoes_stage_2.png | Bin 0 -> 476 bytes .../textures/mcl_farming_potatoes_stage_3.png | Bin 0 -> 569 bytes 8 files changed, 59 insertions(+), 49 deletions(-) delete mode 100644 mods/ITEMS/mcl_farming/textures/farming_potato_1.png delete mode 100644 mods/ITEMS/mcl_farming/textures/farming_potato_2.png delete mode 100644 mods/ITEMS/mcl_farming/textures/farming_potato_3.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_0.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_1.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_2.png create mode 100644 mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_3.png diff --git a/mods/ITEMS/mcl_farming/potatoes.lua b/mods/ITEMS/mcl_farming/potatoes.lua index 6c69fb30..cca74036 100644 --- a/mods/ITEMS/mcl_farming/potatoes.lua +++ b/mods/ITEMS/mcl_farming/potatoes.lua @@ -1,48 +1,54 @@ -minetest.register_node("mcl_farming:potato_1", { - description = "Premature Potato Plant (First Stage)", - _doc_items_entry_name = "Premature Potato Plant", - _doc_items_longdesc = "Potato plants are plants which grow on farmland under sunlight in 3 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.", - paramtype = "light", - paramtype2 = "meshoptions", - sunlight_propagates = true, - place_param2 = 3, - walkable = false, - drawtype = "plantlike", - drop = "mcl_farming:potato_item", - tiles = {"farming_potato_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, -}) +-- Premature potato plants -minetest.register_node("mcl_farming:potato_2", { - description = "Premature Potato Plant (Second Stage)", - _doc_items_create_entry = false, - paramtype = "light", - paramtype2 = "meshoptions", - sunlight_propagates = true, - place_param2 = 3, - walkable = false, - drawtype = "plantlike", - drop = "mcl_farming:potato_item", - tiles = {"farming_potato_2.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, -}) +for i=1, 7 do + local texture, selbox + if i < 3 then + texture = "mcl_farming_potatoes_stage_0.png" + selbox = { -0.5, -0.5, -0.5, 0.5, -5/16, 0.5 } + elseif i < 5 then + texture = "mcl_farming_potatoes_stage_1.png" + selbox = { -0.5, -0.5, -0.5, 0.5, -2/16, 0.5 } + else + texture = "mcl_farming_potatoes_stage_2.png" + selbox = { -0.5, -0.5, -0.5, 0.5, 2/16, 0.5 } + end + local create, name, longdesc + if i==1 then + create = true + name = "Premature Potato Plant" + longdesc = "Potato plants are plants which grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature." + else + create = false + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_farming:potato_1", "nodes", "mcl_farming:potato_"..i) + end + end + + minetest.register_node("mcl_farming:potato_"..i, { + description = string.format("Premature Potato Plant (Stage %d)", i), + _doc_items_create_entry = create, + _doc_items_entry_name = name, + _doc_items_longdesc = longdesc, + paramtype = "light", + paramtype2 = "meshoptions", + sunlight_propagates = true, + place_param2 = 3, + walkable = false, + drawtype = "plantlike", + drop = "mcl_farming:potato_item", + tiles = { texture }, + selection_box = { + type = "fixed", + fixed = { selbox }, + }, + groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, + sounds = mcl_sounds.node_sound_leaves_defaults(), + _mcl_blast_resistance = 0, + }) +end + +-- Mature plant minetest.register_node("mcl_farming:potato", { description = "Mature Potato Plant", _doc_items_longdesc = "Mature potato plants are ready to be harvested for potatoes. They won't grow any further.", @@ -52,7 +58,7 @@ minetest.register_node("mcl_farming:potato", { place_param2 = 3, walkable = false, drawtype = "plantlike", - tiles = {"farming_potato_3.png"}, + tiles = {"mcl_farming_potatoes_stage_3.png"}, drop = { items = { { items = {'mcl_farming:potato_item 1'} }, @@ -62,7 +68,13 @@ minetest.register_node("mcl_farming:potato", { { items = {'mcl_farming:potato_item_poison 1'}, rarity = 50 } } }, - groups = {dig_immediate=3, not_in_creative_inventory=1,dig_by_water=1,dig_by_piston=1}, + selection_box = { + type = "fixed", + fixed = { + { -0.5, -0.5, -0.5, 0.5, 1/16, 0.5 } + } + }, + groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -114,8 +126,6 @@ minetest.register_craft({ cooktime = 10, }) -mcl_farming:add_plant("plant_potato", "mcl_farming:potato", {"mcl_farming:potato_1", "mcl_farming:potato_2"}, 50, 20) +mcl_farming:add_plant("plant_potato", "mcl_farming:potato", {"mcl_farming:potato_1", "mcl_farming:potato_2", "mcl_farming:potato_3", "mcl_farming:potato_4", "mcl_farming:potato_5", "mcl_farming:potato_6", "mcl_farming:potato_7"}, 50, 20) + -if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_farming:potato_1", "nodes", "mcl_farming:potato_2") -end diff --git a/mods/ITEMS/mcl_farming/textures/farming_potato_1.png b/mods/ITEMS/mcl_farming/textures/farming_potato_1.png deleted file mode 100644 index 8763320c7e6c4b4dec214340f6e06e1302073189..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT85&=FTuK)l4XILxFutS_- zj~K%-afU|%OjG$-vssVClo~KFFff(``2{mLJiC#`z`zja>Ealo5&ZV#M!`b{A}kk| z|D2ROwZVDG;ntDI^N!f zJ{o~1OmD19=ycr8^J>k5d!6@I)-rEze!4NZZ?5ojFOL1SQ{;0P7#J8lUHx3vIVCg! E0D8bm7ytkO diff --git a/mods/ITEMS/mcl_farming/textures/farming_potato_2.png b/mods/ITEMS/mcl_farming/textures/farming_potato_2.png deleted file mode 100644 index ba12e7128c8e9e59b9c90faaea937aa889cc87ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 270 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT8(g8jpuK)l4XILxFutS_- zj~K%-afU|%Ox?UpQ~6l4S?kVuC^IlHFqQ=Q1v5B2yOGAgz_8HM#W6%e^6o*!AZ9}m zh6~$O_GfEH^*>;+p2F-RF#l!B`#`qlBZav_ArCqBJipIbZ&JR9^Sj>eXVbmS-%2H} z61f;!7Sfxezv{({wG)%|t6sAP@_zN25*}=R#eI?3WuXeA68mdyIVbAYu<|!?TxQ&u zHSG@1?SlnZEoNUz;zBS? YJy+zy?2Q#33=9kmp00i_>zopr0N8D3M*si- diff --git a/mods/ITEMS/mcl_farming/textures/farming_potato_3.png b/mods/ITEMS/mcl_farming/textures/farming_potato_3.png deleted file mode 100644 index 29aec03fd65f38697cc1324e193c5965aa83e596..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 374 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT8>H$6>uK)l4XDAb9=n`k> z6J=N-!>~@0VTU%u0cnN@QdY}6r?x3A-ei67e8jf&U?Bzu2F8*gzhDN3XE)Lq7#RL~ zx;Tbt1V8QA=ylkEp{?F~D)V%+vf`a{+TG_LJlc|ddCgLRU0o)t+r0H|ssluP zWyz@6XjS7GuR3~f1;$KW+F{4!Q8{N;sGFfL_xexIyD#ZUPc=x`Wah6vH@0h0UXiQh zfz#oI6HXiWRtjz6nUQm5@2u{swLf3Q<})fs36^l5<}aH6M8u^vSE_8)n$$hlZ%cX{ z;5uh5deg%1lYqjN>SuA{nn(Taonvp{Hm@kp+wt-4fi#8!+g<+>Oa8unQN?iJ`48Kg dxr}uTU%~=U?^U*zWME)m@O1TaS?83{1OQS@meBwJ diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_0.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_0.png new file mode 100644 index 0000000000000000000000000000000000000000..c8e33cd70a6e7a45cdb13efcedb14d9e347cb06f GIT binary patch literal 346 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT8Ea{HEjtmSN`?>!lvVtU& zJ%W507^>757#dm_7=AG@Ff_biU???UV0e|lz+g3lfkC`r&aOZk1_lO+0G|-o|Ns9p z>=0*oB*3s%oZ*-_!yYl#Y}Wt(|2s|om&m}tz*rLG7tG-B>_!@hljQC0!Y-EB@tT2w zfxX1j*OmPt3nL4ghJ_eQ69WT-k*AAeh{pNk1PNAWX@f_?0Stm{3Wpe#4zP%~a?)Fi6yBFMh1rF zx&|h?28JO9CRPUKRwfqO21Zr}2I-kBAip9s!lvVtU& zJ%W507^>757#dm_7=AG@Ff_biU???UV0e|lz+g3lfkC`r&aOZk1_lP{0G|-o|Ns9p zJQ85oBgU{+oMDGJ!!dEDseG*2tpET2U;qAoI|Bm)V@Z%-FoVOh8)+a;lDE4HLkFv@ z2Ll5Gdx@v7EBixcMrL+Cm;9>L3=9l$o-U3d8t0P}Bv_f*B|dUE%wY0xVp4EA=)iC+ zoMH16$43H&YHn<-ZfvP)6QVY77z-Ouc*!He5x}xKAvuU))*A+uh^dhWl|0!TYS|o` zt|~C-Oo(9!37f-kC5AzTf!~nrE_ccN8U_Xi)e_f;l9a@fRIB8o)Wnih1|tJQb6o=y zT?4}q0~0F)b1P#DZ381K1B2W(yfP>na`RI%(<-4FjKLa=K^hEAv<(cc3=H=4{0d=U PU|{fc^>bP0l+XkKJ_%`f literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_2.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_2.png new file mode 100644 index 0000000000000000000000000000000000000000..c7f3d84e25008fc5f9e8382dc7f59185971c7bf7 GIT binary patch literal 476 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT8Ea{HEjtmSN`?>!lvVtU& zJ%W507^>757#dm_7=AG@Ff_biU???UV0e|lz+g3lfkC`r&aOZk1_lPX0G|-o|Ns9p zJQ85oBgSw{oMDGJ!&-5sseDY`ysX)*|NsAw<8+wFz`(#*666=m;PC858i;_2(k{*alGnVruiziKrD1H(E`7sn8d^LP6$@*Xk}aGu*T<$lOZ2EmdB z7oCP9Olu<;6cr8G;?MNfih8`|c%r;>&*z^!e{L5>PYAoaMNsC~)&`Z^$u$?v792|5 zySMfx=L>CZ^+G?UK858mTbJIvabVTFGly($N3P9MIQ8pOHsjnRmKuE~&hoAY(Zri>+he{)h=UbTjF_|;>i>Kx{{ZRSA zu)Lq=S^T-#4GatnswJ)wB`Jv|saDBFsfi`23`Pcq=DG$Zx(0?J1}0VprdFnA+6G2e z1_u8**Z)S*kei>9nN|taU<}q^Y-M0>WoV*pU}$Avu&3u&2m=EHgQu&X%Q~loCIF+4 Boj(8o literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_3.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_3.png new file mode 100644 index 0000000000000000000000000000000000000000..02ea97b20706a59153b3a76c3954a584e6ea7bc2 GIT binary patch literal 569 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT8Ea{HEjtmSN`?>!lvVtU& zJ%W507^>757#dm_7=AG@Ff_biU???UV0e|lz+g3lfkC`r&aOZk1_lPL0G|-o|Ns9p zJdk2IAkDBshM`NGVTZQWGEaswVTN^*i#J(MZBt_C6Fqo7;{X5uFRJD37#J8BOM?7@ z862M7NCR<_yxmEaloasFw)t>0k> zk(T+Q0v9%B?@s@I^O)+#yf;%;-&NIn!LyU0Pvn%xMiE6T^;5Dr7cW0yl3~{V&+ye3XE$XSzixm-?ifUkuyj4`HEI(9QL|)f@$LWpLwitiOI=XXFTR@ zUs*CWv^am3mGhSFv}nG~=XUMe`TE!NO|Rc(F^C_3_xA3~n=i9}Jp6HS|38ig!Z&=a zw~PLlZew6zP%UwdC`m~yNwrEYN=+