diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 942e235f5..1a8779fd4 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -195,66 +195,14 @@ end mcl_structures.generate_boulder = function(pos) -- Choose between 2 boulder sizes (2×2×2 or 3×3×3) local r = math.random(1, 10) - local w + local path if r <= 3 then - w = 2 + path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder_small.mts" else - w = 3 - end - local data, yslice_prob - if w == 2 then - local a = { name = "mcl_core:mossycobble" } - local p = { name = "mcl_core:mossycobble", prob = 127 } - data = { - a, a, - p, p, - - a, a, - p, p, - } - elseif w == 3 then - local a = { name = "mcl_core:mossycobble" } -- bottom layer - local x = { name = "mcl_core:mossycobble", prob = 192 } -- corner in middle layer - local b, c -- middle and top layer - local e = { name = "air", prob = 0 } -- empty - -- This selects the amount of erosion (random removal of blocks) - if r == 10 then - -- Erosion occours on top 2 layers - -- Top layer is completely eroded and middle layer is randomly eroded - b = { name = "mcl_core:mossycobble", prob = 127 } - x.prob = 127 - c = e - else - -- Erosion occours randomly on top layer only - b = a - c = { name = "mcl_core:mossycobble", prob = 127 } - end - local e = { name = "air", prob = 0 } - data = { - e, a, e, - x, b, x, - e, c, e, - - a, a, a, - b, b, b, - c, c, c, - - e, a, e, - x, b, x, - e, c, e, - } - - -- Chance to destroy the bottom slice - yslice_prob = { { ypos=1, prob=140 } } + path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder.mts" end - local schematic = { - size = { x=w, y=w, z=w}, - data = data, - yslice_prob = yslice_prob, - } - - minetest.place_schematic(pos, schematic) + minetest.place_schematic(pos, path) end mcl_structures.generate_witch_hut = function(pos) @@ -268,49 +216,8 @@ mcl_structures.generate_ice_spike_small = function(pos) end mcl_structures.generate_ice_spike_large = function(pos) - local h = math.random(20, 40) - local r = math.random(1,3) - local top = false - local simple_spike_bonus = 2 - -- Decide between MTS file-based top or simple top - if r == 1 then - -- MTS file - top = true - else - -- Simple top, just some stacked nodes - h = h + simple_spike_bonus - end - local w = 3 - local data = {} - local middle = 2 - for z=1, w do - for y=1, h do - for x=1, w do - local prob - -- This creates a simple 1 node wide spike top - if not top and ((y > h - simple_spike_bonus) and (x==1 or x==w or z==1 or z==w)) then - prob = 0 - -- Chance to leave out ice spike piece at corners, but never at bottom - elseif y~=1 and ((x==1 and z==1) or (x==1 and z==w) or (x==w and z==1) or (x==w and z==w)) then - prob = 140 -- 54.6% chance to stay - end - table.insert(data, {name = "mcl_core:packed_ice", prob = prob }) - end - end - end - - local base_schematic = { - size = { x=w, y=h, z=w}, - data = data, - } - - minetest.place_schematic(pos, base_schematic) - - if top then - local toppos = {x=pos.x-1, y=pos.y+h, z=pos.z-1} - local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large_top.mts" - minetest.place_schematic(toppos, path, "random") - end + local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large.mts" + minetest.place_schematic(pos, path, "random", nil, false) end mcl_structures.generate_fossil = function(pos) diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder.mts new file mode 100644 index 000000000..c551af502 Binary files /dev/null and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder_small.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder_small.mts new file mode 100644 index 000000000..cc53889b3 Binary files /dev/null and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder_small.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large.mts new file mode 100644 index 000000000..75b086557 Binary files /dev/null and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large_top.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large_top.mts deleted file mode 100644 index 64732492c..000000000 Binary files a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large_top.mts and /dev/null differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_small.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_small.mts index e7d0282ed..7407c8f72 100644 Binary files a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_small.mts and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_small.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_basement.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_basement.mts index 8fcd7eb93..c2a774e78 100644 Binary files a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_basement.mts and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_basement.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_top.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_top.mts index 3368c16cb..e3705236e 100644 Binary files a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_top.mts and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_igloo_top.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_witch_hut.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_witch_hut.mts index d028a8a0a..ee5f96731 100644 Binary files a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_witch_hut.mts and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_witch_hut.mts differ