From 7270ca3a28444dd92a467d083c301305efdce7ab Mon Sep 17 00:00:00 2001 From: Nemo 08 Date: Thu, 5 Apr 2012 23:07:12 +0400 Subject: [PATCH] rm grow --- shit/simple_grow/init.lua | 132 ------------------- shit/simple_plant/depends.txt | 1 - shit/simple_plant/init.lua | 137 -------------------- shit/simple_plant/textures/n1.png | Bin 212 -> 0 bytes shit/simple_plant/textures/n2.png | Bin 221 -> 0 bytes shit/simple_plant/textures/n3.png | Bin 216 -> 0 bytes shit/simple_plant/textures/n4.png | Bin 218 -> 0 bytes shit/simple_plant/textures/n5.png | Bin 217 -> 0 bytes shit/simple_plant/textures/n6.png | Bin 239 -> 0 bytes shit/simple_plant/textures/n_seed.png | Bin 260 -> 0 bytes shit/simple_plant/textures/seed0.png | Bin 184 -> 0 bytes shit/simple_plant/textures/seed_strange.png | Bin 287 -> 0 bytes shit/simple_plant/textures/sp1.png | Bin 154 -> 0 bytes shit/simple_plant/textures/sp2.png | Bin 161 -> 0 bytes shit/simple_plant/textures/sp_fin.png | Bin 210 -> 0 bytes shit/simple_plant/textures/sp_stem.png | Bin 214 -> 0 bytes shit/simple_plant/textures/sp_stem2.png | Bin 244 -> 0 bytes shit/simple_plant/textures/stage1.png | Bin 117 -> 0 bytes shit/simple_plant/textures/stage2.png | Bin 118 -> 0 bytes shit/simple_plant/textures/stage3.png | Bin 135 -> 0 bytes shit/simple_plant/textures/stage4.png | Bin 188 -> 0 bytes 21 files changed, 270 deletions(-) delete mode 100644 shit/simple_grow/init.lua delete mode 100644 shit/simple_plant/depends.txt delete mode 100644 shit/simple_plant/init.lua delete mode 100644 shit/simple_plant/textures/n1.png delete mode 100644 shit/simple_plant/textures/n2.png delete mode 100644 shit/simple_plant/textures/n3.png delete mode 100644 shit/simple_plant/textures/n4.png delete mode 100644 shit/simple_plant/textures/n5.png delete mode 100644 shit/simple_plant/textures/n6.png delete mode 100644 shit/simple_plant/textures/n_seed.png delete mode 100644 shit/simple_plant/textures/seed0.png delete mode 100644 shit/simple_plant/textures/seed_strange.png delete mode 100644 shit/simple_plant/textures/sp1.png delete mode 100644 shit/simple_plant/textures/sp2.png delete mode 100644 shit/simple_plant/textures/sp_fin.png delete mode 100644 shit/simple_plant/textures/sp_stem.png delete mode 100644 shit/simple_plant/textures/sp_stem2.png delete mode 100644 shit/simple_plant/textures/stage1.png delete mode 100644 shit/simple_plant/textures/stage2.png delete mode 100644 shit/simple_plant/textures/stage3.png delete mode 100644 shit/simple_plant/textures/stage4.png diff --git a/shit/simple_grow/init.lua b/shit/simple_grow/init.lua deleted file mode 100644 index 53a3149..0000000 --- a/shit/simple_grow/init.lua +++ /dev/null @@ -1,132 +0,0 @@ ---[[ -{ - { - k_grow_time, -- k * STANDART_GROW_TIME - image, - drop, - groups, - chance - } -} -]]-- - -STANDART_SPGROW_TIME = 120 - -local TRANSFORMS = {} - -function register_plant_with_full_stages(grow_table) - - for stage in ipairs(grow_table) do - if grow_table[stage].chance > 1 then - grow_table[stage].chance = 1 - end - - minetest.register_node(grow_table[stage].name, { - description = grow_table[stage].name, - drawtype = "plantlike", - walkable = false, - tile_images = {grow_table[stage].image}, - inventory_image = grow_table[stage].image, - wield_image = grow_table[stage].image, - paramtype = "light", - drop = grow_table[stage].drop, - groups = grow_table[stage].groups, - sounds = default.node_sound_leaves_defaults(), - }) - - if (#(grow_table) > stage) then - minetest.register_abm({ - nodenames = { grow_table[stage].name }, - interval = grow_table[stage].time * STANDART_SPGROW_TIME, - chance = grow_table[stage].chance, - action = function (pos, node) - if math.random() < grow_table[stage].chance then - minetest.env:add_node(pos, {name = grow_table[stage + 1].name}) - end - end - }) - end - end -end - -function register_simple_plant(name, final_description, stage_max, stage_time, image_template, final_drop) - -- number of stages of growth [1 .. stage_max] - -- image template .. [1 .. stage_max] .. ".png" --> png - local ngrow_table = {} - local cur_drop = '' - - for i=1, stage_max do - cur_drop = '' - if i == stage_max then - cur_drop = final_drop - end - - table.insert(ngrow_table, { - name = name .. i, - time = stage_time, - image = image_template .. i .. ".png", - drop = cur_drop, - groups = {snappy=3}, - chance = 0.6 - }) - end - - register_plant_with_full_stages(ngrow_table) -end - -function register_transform_plant(grow_table) - - for stage in ipairs(grow_table) do - if grow_table[stage].chance > 1 then - grow_table[stage].chance = 1 - end - - minetest.register_node(grow_table[stage].name, { - description = grow_table[stage].name, - drawtype = "plantlike", - walkable = false, - tile_images = {grow_table[stage].image}, - inventory_image = grow_table[stage].image, - wield_image = grow_table[stage].image, - paramtype = "light", - drop = grow_table[stage].drop, - groups = grow_table[stage].groups, - sounds = default.node_sound_leaves_defaults(), - }) - - if (grow_table[stage].transform ~= nil) then - - TRANSFORMS[grow_table[stage].name] = grow_table[stage].transform - - minetest.register_abm({ - nodenames = { grow_table[stage].name }, - interval = grow_table[stage].time * STANDART_SPGROW_TIME, - chance = grow_table[stage].chance, - action = function (pos, node) - if math.random() < grow_table[stage].chance then - local rnd = 1 - if #(TRANSFORMS[node.name]) > 1 then - rnd = math.random(#(TRANSFORMS[node.name])) - end - local transform = TRANSFORMS[node.name][rnd] - - if transform.oldname ~= nil then - minetest.env:add_node(pos, {name = transform.oldname}) - end - - local trans_coord = { - x = pos.x + transform.x, - y = pos.y + transform.y, - z = pos.z + transform.z - } - if minetest.env:get_node(trans_coord).name == 'air' then - minetest.env:add_node(trans_coord, {name = transform.newname}) - else - minetest.env:add_node(pos, {name = transform.newname}) - end - end - end - }) - end - end -end \ No newline at end of file diff --git a/shit/simple_plant/depends.txt b/shit/simple_plant/depends.txt deleted file mode 100644 index 3a4ca9b..0000000 --- a/shit/simple_plant/depends.txt +++ /dev/null @@ -1 +0,0 @@ -simple_grow diff --git a/shit/simple_plant/init.lua b/shit/simple_plant/init.lua deleted file mode 100644 index 818fc1d..0000000 --- a/shit/simple_plant/init.lua +++ /dev/null @@ -1,137 +0,0 @@ -minetest.register_craftitem('simple_plant:seed0', { - inventory_image = 'seed0.png', - stack_max = 99, - usable = true, - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to node - if pointed_thing.type == 'node' then - n = minetest.env:get_node(pointed_thing.under) - if n.name == 'default:dirt_with_grass' then - minetest.env:add_node(pointed_thing.above, {name='simple_plant:splant1'}) - end - itemstack:take_item() - end - return itemstack - end, -}) - -register_plant_with_full_stages({ - { - name = 'simple_plant:splant1', - time = 0.5, - image = 'stage1.png', - drop = '', - groups = {snappy=3}, - chance = 0.7 - }, - { - name = 'simple_plant:splant2', - time = 0.5, - image = 'stage2.png', - drop = 'default:iron_lump', - groups = {snappy=3}, - chance = 0.7 - }, - { - name = 'simple_plant:splant3', - time = 0.5, - image = 'stage3.png', - drop = '', - groups = {snappy=3}, - chance = 0.7 - }, - { - name = 'simple_plant:splant4', - time = 0.5, - image = 'stage4.png', - drop = 'default:clay_brick 4', - groups = {snappy=3}, - chance = 0.4 - }, -}) ---------------------- -register_simple_plant('simple_plant:n', 'Odd flower', 6, 0.5, 'n', 'simple_plant:n_seed 5') - -minetest.register_craftitem('simple_plant:n_seed', { - description = 'N seed', - inventory_image = 'n_seed.png', - stack_max = 99, - usable = true, - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to node - if pointed_thing.type == 'node' then - n = minetest.env:get_node(pointed_thing.under) - if n.name == 'default:dirt_with_grass' then - minetest.env:add_node(pointed_thing.above, {name='simple_plant:n1'}) - end - itemstack:take_item() - end - return itemstack - end, -}) ------------------------- -minetest.register_craftitem('simple_plant:strange_seed', { - description = 'Strange seed', - inventory_image = 'seed_strange.png', - stack_max = 99, - usable = true, - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to node - if pointed_thing.type == 'node' then - n = minetest.env:get_node(pointed_thing.under) - if n.name == 'default:dirt_with_grass' then - minetest.env:add_node(pointed_thing.above, {name='simple_plant:sp1'}) - end - itemstack:take_item() - end - return itemstack - end, -}) - -register_transform_plant({ - { - name = 'simple_plant:sp1', - transform = {{newname = 'simple_plant:sp2', x =0, y=0, z=0}}, - time = 0.5, - image = 'sp1.png', - drop = '', - groups = {snappy=3}, - chance = 0.7 - }, - { - name = 'simple_plant:sp2', - transform = {{newname = 'simple_plant:sp_fin', oldname ='simple_plant:sp_stem', x =0, y=1, z=0}, - {newname = 'simple_plant:sp_fin', oldname ='simple_plant:sp_stem2', x =0, y=1, z=0}}, - time = 0.5, - image = 'sp2.png', - drop = '', - groups = {snappy=3}, - chance = 0.7 - }, - { - name = 'simple_plant:sp_stem', - transform = nil, - time = 0.5, - image = 'sp_stem.png', - drop = '', - groups = {snappy=3}, - chance = 0.7 - }, - { - name = 'simple_plant:sp_stem2', - transform = nil, - time = 0.5, - image = 'sp_stem2.png', - drop = '', - groups = {snappy=3}, - chance = 0.7 - }, - { - name = 'simple_plant:sp_fin', - time = 0.5, - image = 'sp_fin.png', - drop = 'simple_plant:strange_seed', - groups = {snappy=3}, - chance = 0.7 - } -}) \ No newline at end of file diff --git a/shit/simple_plant/textures/n1.png b/shit/simple_plant/textures/n1.png deleted file mode 100644 index 4f842a9196e86c08c24166b124227e6d00d39704..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(rH2 zHKHUqKdq!Zu_%=xATcwqM9KLZB)gPZ!4!3;*Ol|Nq-FyE3FO zsLoJ2n{Yii>Gul82{)v9k4zL~1;Ki}I$&A?@=k82b*i{A8$KdJe=d#Wzp$P!M C+dg;z diff --git a/shit/simple_plant/textures/n2.png b/shit/simple_plant/textures/n2.png deleted file mode 100644 index 76a2bf3f1bd18c94efc5bc881093ee9da1e10c5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(rH2 zHKHUqKdq!Zu_%=xATcwqM9KLZB*BPZ!4!3;*Ol|Nq-FyE3FO zsLoJ2n{Yii>Gul82{)v9U8-6fPt~g@Bs@N+&yw7@a9;m5pktR>oD~vS>u~{S0E4Hi KpUXO@geCytus}Be diff --git a/shit/simple_plant/textures/n3.png b/shit/simple_plant/textures/n3.png deleted file mode 100644 index 96b96e6af22a235cc3d5eea595b21f41dc640511..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(rH2 zHKHUqKdq!Zu_%=xATcwqM9KLZB)GPZ!4!3;*Ol|Nq-FyE3FO zsLoJ2n{Yii>Gul82{)uU8(%Pg(|UKs%YaAX)z7xwj12croxHZX>{kF#FN3G6pUXO@ GgeCyqyFpw4 diff --git a/shit/simple_plant/textures/n4.png b/shit/simple_plant/textures/n4.png deleted file mode 100644 index d6bf025e37c7bcad0d9fdc203992a747bd5416ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(rH2 zHKHUqKdq!Zu_%=xATcwqM9KLZB)mPZ!4!3;*Ol|Nq-FyE3FO zsLoJ2n{Yii>Gul82{#tkD*S5DJv29rV^_n%dHGiuqS_f5ZvQ;?Mdv!>TA*$QPgg&e IbxsLQ0B+<#_W%F@ diff --git a/shit/simple_plant/textures/n5.png b/shit/simple_plant/textures/n5.png deleted file mode 100644 index 5200438a267db624fc3ce715c36a65a197bebe2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(rH2 zHKHUqKdq!Zu_%=xATcwqM9KLZB)`PZ!4!3;*Ol|Nq-FyE3FO zsLoJ2n{Yii>9>I40d|>VJD6uBNElrC+$&`u#m3WeiIG9P=+MHHGhr-1%?zHdelF{r G5}E*}Mm*vG diff --git a/shit/simple_plant/textures/n6.png b/shit/simple_plant/textures/n6.png deleted file mode 100644 index 9b52a8d9d50087405590dbd9149f4b1f94277186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(rH2 zHKHUqKdq!Zu_%=xATcwqM9KLZB*lPZ!4!3;*Ol|Nq-FyE3FO zsLoJ2n{fT{rn~HKHvH##VX~`gj~+v2TVjluph?5RdHgvXk!%frIZPPh6@+KLZGS`PZ!4!3;*N<3Dzx~jsNvu z|37SS(o7-y-=`9@N;XAlrliR^7bbJJ7R*j;o0!6Jf+44Ef{5M^9!0H${=7cM-AuE+ zJB%1sz4&ja(wx91l*`~@Y{Vw%uqADmCJO^=>W)v<9cIixdl)=j{an^LB{Ts5!ir4L diff --git a/shit/simple_plant/textures/seed0.png b/shit/simple_plant/textures/seed0.png deleted file mode 100644 index 94e0b433099d01c1b4d63257306c6c543494e6e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vfa?2SFdgK3}Feun;C e*p$DHfk70Lmp89ZJ6T-G@yGywnvojmaX diff --git a/shit/simple_plant/textures/seed_strange.png b/shit/simple_plant/textures/seed_strange.png deleted file mode 100644 index 2ee8bce753f35a86183358b6baf950126ea1ba82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijSl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP(rH2 zHKHUqKdq!Zu_%=xATcwqM9KLZGU0PZ!4!3;*Ol|Nq-FyE3FO zsLoJ2n{Yii$-0&&K_L4F|KS@k-IuuyeD4Hl7BD*`y=Y62Xz*4xJ1ddc;JkF}g)FnKl{hJJKe|t#H<$H$~DR>(Vj{ beFla}TiQkE!lvI6;1C9V-A z!TD(=<%vb93;~Imc_n&&t|1C##(JiDh6V;-iWUM@X?wajhFJI~|M~ylp4pWlg+X!lvI6;1C9V-A z!TD(=<%vb93;~Imc_n&&t|1C##(JiDh6V;-iWUM@8F{)mhFJI~|M~ylp4pWlg+X>gd_g1U^L-nW?+{+d*;fsh)Y1-44$rjF6*2U FngB;fF~I-; diff --git a/shit/simple_plant/textures/sp_fin.png b/shit/simple_plant/textures/sp_fin.png deleted file mode 100644 index 3c2d97d9034700baf4a1653aa2735a9e7e00103d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;1C9V-A z!TD(=<%vb93;~Imc_n&&t|1C##(JiDh6V;-iWUM@C40I!hFJI~|M~ylp4pWlg+X<>D834?GpxlgMz1<#39tvWM`^M25|UAEX%=%yu00-g;;IPoQ-Sp00i_>zopr E0D8SclmGw# diff --git a/shit/simple_plant/textures/sp_stem.png b/shit/simple_plant/textures/sp_stem.png deleted file mode 100644 index e5f3460ef3777f060e5ca7dec4b7afcc34d55453..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 214 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;1C9V-A z!TD(=<%vb93;~Imc_n&&t|1C##(JiDh6V;-iWUM@rF*(KhFJI~|M>skp4n~>rwVrn z^WuwFA6@0S+~IBPF;9cpqloc@S&DSw#>BXTFPWU`)H4_i|1I~GSl}*PHDiKkugXy- zGw}mQHY{adv(Z80)dXG1BNsb#6$NG4PSmxyD!c9!j4xwnIM?-Q28Wo=e4v#Kp00i_ I>zopr0LQ~c9{>OV diff --git a/shit/simple_plant/textures/sp_stem2.png b/shit/simple_plant/textures/sp_stem2.png deleted file mode 100644 index 0cf455391f68e545b61dc4706a04a0d72b73240e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;1C9V-A z!TD(=<%vb93;~Imc_n&&t|1C##(JiDh6V;-iWUM@wR*ZZhFJI?4R+*fFyOfDUArXz z6YD*jhYCrn#N2#(+Ecw3Y|*~pvLrSATE_X0zvs^YjBvQj%@d$5+# zCUc=yE~PZ)awB~slL>$SFMRM{uV&o=&KdGoj;!eQ$-L2ek)d*9c&>};bS8^SK8|Ob olb2kyV4b#YqHgH6POnYO9dCa$guTkC2Rews)78&qol`;+0A|`)q5uE@ diff --git a/shit/simple_plant/textures/stage1.png b/shit/simple_plant/textures/stage1.png deleted file mode 100644 index d2dc3e4bb93ae1398fed4d1a5a5383ca1b07523d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf5_>JpVt>|Jr}Xe~vG2>kRUa_~4nB`Jj1|-NkdP%=ruqDf8H_US05d4^SV2 Mr>mdKI;Vst0H*mQRsaA1 diff --git a/shit/simple_plant/textures/stage2.png b/shit/simple_plant/textures/stage2.png deleted file mode 100644 index 18a0cada88d64561cfc0c684f2667540079e4822..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 118 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf@bmnK`_JtU*Vkmt(Ae6-I{(QuHam^i!f#^?vKW||8SegMySbs1cOp+4KFY;!VpYpY{OfTVxX7Ks;SKp8M@3{KNl;y61 eiNPyYHZ}$ULt*w77Cu9uNerH@elF{r5}E*d94OTQ diff --git a/shit/simple_plant/textures/stage4.png b/shit/simple_plant/textures/stage4.png deleted file mode 100644 index fd0b4ceea0700f4d59a77e62d585d7eca8562b51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfTJaN_W0!A~}A36y~)J|ITHVV%6=8){m z^tQcU-&SQ;ksu`6!2<-Z7Tq|yVJE}($qUR5J3dx_G^an2W0zwF!(r~MuRQ;+zB2sV g