mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Redo acacia schematics completely
This commit is contained in:
parent
01f5cc7515
commit
f64423e983
11 changed files with 11 additions and 30 deletions
|
@ -502,38 +502,19 @@ end
|
||||||
|
|
||||||
-- END of spruce tree functions --
|
-- END of spruce tree functions --
|
||||||
|
|
||||||
-- Acacia tree (2 variants)
|
-- Acacia tree (multiple variants)
|
||||||
function mcl_core.generate_acacia_tree(pos)
|
function mcl_core.generate_acacia_tree(pos)
|
||||||
local r = math.random(1, 2)
|
local r = math.random(1, 7)
|
||||||
local rot = math.random(0, 3)
|
local offset = vector.new()
|
||||||
local offset, path
|
if r == 2 or r == 3 then
|
||||||
if r == 1 then
|
offset = { x = -4, y = -1, z = -4 }
|
||||||
path = minetest.get_modpath("mcl_core") ..
|
elseif r == 4 or r == 6 or r == 7 then
|
||||||
"/schematics/mcl_core_acacia_classic_1.mts"
|
offset = { x = -3, y = -1, z = -3 }
|
||||||
if rot == 0 then
|
elseif r == 1 or r == 5 then
|
||||||
offset = { x = pos.x - 4, y = pos.y, z = pos.z - 2 }
|
offset = { x = -5, y = -1, z = -5 }
|
||||||
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
|
end
|
||||||
local angle = tostring(rot * 90)
|
local path = minetest.get_modpath("mcl_core") .. "/schematics/mcl_core_acacia_"..r..".mts"
|
||||||
minetest.place_schematic(offset, path, angle, nil, false)
|
minetest.place_schematic(vector.add(pos, offset), path, "random", nil, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Generate dark oak tree with 2×2 trunk.
|
-- Generate dark oak tree with 2×2 trunk.
|
||||||
|
|
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_1.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_1.mts
Normal file
Binary file not shown.
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_2.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_2.mts
Normal file
Binary file not shown.
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_3.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_3.mts
Normal file
Binary file not shown.
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_4.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_4.mts
Normal file
Binary file not shown.
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_5.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_5.mts
Normal file
Binary file not shown.
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_6.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_6.mts
Normal file
Binary file not shown.
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_7.mts
Normal file
BIN
mods/ITEMS/mcl_core/schematics/mcl_core_acacia_7.mts
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue