From 0eafd454e2dafc71f1538457e7fbeae2ac5c4f45 Mon Sep 17 00:00:00 2001 From: Aleksey Chubukov Date: Wed, 15 Mar 2023 22:50:35 +0300 Subject: [PATCH] day 2023-03-05: tree sprout, fixes * fixed .luacheckrc * added growing trunk * added sprout timer function * removed and ignored Krita backup files --- .gitignore | 3 +- .luacheckrc | 2 + mods/eaction/init.lua | 2 + mods/eaction/place.lua | 3 + mods/ebiome/biomes/grasslands.lua | 56 ++++++++++++++---- mods/ebiome/mod.conf | 3 + mods/ebiome/textures/ebiome_grass.png~ | Bin 911 -> 0 bytes mods/ebiome/textures/ebiome_oak_sapling.png | Bin 686 -> 661 bytes mods/ebiome/textures/ebiome_oak_sprout.png | Bin 0 -> 1241 bytes .../ebiome_oak_trunk_corner_normal.png~ | Bin 758 -> 0 bytes .../textures/ebiome_oak_trunk_growing.png | Bin 0 -> 907 bytes .../textures/ebiome_oak_trunk_normal.png~ | Bin 673 -> 0 bytes mods/ebiometrees/init.lua | 1 + mods/ebiometrees/sapling.lua | 28 +++++++++ 14 files changed, 87 insertions(+), 11 deletions(-) create mode 100644 mods/eaction/init.lua create mode 100644 mods/eaction/place.lua create mode 100644 mods/ebiome/mod.conf delete mode 100644 mods/ebiome/textures/ebiome_grass.png~ create mode 100644 mods/ebiome/textures/ebiome_oak_sprout.png delete mode 100644 mods/ebiome/textures/ebiome_oak_trunk_corner_normal.png~ create mode 100644 mods/ebiome/textures/ebiome_oak_trunk_growing.png delete mode 100644 mods/ebiome/textures/ebiome_oak_trunk_normal.png~ create mode 100644 mods/ebiometrees/init.lua create mode 100644 mods/ebiometrees/sapling.lua diff --git a/.gitignore b/.gitignore index 0667445..a3dd7b9 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,5 @@ luac.out *.x86_64 *.hex - +# Krita +*~ diff --git a/.luacheckrc b/.luacheckrc index 45f3046..d999c36 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -3,6 +3,8 @@ allow_defined_top = true globals = { "minetest", + "ebiometrees", + "eaction" } read_globals = { diff --git a/mods/eaction/init.lua b/mods/eaction/init.lua new file mode 100644 index 0000000..ea906b2 --- /dev/null +++ b/mods/eaction/init.lua @@ -0,0 +1,2 @@ +eaction = {} +dofile(minetest.get_modpath("eaction") .. "/place.lua") diff --git a/mods/eaction/place.lua b/mods/eaction/place.lua new file mode 100644 index 0000000..a11168a --- /dev/null +++ b/mods/eaction/place.lua @@ -0,0 +1,3 @@ +function eaction.place_handler(itemname, func) + return +end diff --git a/mods/ebiome/biomes/grasslands.lua b/mods/ebiome/biomes/grasslands.lua index 0fa0791..6b9d83c 100644 --- a/mods/ebiome/biomes/grasslands.lua +++ b/mods/ebiome/biomes/grasslands.lua @@ -10,6 +10,52 @@ minetest.register_biome({ heat_point = 50, humidity_point = 50, }) +minetest.register_node("ebiome:oak_sapling", { + description = S("Oak tree sapling"), + drawtype = "plantlike", + tiles = { "ebiome_oak_sapling.png" }, + paramtype = "light", + on_timer = ebiometrees.get_sapling_grower("ebiome:oak_sprout"), + sunlight_propagates = true, + walkable = false, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + on_construct = function(pos) + minetest.get_node_timer(pos):start(3) + end +}) +minetest.register_node("ebiome:oak_sprout", { + description = S("Oak tree sprout"), + drawtype = "plantlike", + visual_scale = 1.4, + tiles = { "ebiome_oak_sprout.png" }, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = ebiometrees.get_sprout_grower("ebiome:oak_trunk_normal", "ebiome:oak_trunk_growing"), + groups = {snappy = 3, dig_immediate = 3, flammable = 2, + attached_node = 1}, + on_construct = function(pos) + minetest.get_node_timer(pos):start(3) + end +}) +minetest.register_node("ebiome:oak_trunk_growing", { + description = S("Oak tree trunk"), + tiles = { "ebiome_oak_trunk_growing.png", + "ebiome_oak_trunk_slice_normal.png", + "ebiome_oak_trunk_growing.png" + }, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, flammable = 2}, + on_place = minetest.rotate_node, + on_timer = function(pos) + return true + end, + on_construct = function(pos) + minetest.get_node_timer(pos):start(3) + end +}) minetest.register_node("ebiome:oak_trunk_normal", { description = S("Oak tree trunk"), tiles = { "ebiome_oak_trunk_slice_normal.png", "ebiome_oak_trunk_slice_normal.png","ebiome_oak_trunk_normal.png"}, @@ -33,16 +79,6 @@ minetest.register_node("ebiome:oak_trunk_normal_corner", { groups = {tree = 1, choppy = 2, flammable = 2}, on_place = minetest.rotate_node }) -minetest.register_node("ebiome:oak_sapling", { - description = S("Oak tree sapling"), - drawtype = "plantlike", - tiles = { "ebiome_oak_sapling.png" }, - paramtype = "light", - sunlight_propagates = true, - walkable = false, - groups = {snappy = 2, dig_immediate = 3, flammable = 2, - attached_node = 1, sapling = 1} -}) minetest.register_node("ebiome:grass", { description = S("Grass"), tiles = {"ebiome_grass.png"}, diff --git a/mods/ebiome/mod.conf b/mods/ebiome/mod.conf new file mode 100644 index 0000000..1cbd7da --- /dev/null +++ b/mods/ebiome/mod.conf @@ -0,0 +1,3 @@ +depends = ebiometrees +description = biome mod +name = ebiome diff --git a/mods/ebiome/textures/ebiome_grass.png~ b/mods/ebiome/textures/ebiome_grass.png~ deleted file mode 100644 index b40d9e5f4e9ed1da99c8f618ba8f518f23e690e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 911 zcmV;A191F_P)r!Z3SBeK~Mw{J9}S^g!N8Vh)6Qa?EN@1=W_QfIHP&3V0KJHp;$Izk+6R`zT)qE z#f1kSZiW(?sn5*MM`^ph?s2Gk7gD|2-)p&gQfX5IN0;!VrW<8pnTF^_Sy#Lx+^6Ld zDd8jGpdkYaUn@On^NZrF%^!-5#n>!3RZoBR4=4YymNN>%qr!ngzM}okqrSwGE-o!d z9gsbUNsI_#{3NNcPM$I$sYS`GwQsE9o1-KiP2M_H3~^-1i8m-}MY^V?W<*cRlc%b3 z|DUIsnHaabd&1y;wygJI=-h>R&9c6aEvtS4t|z!GHvJ{ZY3ft-T2l)gf_DqfubNtN z4=%Q$|4~mEiH78o?aXB0?F@S3;JbzHRXeNSb50*%aZ`TL4eTGlh}`$C{Q%LKXY{|( zD=Yv2010qNS#tmY4`BcR4`BhQKc{H`00GBIL_t(IPmNN`D@0)wKX**B(qxLfl9Kl` zuWY0=#X{LwnJidK9!V5YBcTv`B?~M6fW#IH(+C@7XG$p)y4StmanJeg_nEn4;neAT z=XcKeoyWZZKIz;BBuH6*-0uhd02%-tJAlmc4+;2lE+@bcE(s~g@L2_trsic}1II<2 zpls8+TqAl~qYKshFO13ikBW72<+Mj|(wNpc>hq~i-{9ljgyzj`E_i#enDj7`@D`B^ zn4eC@RrC$aF9Gox%OJI7J(P~hNtAqj*ck+AK-)%`3yMYnNmGL@Ya#60uhJO#6z2(A zV)^ViRuw`H_*IXh}R3x23fQvfp7_wG%V(0V)2E^9P9Ta zDmM^cN-|1Tcm%dLXx)4vDvXKUcx10tPV2~nru|6bTe`wcDIX8x?P}7XPQ6?0Ttsow z+SwAki^-|DqI#-~6VQ=gRfsHj+?5H`^>p&e=vnXNX&je8b=L&Cvo`^Ct)G?`r&xEa z3(sdS3^jpTD<=XN2n~hwp2V&uQE%0iaN9j1;nbjHtN`g&L1Lxr<__kevX*6mZGy&b l;`jU}Ob8RcT}w)z`v*~W_fM(V-ueIl002ovPDHLkV1lxKqLlyu diff --git a/mods/ebiome/textures/ebiome_oak_sapling.png b/mods/ebiome/textures/ebiome_oak_sapling.png index 6b80a29a2b7c8498b9928d3da85b5271fb5085a1..592b56f883e576f4799f4ae2428292cfff577bb0 100644 GIT binary patch delta 622 zcmV-!0+Ic$1(gMmGJm^E!%!5)f3`}+2OV?}amY}`K~WUMQS0DRq|^$&mL^SGp^uQX zh`0(a4h09%#n<3}psV1jAP9;e;^yvakrK~s3oX*#aC3fq_kM?yFW?EKjf~Se1DR~z zj?4$O<&{;<_l}otdKp8D8ICm@4u@#EejaI2^VJ%zjsY$0!c&H2=Y?e& zLYsL@@t$z6k&4BIPlQKo8Bq9E>3W6V6elbErPz)}=D?$RYRNj*>)1%y8R22!Kqg%< zs`IEX=`yoRi&Fb#58x1Co*)`J1vW^NXH;rdGHdJ`FZ&kAiN}z)#TK?WlBC2tB5Fap zno<*@oARXDQh&Ms&(ldvPE@*g1)=TLbw3Bew-2SF>;9g)Zs`oXFL0f$`E!!f^tb56 znie<){|;Q<)HMA7u6CjC*^1e*vgDQRNhILo0=ieA=N>xNDp^&}Ie&uaw)~^MN2><{932;bRa{vGjVE_ORVF9Q=r+;Yx007NNL_t(IPh(&h++aTI ze}=_u|M5AJ39k?2nHd<^f%+E!4Z;C%8?Xy#^W%REL0!KY7&vfS!-7-l;eUqAIlmcx z3jtL`{AMI8tYgg>@cJKQC{8b!KeYJ&lbtMkQ8ne7LR~Qh7$$2lV+7L$%Q*fsECYu6 zCP>JC7I1wl{*5jS_g7Lj;vQ>ci&;pRNN_r8adH{gvLTF!2ogj~L8 z#bzR*rTB8Fhk*aT&f_OA}o0PG{ks&MIVNpxc zRhOC;U6;q8tbcORR6c1UKRAvaTg};d~3aAIyZ6s7gNB-gFvXPoX^yoj1_7;$~Gl=j0w1Hslvw!`?m& z$o=5z4>xgWBg<##ssI2032;bRa{vGjVE_ORVF9Q=r+;Yx008DmL_t(IPh(&h)WGth z_J706#{cm-k_n&WZ+>Y8R_5;v<`?yG8iLaRlY5r`e}8(`2;5GrD7h=sA@cJL57pDu%A6oqX$xdb*tKZg!+nj3(afR_2)Bmd1 z%`ser)qe%-KUoU^!Z80d1ON9Q7*4`4z~GAYe~*w049x#n!HPwHGcZKi zF#LbZ0Sru|i^K(HwiP1qlJyX5jT=S;1C_zzq8V6GlpRE)4>SzO3eH4b3ZfBY<9lAh i_TtS8Y`}mc1OVj!LYg-KifRA=002ovPDHLkU;%<*LN8YU diff --git a/mods/ebiome/textures/ebiome_oak_sprout.png b/mods/ebiome/textures/ebiome_oak_sprout.png new file mode 100644 index 0000000000000000000000000000000000000000..f8f32758c9c573a6fd211991f898be8bd9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kvXXu0mjf D`lnDD literal 0 HcmV?d00001 diff --git a/mods/ebiome/textures/ebiome_oak_trunk_corner_normal.png~ b/mods/ebiome/textures/ebiome_oak_trunk_corner_normal.png~ deleted file mode 100644 index 00627c0dac48f7f3fe2e56e84fd80af80917b036..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 758 zcmVr!Z3SBeK~Mw{J9}S^g!N8Vh)6Qa?EN@1=W_QfIHP&3V0KJHp;$Izk+6R`zT)qE z#f1kSZiW(?sn5*MM`^ph?s2Gk7gD|2-)p&gQfX5IN0;!VrW<8pnTF^_Sy#Lx+^6Ld zDd8jGpdkYaUn@On^NZrF%^!-5#n>!3RZoBR4=4YymNN>%qr!ngzM}okqrSwGE-o!d z9gsbUNsI_#{3NNcPM$I$sYS`GwQsE9o1-KiP2M_H3~^-1i8m-}MY^V?W<*cRlc%b3 z|DUIsnHaabd&1y;wygJI=-h>R&9c6aEvtS4t|z!GHvJ{ZY3ft-T2l)gf_DqfubNtN z4=%Q$|4~mEiH78o?aXB0?F@S3;JbzHRXeNSb50*%aZ`TL4eTGlh}`$C{Q%LKXY{|( zD=Yv2010qNS#tmY4`BcR4`BhQKc{H`00AyZL_t(IPmNRCPQpMCJuMU{mjIzL=!5#? zZ}|V8A>n}#2p|e7F?wdVL#Iuvv#2_A7mU z0i$lQqS&hgYaD@$PYoU>9F2+38PH|qeDTvcf}g?`yxftHO&r0Vqo)awaEgSU0oi-R zDgDE|tHie-z|+hV3KrXmI5p}QLzXQqeA{}zVnR15 o#;y-(!&i34zbrJa>R}200fE9ydAhItHvj+t07*qoM6N<$g08ew82|tP diff --git a/mods/ebiome/textures/ebiome_oak_trunk_growing.png b/mods/ebiome/textures/ebiome_oak_trunk_growing.png new file mode 100644 index 0000000000000000000000000000000000000000..8f2b5e8186e76c8bf14d4fec4bdb620aa13ac022 GIT binary patch literal 907 zcmV;619bd}P)QX0-_+68jCbRLX2S4CRy_k@>q5gB-jcz76A*< z##iA#&{nWj5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