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 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 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%zP>g|zfjKd=h(S0vIVV0jzbMtJATc>RH6=bX zIkjTW+sT1^2LuFMcFvK0`#ol_ce9zTl`Z|l*oBT9**|~&1MwH%6ck&|JYn)Yu$&nHVINnW 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 zcmV->0EGW_mH`q?R8vg=1ONvB2ml9ve}83bZjllrVFN}6`T<5bMCK#Q)6zctwiC}I zY#T&1wQNTZ7j$*>@*n-l0`_F-ss{m(?s|y+deZdS14(-bmjQ!Dgk?yGmHQL delta 90 zcmbQnSSsWj670*s!obeJ!N6V*1`~yp9hlq{mdGcxIJa=DveA8e_?&a7H&6eDT!E`s sHuHyTENoZbX(sU8{>`_=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&!|AKOd+ZZcq9ppqP`qSTalpy36nB^7h-2F3C> z8Svy-3kp2#{Zah)b(#Fls^kYXMjvPCzJ43k$0XR`S)!=&hR?)Ie^&9a>pxa?-{UPg zYqeb4?TSZ2@`CAx)*3%Ethh^N@ff$y%3Qwk_ZA!ByG3Uw*>D@|N#5{1=;^n}Yy9l( zpC3kVv3=|?z2ox7JF$-)voHOyTrZWns_b0H;>asjWC-5yG65@&y~Ur5-C>kNx8BKXH0U}@Ey9fqvp|_ z9Y(VaxW99SZ4~PES^G$P#-=?%uFs$D@Vrwy-M#fx(2EzP7JmaR_pY}SdsMz9B3Z_8 zwxHF)_e-zGAI*xd%MZ(xeQ$XC-w)BN+kWxw{8Kf3`v2Ts*izz1z_DLN K_miCFZ3h4}yoinf 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`O`P7v7A|NiwFQ}MvG$fkufC2~ecPq2-_(z*o+NfEbJ=GuP<=V?2D52~w zAIzRsXv`=U!L9bR=-BH%w;cZkD-KAm-+kQso&UMhv;M{{{`II%v${R`Lv5sG@jXSs yQ1)3bqD^7FHSk{~i8H7BiN&e=)1+y@jmTDE@swE6Gr z?6plgPwjMGq@39J+3;4!B#ZE=&jSiqpKp!1I`P#FwmF@7385Pe_@`b!cYDFi^u#!O zqxXkoG%bqv_`f|-@K5~ne^n#dnMYWC1SMw+*2I6ywKDKM$95#peuGk{#Qe)UmP))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 zcmV;e08;Kz`~S|>73PMEh8qH^Jrx2sxVhLL-rXBF&Eii zG?KlJoNKG4d(}I)^m@tN*IB7n=USonAC9nN!1{vt1Se%4R8u{EQAy3k`GzyxH>J~y b;iy6~hNgL{!3mdD@^euz2cY2s88UXhHQrLr 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