From f64423e9834a1bdc127e64ae3419ee0800fdf268 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 9 Sep 2017 08:05:40 +0200 Subject: [PATCH] Redo acacia schematics completely --- mods/ITEMS/mcl_core/functions.lua | 41 +++++------------- .../mcl_core/schematics/mcl_core_acacia_1.mts | Bin 0 -> 258 bytes .../mcl_core/schematics/mcl_core_acacia_2.mts | Bin 0 -> 228 bytes .../mcl_core/schematics/mcl_core_acacia_3.mts | Bin 0 -> 206 bytes .../mcl_core/schematics/mcl_core_acacia_4.mts | Bin 0 -> 165 bytes .../mcl_core/schematics/mcl_core_acacia_5.mts | Bin 0 -> 250 bytes .../mcl_core/schematics/mcl_core_acacia_6.mts | Bin 0 -> 223 bytes .../mcl_core/schematics/mcl_core_acacia_7.mts | Bin 0 -> 208 bytes .../schematics/mcl_core_acacia_classic_1.mts | Bin 136 -> 0 bytes .../schematics/mcl_core_acacia_classic_2.mts | Bin 143 -> 0 bytes .../schematics/mcl_core_acacia_simple.mts | Bin 151 -> 0 bytes 11 files changed, 11 insertions(+), 30 deletions(-) create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_1.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_2.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_3.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_4.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_5.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_6.mts create mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_7.mts delete mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_classic_1.mts delete mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_classic_2.mts delete mode 100644 mods/ITEMS/mcl_core/schematics/mcl_core_acacia_simple.mts diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 9d999b6a..d6df8cc7 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -502,38 +502,19 @@ end -- END of spruce tree functions -- --- Acacia tree (2 variants) +-- Acacia tree (multiple variants) function mcl_core.generate_acacia_tree(pos) - local r = math.random(1, 2) - local rot = math.random(0, 3) - local offset, path - if r == 1 then - path = minetest.get_modpath("mcl_core") .. - "/schematics/mcl_core_acacia_classic_1.mts" - if rot == 0 then - offset = { x = pos.x - 4, y = pos.y, z = pos.z - 2 } - elseif rot == 1 then - offset = { x = pos.x - 2, y = pos.y, z = pos.z - 4 } - elseif rot == 2 then - offset = { x = pos.x - 4, y = pos.y, z = pos.z - 2 } - else - offset = { x = pos.x - 2, y = pos.y, z = pos.z - 4 } - end - else - path = minetest.get_modpath("mcl_core") .. - "/schematics/mcl_core_acacia_classic_2.mts" - if rot == 0 then - offset = { x = pos.x - 2, y = pos.y, z = pos.z - 2 } - elseif rot == 1 then - offset = { x = pos.x - 2, y = pos.y, z = pos.z - 4 } - elseif rot == 2 then - offset = { x = pos.x - 4, y = pos.y, z = pos.z - 4 } - else - offset = { x = pos.x - 4, y = pos.y, z = pos.z - 2 } - end + local r = math.random(1, 7) + local offset = vector.new() + if r == 2 or r == 3 then + offset = { x = -4, y = -1, z = -4 } + elseif r == 4 or r == 6 or r == 7 then + offset = { x = -3, y = -1, z = -3 } + elseif r == 1 or r == 5 then + offset = { x = -5, y = -1, z = -5 } end - local angle = tostring(rot * 90) - minetest.place_schematic(offset, path, angle, nil, false) + local path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_acacia_"..r..".mts" + minetest.place_schematic(vector.add(pos, offset), path, "random", nil, false) end -- Generate dark oak tree with 2×2 trunk. diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_1.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_1.mts new file mode 100644 index 0000000000000000000000000000000000000000..8685bc85507b3f3aa0ebdbbb5baefe2c4adc0706 GIT binary patch literal 258 zcmeYb3HD`RVc=%qWZ;D z;yj11T(6?+ZpN(S+GjL>)xni-KCC_^vNd1hxlh;^Vg23Q+Mmoz*h2QN{UVQGFngVc&wft`QRwqGhdQneQsv3S&Xs!ji$fe T*KRWNJe1y_kjDHVTRi~)^>Sd! literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_3.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_3.mts new file mode 100644 index 0000000000000000000000000000000000000000..38831c3cf9fbb6f0019ae4d04a7d6f2c51f6145f GIT binary patch literal 206 zcmeYb3HD`RVc=xoVBoB`uLlDLW(MZO%pwNS+~l12UQl}8R5ahwYlSZ;CbN$b{W7lTf}kk2VCRJI2I2MJUn literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_4.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_4.mts new file mode 100644 index 0000000000000000000000000000000000000000..d3c98b43731b46be0e475c721779d3dc2ed86cc1 GIT binary patch literal 165 zcmeYb3HD`RVPI$AWMHqiw@;}D0S0CU=ETe*2GQK)ocQGYqExHIbO=aF+%|M>;&inwtrVC&K|z=SodG!mgbhZCJqblYx4XIG_YV`=vl0G F7XZBqLKFZ1 literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_5.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_5.mts new file mode 100644 index 0000000000000000000000000000000000000000..8c709f73bd32bb0b293bb79d69dce8d88b0d5245 GIT binary patch literal 250 zcmeYb3HD`RVc=%qV&JZ~PppRk24)84#LOZF(cI*m_~iVeRI9|~#N^DxoYcg!)M5r< zG~tq>)YOVOZ>Q|$Yf#{EZ9RB0KlR-;|L>v(N!`a7d|mmtw;3MKzL*%$`*F1`Pvl#N z&61aXvP}yKx_N2yl?l_IJ=hg9>xY)#qq*dA*68vxcnO)N_- zW)MabE-6Y)t(fyR*paV6frt6tF86}lmj$O-xGxiGeAuYxnCZ2axhJr}c6Hop{?lDE z%ykWmi|k6n|0xGqEqiBez3)kcU-*+LTY}C_d~wtN?3{Yr`IFySt99hePL1McP?e6~ wlmDT`!r`Es_mR6M>3pU9pLlK>Z+`g7Qt7$*`FVe3HooWPHow8}|B^Ek05&sK6#xJL literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_classic_1.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_classic_1.mts deleted file mode 100644 index ffe7bc16bcfde4954b41c5b38b6507ee540d8ea5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 136 zcmeYb3HD`RVc-Np)_NFVU}j)W%q(IM%}vgUPtGq&wMtA*OwLTqNlh$EEoKl#6D}!A zO|6)doFE}^fTL~2nuClIADvpXavD0blwKtHc)W6Wm*7+^E<8(`-7G|t)A<*Zkkgtv U5gt2-=`KcG9?T5KY){$(0M@N7-T(jq diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_classic_2.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_acacia_classic_2.mts deleted file mode 100644 index f4f418d794a4f32c2f47459cef18954f3f1d8bfd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 143 zcmeYb3HD`RVPFTrdI(@(W?)XtEMgGNP0oo=&M!)}N=!~n&P>cnO)N_-W)MabE-6Y) zt(cRXus|rG#rYP4n@ER1Bcqzg)g>PiY9?g*1e`hHU@Ncq#`!z*SLYtVcXc_5F1peI czDw(R9+#B<)mXr~po*oBNq~W2is-6h08|fb0|sUW=ETe*2GQK)ocQGYqExHI?>F1TXMfHt`6*Vi qZ^!0qyUvC3>Hc+|V558DJ>!*GYzrb3?)h4u^!w+RFFA*6QaAv;2t3IE