From d3e68b31491874c7a74c1cfecf96d8d45422bc15 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Thu, 14 Nov 2013 20:39:07 -0500 Subject: [PATCH] Made all leaves draw as cubes in the inventory regardless of whether they are plantlike or not in the world. This has the side effect that a dropped leaf block will look like a flat sprite. Oh well, no other way to fix it. Adjusted the offset of the textures so that leaves place more accurately in the world (blame this on the engine, it has no option for me to adjust the precise vertical visual scale independently from the horizontal scale, so I have to fake it with the textures). --- node_defs.lua | 20 ++++++++++++++---- textures/default_jungleleaves_plantlike.png | Bin 387 -> 390 bytes textures/default_leaves_plantlike.png | Bin 401 -> 404 bytes .../moretrees_apple_tree_leaves_plantlike.png | Bin 336 -> 338 bytes textures/moretrees_beech_leaves_plantlike.png | Bin 401 -> 404 bytes textures/moretrees_birch_leaves_plantlike.png | Bin 429 -> 433 bytes .../moretrees_fir_leaves_bright_plantlike.png | Bin 208 -> 212 bytes textures/moretrees_fir_leaves_plantlike.png | Bin 208 -> 212 bytes ...rees_jungletree_leaves_green_plantlike.png | Bin 202 -> 206 bytes ...etrees_jungletree_leaves_red_plantlike.png | Bin 202 -> 206 bytes ...ees_jungletree_leaves_yellow_plantlike.png | Bin 202 -> 206 bytes textures/moretrees_oak_leaves_plantlike.png | Bin 621 -> 620 bytes textures/moretrees_palm_leaves_plantlike.png | Bin 762 -> 766 bytes textures/moretrees_pine_leaves_plantlike.png | Bin 208 -> 212 bytes ...moretrees_rubber_tree_leaves_plantlike.png | Bin 202 -> 206 bytes .../moretrees_sequoia_leaves_plantlike.png | Bin 208 -> 212 bytes .../moretrees_spruce_leaves_plantlike.png | Bin 208 -> 212 bytes .../moretrees_willow_leaves_plantlike.png | Bin 384 -> 388 bytes 18 files changed, 16 insertions(+), 4 deletions(-) diff --git a/node_defs.lua b/node_defs.lua index b0b796b..dc51939 100644 --- a/node_defs.lua +++ b/node_defs.lua @@ -33,6 +33,9 @@ new_default_leaves = moretrees:clone_node("default:leaves") if moretrees.enable_default_leafdecay then new_default_leaves.groups = {snappy=3, flammable=2, leaves=1} end + if moretrees.plantlike_leaves then + new_default_leaves.inventory_image = minetest.inventorycube("default_leaves.png") + end new_default_leaves.drawtype = moretrees_new_leaves_drawtype new_default_leaves.visual_scale = moretrees_new_leaves_visual_scale new_default_leaves.tiles = {"default_leaves"..moretrees_new_leaves_extension} @@ -40,9 +43,11 @@ new_default_leaves = moretrees:clone_node("default:leaves") new_default_jungle_leaves = moretrees:clone_node("default:jungleleaves") if moretrees.enable_default_jungle_leafdecay then - new_default_jungle_leaves.groups = {snappy=3, flammable=2, leaves=1} + new_default_jungle_leaves.groups = {snappy=3, flammable=2, leaves=1} + end + if moretrees.plantlike_leaves then + new_default_jungle_leaves.inventory_image = minetest.inventorycube("default_jungleleaves.png") end - new_default_jungle_leaves = moretrees:clone_node("default:jungleleaves") new_default_jungle_leaves.drawtype = moretrees_new_leaves_drawtype new_default_jungle_leaves.visual_scale = moretrees_new_leaves_visual_scale new_default_jungle_leaves.tiles = {"default_jungleleaves"..moretrees_new_leaves_extension} @@ -130,11 +135,17 @@ for i in ipairs(moretrees.treelist) do droprarity = 20 end + moretrees_render_inventory_image = nil + if moretrees.plantlike_leaves then + moretrees_render_inventory_image = minetest.inventorycube + end + minetest.register_node("moretrees:"..treename.."_leaves", { description = treedesc.." Leaves", drawtype = moretrees_new_leaves_drawtype, visual_scale = moretrees_new_leaves_visual_scale, tiles = { "moretrees_"..treename.."_leaves"..moretrees_new_leaves_extension }, + inventory_image = moretrees_render_inventory_image("moretrees_"..treename.."_leaves.png"), paramtype = "light", groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1}, sounds = default.node_sound_leaves_defaults(), @@ -341,6 +352,7 @@ for color = 1, 3 do drawtype = moretrees_new_leaves_drawtype, visual_scale = moretrees_new_leaves_visual_scale, tiles = {"moretrees_jungletree_leaves_"..jungleleaves[color]..moretrees_new_leaves_extension}, + inventory_image = moretrees_render_inventory_image("moretrees_jungletree_leaves_"..jungleleaves[color]..".png"), paramtype = "light", groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1}, drop = { @@ -360,9 +372,9 @@ minetest.register_node("moretrees:fir_leaves_bright", { drawtype = moretrees_new_leaves_drawtype, visual_scale = moretrees_new_leaves_visual_scale, description = "Douglas Fir Leaves (Bright)", - tile_images = { "moretrees_fir_leaves_bright"..moretrees_new_leaves_extension }, + tiles = { "moretrees_fir_leaves_bright"..moretrees_new_leaves_extension }, + inventory_image = moretrees_render_inventory_image("moretrees_fir_leaves_bright.png"), paramtype = "light", - groups = {snappy=3, flammable=2, leaves=1, moretrees_leaves=1 }, drop = { max_items = 1, diff --git a/textures/default_jungleleaves_plantlike.png b/textures/default_jungleleaves_plantlike.png index d7cac732dea9e7e803377da828ca34c189e19ab5..ad3e3e4ffc5f9c301d9b0a2040a2f4f320050f56 100644 GIT binary patch delta 363 zcmV-x0hIoO1BL^TB!5jwL_t(I%k5J^j)FiCteK!5kclV>Hw{1F|G&{Qf?*^P*lh2? zt=R_gvX{MVT_#lM>Z$4;;2(bv0|41^CnT!N&A2p{b+W?XN34_8giH1tT+es3O=kcg zD#~17&4;fZQFXZ)txl1m%;kE%0|0#8qis4nM>PrX7D2h zKZZ^KKn?&X82P#nSDk~!zV5?qG<@B|vY4l@`$;i#8T^RDY5UT|woPZW_v&&pMVX6B zW1%JHL1>$nKakKkoVLO1;KyKvT-$WUQgO*M?dT9SiZYiFA^^BF7ItMW6y@m<%gY!w zq3wjCG?saI*JShkX9^^ira0(GE{kQGY%uv5+hnuglEV(y%N>0;7yyXM zst{Q7>6?$Jsc%NBQ>3g4xnAx70N;-2yTO!IApl?j0ACU%hkqSh7E4(b(szTI{EW%Z zp%Va*0{{v}z8%9=*I==4$8Z}B-;S^>=IPsUQOsN>KjV1bKQ*y^HyG``sc)vN3UOI1 zw8T6JZPW4x5*o+zK6st{9ITM*yTMp0zVb{vIz)}KDkOvm04|G#U6~6-c{;@MG)7Hm zJE16xWgXu2a$*0S0*O~spzzw}VhZo}JU^wvJYMa{FOR`-G@m4Kn?)dFm8%AJar5fH$@v>qtO&CA{O&(igr*;U%I--`mlN! z5|w#nwD!yCYMi%{W{FS|{UEf=h!;p`tPiW8wX6FegmJc{{9i4j~Ao6vx)OouBRISpe;L8MSpFaw*mkW0LYib%WQ!( zPsDjERZ*M18PGRFm;?ai0DukSw(P=Fr(khgcHuP|ZP_7WG0(Q_M#c1{Zw9RQtA`;` zRn$gnKOZl~c`Iq22qn=ELd%SJfrQ3-zY1FWW(ZQqRYh$gc6_FpaP7t;6>-HOoO6V%i`T(E83Gt|B2i$gQNpPewi(x|KM2X`V}~xMr%*L0W&8V U-2hj?&;S4c07*qoM6N<$f<>pZga7~l diff --git a/textures/moretrees_apple_tree_leaves_plantlike.png b/textures/moretrees_apple_tree_leaves_plantlike.png index f333fd0a87ea8257a818bcdca0e650fd8c0d2036..b08582bd256bbfad29a552ba280eb94be10101e3 100644 GIT binary patch delta 198 zcmV;%06G8A0@4DIlz*v7L_t&-)4fnh62mYEQ}U+H;v&JHd49#z?9)7<;Olm0Xp; z9qG(Qp{71*wv3ideC*y?*n0DkZLFxQux|0nD!zbDZQ+que?O-zkR^}|zT-k|lL=I` zXBO8QNB412m!@vGBDw*k?&WL1Ly{W^<@M`xJ__>?uj_Czy}j7+JMNW6y1~lB*K9 zBcH`6)I2sVmdUb_je*){6KLqq yBCa(}?&G2^P2F%sasx`;>(79PWH%7&%kUQ_mJM%K$F@@d0000FOR`-G@m4Kn?)dFm8%AJar5fH$@v>qtO&CA{O&(igr*;U%I--`mlN! z5|w#nwD!yCYMi%{W{FS|{UEf=h!;p`tPiW8wX6FegmJc{{9i4j~Ao6vx)OouBRISpe;L8MSpFaw*mkW0LYib%WQ!( zPsDjERZ*M18PGRFm;?ai0DukSw(P=Fr(khgcHuP|ZP_7WG0(Q_M#c1{Zw9RQtA`;` zRn$gnKOZl~c`Iq22qn=ELd%SJfrQ3-zY1FWW(ZQqRYh$gc6_FpaP7t;6>-HOoO6V%i`T(E83Gt|B2i$gQNpPewi(x|KM2X`V}~xMr%*L0W&8V U-2hj?&;S4c07*qoM6N<$f<>pZga7~l diff --git a/textures/moretrees_birch_leaves_plantlike.png b/textures/moretrees_birch_leaves_plantlike.png index 5c85e3da96fb35cf40a0de8ac81a49d8fd5d256e..0633d79dd68e800917c95a0919f8b96e6805a1f4 100644 GIT binary patch delta 252 zcmV|XY*7(yJxYyd$1GB^E=c7-kt)!s#NZ8_g zIw$qv0brqjwTbw(g`9xOPObyw^5$IJ?>#Q7=}S8rHmT!EinN9_`PFb5SfcU4Ycqe& zq<585*_g4dZlv1Hmmfi~k>d#E^tm#g@FJBd>>yJZwNM&4BMt{5I^-D#GGzfQ66{Zi zk^>xbjweQ*(fr~WE(c)Ywui)-6dyrScKzS2&$$B2;uih#sFOti0000>0004WQchCH&veK&t-N5dv{TuG7MAWfcH16yn~K6q{B_l5MT zaw;1$w$+PNpUdYlC^m8&p`1Qf#v7ibGKC#v4x<)IBNO6qA)-s(aUfF`z+-~_4pDM| yYtFG|fqHgGur3%5NaE~NMXlCtZ6)&BuS7Z&|5ZyA&T00005gg^{Kz2g)RttbGA6cB+6$dLYfVz_Jp>*KTh0sc~vG^2rAgr^+ZFZNud zXDRY_n1nt^oQHK~2-wntzC-6{kzVns*dixNZ|6Z|%~7txY%IP5LJWE4cUj5NgN}Pm hD0Km8$iD6O>j5xi5ac+OgO&gQ002ovPDHLkV1i}`N^t-H delta 175 zcmV;g08szb0nh=EDSrR}06SnX9yb{(N+cI47~Z*;ga7~l0d!JMQvg8b*k%9#0B=b| zK~xCWrH#Q2!!Qg3SyKZDg$D=_4Im^OK#um`sm=`L^9b^Q|57B)XyA13LX&=E*c0E4!-m-&;S4c0d!JMQvg8b*k%9#0CP!1 zK~xCWosP>5gg^{Kz2g)RttbGA6cB+6$dLYfVz_Jp>*KTh0sc~vG^2rAgr^+ZFZNud zXDRY_n1nt^oQHK~2-wntzC-6{kzVns*dixNZ|6Z|%~7txY%IP5LJWE4cUj5NgN}Pm hD0Km8$iD6O>j5xi5ac+OgO&gQ002ovPDHLkV1h$YN=5(x delta 175 zcmV;g08szb0nh=EDSrR}02x9f3LX&=E*c0E4#?cxZ2$lO0d!JMQvg8b*k%9#0B=b| zK~xCWrH#Q2!!Qg3SyKZDg$D=_4Im^OK#um`sm=`L^9b^Q|57B)XyAn16N>gE#Ur%S7NFiV=p bc>ekU|JMAILyGY>A%m{vjrXeIe!@b%`P=bmZ@;^_s_}MuDxAqW|(%ifw05p z11Gj_7hUEw=RlgnU6CbLiMcJ&ni_h$?tCadYQ@GH?!Qqf#N0DrzTVnL2lX=T9y2HP V3RYL{eG9Uc!PC{xWt~$(69C9kKdJx# diff --git a/textures/moretrees_jungletree_leaves_red_plantlike.png b/textures/moretrees_jungletree_leaves_red_plantlike.png index d13ce691000e69a968a5bb57bfcd867494bc227a..a137954bada50ac05c3ede1366fe4ec3ff3b036f 100644 GIT binary patch delta 173 zcmV;e08;n16N>gE#Ur%S7NFiV=p bc>ekU|JM=lo&#H@nm%S*F6t-#;g3yY_aenPJ-52Eq=X z51iP#U38h#oC9eNcSV+1CFZt7Yij82y7Qsn16N>gE#Ur%S7NFiV=p bc>ekU|JM~CzQ7bmqaQ}@;A?BU|^Yzv~I;fXv_n0}U VSFpNr?^}?q44$rjF6*2UngCZPLQntz diff --git a/textures/moretrees_oak_leaves_plantlike.png b/textures/moretrees_oak_leaves_plantlike.png index e86016675855532e75dcc56250e5d414badb1969..d90092859efe8e947b4d418b4150561442865b73 100644 GIT binary patch delta 286 zcmV+(0pb4b1ndNmBn3E7OjJd&EI0vw#>pE-00001bW%=J06^y0W&i*H;z>k7R2b8} zkU2|4K@fz?Km>KwK*bY9yig+*WI;2Nz0bGroHs`w|NkdAv!=#2ope#%U(vw76petD zlmWhyWfEk9fhTdfY1t=1fq|%olX_l)9ni*Zit^&&Y&2ft>D`lm1p35| z-M25m%_YungKL2C_LThduy@_RnmuwC*xggo!dfNF-lkuPb4142O4+==+c*~RO*a2v zPl4A-L&VYoBHFA&!L5MrNY~&H$p4DVT9Z8(%KB;RIM1C#qn9R&UiJsAdUj)M#zS!~ kWveOzyNK*<{PCY35kEW@@}u|-kpKVy07*qoM6N<$g0Z`a$p8QV delta 287 zcmV+)0pR}Z1nmTnBnUfDOjJcUNf@yyI01jZW##e!0004WQchCGYT)G{>|We{=}ca{(+Jf&M9I3Hv4WlCuFUwlx^?bC0QVt zZ1KT?B5#_;gry}!)ND$@uYsRL*XR)`{F$p-+jz8;4ce>IJol1?hbx lkCHBBrz#@*gzRqtzj}r|)O)?2-T(^#002ovPDHLkV1hCqg+BlQ diff --git a/textures/moretrees_palm_leaves_plantlike.png b/textures/moretrees_palm_leaves_plantlike.png index dd410d1b838cf253effe6af0e8ddeeaa7c6933dd..6dcf65c30fadf84fb8bb2e72c81f8068bc376f28 100644 GIT binary patch delta 271 zcmV+q0r39%1^xxF`2m0MNkl=wZeOu8F(_rl`8 z-@XgX%!7Yg$nyb{HQwfQ6x9M(3EGm|`r*^`;T!05c2pw&JYsM%3W; zF+1<4O;1rCUCU_KSFo;u98)fiI+oO-D;!7>N=5-<7Cl>jZoPk8f;As0o16wOuP=nb zRGf)Wh#;}63qNo~OBEK8>RJ~!Z;u?h@ibFnpr#X>@1A4x2_2NBW00D#zq5bwn^I~| zCbg2j9fGIloI#2VeF7Ejiv*rIaAHd|5+6faIeVWxMZA*C#6=SuMdK>pUw^#w11*I* V4>zIU&Hw-a07(Z$PDHLkV1h6?doch2 delta 267 zcmV+m0rdX<1^NZB`2m0INklM2cFn3K4VYUJG#R;|zan1xUH%)%$pTAp+)- zY=j~NiLJND1N*d8Vil>XadY$j$esspGYTWs9oYT%99Rx%rz{hr)QIDQozuUSQb!8u z74&WpIy&JP(o!)bQrMi~M}UFH&1N4-fr3 RDF6Tf07*qoM6LruV1i)_c(ecj diff --git a/textures/moretrees_pine_leaves_plantlike.png b/textures/moretrees_pine_leaves_plantlike.png index c0334fbde9ef60d76347d9680e86e747d8e81357..1264e1aab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