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 9d999b6a3..d6df8cc72 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{Ubp^K_CYUxNaVYisNE#|}DGU#tvT79L|+5mKwuFzL^<`TKR40-je1 zYpvU(#Xa}#ika!w>+|p3PG2{5{_22}6Xq3c{lBOzvh2{xl#E19{e_oxZaUQl}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*68vx)YOVOZ-X8A8Web#@9lCgxP4i0iiP_!p~i=edXAZ1Yngij8*Ep{t>!=7 zHN#xju(-&sH2j}(kkztx*4F!;MEHe2nX)D5+{70*{m;&+x1B%vowZs=&g|4Eeg;+P y_&xa_S}Yt6x_KYDYm&}a%KwSyrt#*7uPl|Go1dTeS7zgTZf^4%4F4}VGXVfLGgTD; 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=xoWMHj_0S0CU=ETe*2GQK)ocQGYqExHIcnO)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