From c3353567238b30498115eed5bb9abfae8da200d1 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 29 Aug 2017 22:39:22 +0200 Subject: [PATCH] Use new acacia tree schematic, remove apple tree --- mods/ITEMS/mcl_core/functions.lua | 35 ++++++++++++++++-- .../ITEMS/mcl_core/schematics/acacia_tree.mts | Bin 204 -> 0 bytes .../schematics/acacia_tree_from_sapling.mts | Bin 205 -> 0 bytes mods/ITEMS/mcl_core/schematics/apple_tree.mts | Bin 169 -> 0 bytes 4 files changed, 31 insertions(+), 4 deletions(-) delete mode 100644 mods/ITEMS/mcl_core/schematics/acacia_tree.mts delete mode 100644 mods/ITEMS/mcl_core/schematics/acacia_tree_from_sapling.mts delete mode 100644 mods/ITEMS/mcl_core/schematics/apple_tree.mts diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index a6f346d04..c17f4d075 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -404,11 +404,38 @@ end -- END of spruce tree functions -- --- Acacia tree grow function from Minetest Game 0.4.15 +-- Acacia tree (2 variants) function mcl_core.generate_acacia_tree(pos) - local path = minetest.get_modpath("mcl_core") .. - "/schematics/acacia_tree_from_sapling.mts" - minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, path, "random", nil, false) + 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 + end + local angle = tostring(rot * 90) + minetest.place_schematic(offset, path, angle, nil, false) end function mcl_core.generate_dark_oak_tree(pos) diff --git a/mods/ITEMS/mcl_core/schematics/acacia_tree.mts b/mods/ITEMS/mcl_core/schematics/acacia_tree.mts deleted file mode 100644 index 4732ade3d9df99c4f543ad168dc090e551cfdee5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmeYb3HD`RVc=xoVBoB;x332Q24)84#LOZF(UjD*#L}D+tHk8Q)YOVOZztU4Yf#{Dn=1ZHu%;wys@gvT-A!jJ_b_hUtluNqvDdFQXx7;|?5iqI z3BR>bxcBXix_RbZj~j1ZFguwWwX>*Py)YOVOZzm-3H7IbnP310T>5E%?$z@9B#N2hyUt?T1xBr;- xU%TSbQdgVF(tK=EpIrhU-M)W+2CwlY!zJqTW*k3t*>?8)`O_mA<#y}H0RTx+Sp)z8 diff --git a/mods/ITEMS/mcl_core/schematics/apple_tree.mts b/mods/ITEMS/mcl_core/schematics/apple_tree.mts deleted file mode 100644 index 2bd57c1fc4aa36e2f03c6ac2989c86b575e2784e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmeYb3HD`RVPIw8U|_AUx333b1{Mb9#LOZFzLeCo#L}D+tDMxtveaS*9vHu*C^eOV z7sg90D9A~zn3J5KAY|~UbqTW@n;Ki1!m(7jO*?%GVs}LLI9yhkv7z!xnS9~1iL!Mc zfByXWk%MXZu0Q`j{r>#<_3PJ)EX)Ch0blHyttRTn>-R5OXD7eA^7qsK$+O(|{cclY KU?`iQc@Y5CIz`$5