From ebacdd4e22cd1e3bfff430290db79b7002a4398e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 3 Sep 2017 06:38:50 +0200 Subject: [PATCH] Update and improve a couple of schematics --- mods/MAPGEN/mcl_structures/init.lua | 105 +----------------- .../schematics/mcl_structures_boulder.mts | Bin 0 -> 82 bytes .../mcl_structures_boulder_small.mts | Bin 0 -> 57 bytes .../mcl_structures_ice_spike_large.mts | Bin 0 -> 215 bytes .../mcl_structures_ice_spike_large_top.mts | Bin 98 -> 0 bytes .../mcl_structures_ice_spike_small.mts | Bin 117 -> 150 bytes .../mcl_structures_igloo_basement.mts | Bin 526 -> 537 bytes .../schematics/mcl_structures_igloo_top.mts | Bin 335 -> 329 bytes .../schematics/mcl_structures_witch_hut.mts | Bin 355 -> 363 bytes 9 files changed, 6 insertions(+), 99 deletions(-) create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder.mts create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_boulder_small.mts create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large.mts delete mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_ice_spike_large_top.mts diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 942e235f..1a8779fd 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 0000000000000000000000000000000000000000..c551af502797ea24dabdabbe759518b36aa8d1be GIT binary patch literal 82 zcmeYb3HD`RVPFQqioALTCI;rj%pwMn+~l12zUwq@dTf0J$|9{Qv*} literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..cc53889b30e7e069ce568c5c11f47f02a0ebe12e GIT binary patch literal 57 zcmeYb3HD`RVPFEm)OrR+29ez4ocQGYqExHg{Nm!u KnL*2dIS>G}=@D%J literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..75b0865574c57052ad219dfa9153aa7e10818d54 GIT binary patch literal 215 zcmeYb3HD`RVPIv@Wnith#{%jxfTE&eeSJLx69aQ%W)XvMZgNh1a(+>&RY78Mc4|s| zW^!u9oVSw$`3?vOxa^!G{q}pzUhifzvq$b1&IxA=sT@n0t33O`=~vxyduQectPS7S zQ$Ee~vf16M`OB)FrKx9VuFhV0P22il9seZT4C`0+EOVJQnlrxOY-#r1q7e1O?C}KO o@Mibv3sn84mMUBNhp`JCIkJEL{0HJMz9}fSoO#0Jd0;s+0AU|jod5s; literal 0 HcmV?d00001 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 64732492c6fc23b3b1ec0fa3f4b1286f6a360287..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98 zcmeYb3HD`RVPIuoV_>ZZ0|q7r=ETe*2I1V~ocQGYqExGb#N_PMl=#f#)QUOD2@Fhb zY#a$J&Or=5?8-8WW*zESA~f4Cq+^Y^H23ADOKy8N*1u*~Rk-)}3k$>NMP3U5cf}!y 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 e7d0282edb7e8d0d2d8a371eddac0121a4eeb807..7407c8f72b5ec9c330a2b88f4dfed43f355d315f 100644 GIT binary patch delta 123 zcmXS&#wg?)670*s!obeJ!N6W$U!R(tH&IAAk=c#y7o(en%QNNEmoM4<*(Q8mIY-*X zbZd?~zj#UMmrwG4ANPl)J!1Nn@^TeBeYwf(SvAJnx=Npd=cGWY= eX1tBqdiV~Lu<~)cO@H0`_=g@cQ2*?)sPTri2G>E^?{k;wArDH09I)tz5oCK 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 8fcd7eb935b95ba20a0aa3865cf9f45a70f5e3bc..c2a774e78276a64af756aa0cd43a0e33cc16b413 100644 GIT binary patch delta 353 zcmeBUnaRTA8xrixz{0@Ez{&RdGpvUTRWNW^#6JesOW- z#HAXO)fu(4B(W$+PAn=*O<~}#C`impEw)NZEQ(LdNt}3F%18>Ny0|1Uv#8jrI43bF zzPO;MG&!|AKR<D)&RQ+kcDv${ki1~Jp|!@(3@h%ESvj{Jq6S_-@hJNjBUDdy+SN4|@77 z@)|#T`{#$zTWlXYOz*h-@lNbx$Lvc#EZ0k=t|~j%u{iRIm06Fm)O4e~FwM_i3-bBu g``2auVL1GA>yx*K83X@s)6F^07ifNO`u&;t07l1^(f|Me delta 318 zcmbQq(#OK%8xrixz{0@Jz{&q3TECp)Q?F{100s#Q0U;j#M^nGGTQrOLTq)cjkzy5}lq;KX#w2$Q-=SMO zY98I$VKm!-`#V?IMxkz>wU4xCY}ym#`uyn*&pWl#-CIuuy?9Y-@i)+N?|M72N99{0 zl4T5M3tAm~zw~f_lCFs{Sdvn?HAw9KULGG|F3SJe&eIXlbgYZEhUZw N9Q##tKgns{b^tWIh>idN 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 3368c16cbe7a54560c7c93ec2b7a317816a387df..e3705236e497348663f2acc0202607ae49b09e41 100644 GIT binary patch delta 201 zcmX@lbdrh3Hze4XfrWvSfsKKEB9D@YaBgx=d{TaXcCi(h%t*~in^>zf(N%e(p7_N1 zlJz2B1*s{;R!ONT@kOaA@g?~M6?2Y;MDra`;9&l4WfmU)Xwym?HLJ6y`op|jdl>{J zl-=cn+0zP*8O0*F)t(j|d)?=j)2PirI!K#Bu8P* 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 d028a8a0ae706cebd193c19a3515e3ae003dcb62..ee5f967312d2ac472f8afa895c5fba3d14f92f74 100644 GIT binary patch delta 173 zcmaFN^qOhHgo%fhBpAeUlXK#e6H9Yait_V{tzfK){nGUnbB<2x=4(*ka20&}@%q22 z&odW^Sw*!^<=LSmc_3Zmz@aJqFXvoM(N$KP^*JNu^(upK3+Hc=yoTa8<4q>*?VFRm zdTI4l>+N5vPTsv9xiai|)WYxbeH)Sw{A&8aqMj-j5^P%+=y~?&&o<*b=1VVkKV0Et a)V8d0)j`hbp`VHa4cHevWRf&0+XnzO-crs0 delta 164 zcmaFO^q6VFgo&r6BpAeUlXK#e6H9Yait_V{tzfK){mOL}bB+dG7iv)8d41sH^?$og zOeu^DJn*G4U>5gYu>=Ky7h)MjGI5sHw!yzb^m5WPjRLn?xh;IeCG^)n_2K4#4I+Q{ zZtJSf*YDrEa{ax}P5hs$x^Ky;S+HCPT_(abapk?rvmt+PUKch<)ll{m{l4~S_7pB{ Q@p%`;BR_ENyxsI00NXB1UjP6A