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 6c69fb30d1..cca74036a2 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!ia0vp^3LwnF3?v&v(vJfvi2$Dv*Z=?jGprS7*dflaM~vZ^ zIKv|Wrm1|a*{nxmN)3Q&7)yfuf*Bm1-ADs+;yhg(Lo|Zlp4=#S$UubU;_{!9lBYIU zPhcvV{=wV8nR(g&Ba8;lE?$S+s;mF}lzr=6kyW>(<>KeP?uVwV_cmEPv(ZN*@Pz4& wbqSr0yLn!%d2p}u-pX3$?afa&2KUVse(uGwzjlgz4$vkBPgg&ebxsLQ0D8bm7ytkO 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!ia0vp^3LwnF3?v&v(vJfv=>VS)*Z=?jGprS7*dflaM~vZ^ zIKv|Wrfy!QseG*2taax+l!3|^OM?7@862M7NCR>fdb&7$<-np4ZZE5H2dVRzRjfBu?y_i6po_p9fMT$sJF R!UO1722WQ%mvv4FO#s+!XGZ`4 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 zcmV-+0g3*JP)XHyaY0004WQchC?VHc5}I$hew~m#e{3qtfdgTiZrW+OD@?Ygxswy z5$EhaLC!ZY59MGdU%?+fKE5CLpCd1S4)geHdv0PV0NcQ}fRzBz6tG6Y>NjFEg{?vm zBNWGcnQCyX!h&}>Hd7PS6Mlnqbukz=M(k>g7FkrGaPbZySilT0EMH#@$ zS8KPD(EtDd 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!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgArasc;`;ype}*06437jD z)`~M66KB{X#+uCv6m**WFA=DQu_VYZn8D%MjWiG^$=lt9T`aNVHITzz;_2(k{*Z-{ zg-ydkjHL-EWaR1M7@~1LIYENeS=!){Z~%iKo5CSRr2{PDt(+_d1_sS65j+Y^YdCp$ zaum#rCmdv8@O5UI^LAr%J5aZ3iEBhjN@7W>RdP`(kYX@0Ff`XSFwr$I3^6dVGBCF? xvCuX!vNAA8&tw7l6`>(FKP5A*5?zCtm5BjF!zsy`4}cmNJYD@<);T3K0RY_cSXKZ4 literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_1.png b/mods/ITEMS/mcl_farming/textures/mcl_farming_potatoes_stage_1.png new file mode 100644 index 0000000000000000000000000000000000000000..2386a859ec7b1b197def9748ca89ec4878ee166e GIT binary patch literal 393 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgAsyfo;`;ype}+c_412^F z)`~Oi5N9|h&NP*eHJcSEzW)9FcAzrGk|4ie28U-i(m# zAu}U0JD*E_)oP$noTrOph{pNk1PNAVc8QN14l|fMoR}1x4mvO#3uo9o#qp7Vp_&^T zs~cOY+JvYL9LB=N6JGL&a0IZdPDl=7nDvH1C1PsiK_yQ%hgvp=rmG4JIul|TLc-=S zT!~>&Vc<7pyUSfNzXoWNYKdz^NlIc#s#S7PDv)9@GB7mPH89aNFbpv;u`)2XGPck* zFtRc*$X&xLgQ6ifKP5A*5~{%%tic$h!O%q8z!0cmPtUIqpaup{S3j3^P6NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgAs65i;`;ype}+c_412^F zj)^nu5NB8`&NP*eshgKIn-wS($LTN;sFJZH$S;_|;n|He5GTpo-G!lpRn`N@VK4FY zb!C6Z%*f2n=aOHw8Yr~R)5S4FwW1zxIi4u*-1GS-&!5|c(G$Y%ZV{CEwY5Rzc5=-{vjvAz_wKE|$@xNCTfNYa zsZU{f%+{qhZyZ=P@5~{a+mUOt6i)s6l+8FdiKRxLiL<=x!8D0#%kmhxW>-BXi79Dj zjr|&YH=P|Oy@*tAw3?m$oZGf<&!N)D;`tWleoW@f{o<+lO+QqAFf8xqc@}?eb_3Am zswJ)wB`Jv|saDBFsX&Us$iUEC*T6*Az%azX#LB?b%G6BTz{twL;6La3-zXY#^HVa@ mDxn&T!5WOM49u+zO|%URfg1Mo{0aeTVDNPHb6Mw<&;$UZkDWgN 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!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgp%vg0;`;ype})HA3&}Pi8Jibwp!-NP$tZ#1!@41J;p&qn~2y{MMA1L|Td3GxeOaCmkj4a7^SR_#tp*DH_jGX#(K!FK-`4N2gGkGKQGp8^vv;R| zzj;jcW8Rx7tM97nz2Mo&&?j=rW212OC7#SFv>l&Eo8W@Hcm{=K@Ss7Sp8yHy`81OtyJcyzpH$NpatrDui i7_7nA%D~*p&_vt75U62K&#w@m1_n=8KbLh*2~7aNF4b88 literal 0 HcmV?d00001