From ac69b7c7104908c027fc5cb2494a20213f495e55 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 1 Jul 2022 04:25:34 +0200 Subject: [PATCH] Add woodland cabin and outpost --- mods/MAPGEN/mcl_structures/api.lua | 7 +-- mods/MAPGEN/mcl_structures/init.lua | 1 + .../mcl_structures_woodland_cabin.mts | Bin 0 -> 2736 bytes .../mcl_structures_woodland_outpost.mts | Bin 0 -> 3341 bytes .../mcl_structures/woodland_mansion.lua | 43 ++++++++++++++++++ 5 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_cabin.mts create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts create mode 100644 mods/MAPGEN/mcl_structures/woodland_mansion.lua diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 596c493a93..4e017b502b 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -68,12 +68,13 @@ function mcl_structures.place_structure(pos, def, pr) if b.node_stone then node_stone = b.node_stone end if b.node_dust then node_dust = b.node_dust end end - minetest.bulk_set_node(minetest.find_nodes_in_area(ground_p1,ground_p2,{"air","group:liquid","mcl_core:snow"}),{name=node_top}) + local replace = {"air","group:liquid","mcl_core:snow","group:tree","group:leaves"} + minetest.bulk_set_node(minetest.find_nodes_in_area(ground_p1,ground_p2,replace),{name=node_top}) if node_dust then minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(ground_p1,0,1,0),vector.offset(ground_p2,0,1,0),{"air"}),{name=node_dust}) end - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(ground_p1,0,-1,0),vector.offset(ground_p2,0,-4,0),{"air","group:liquid","mcl_core:snow"}),{name=node_filler}) - minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(ground_p1,0,-5,0),vector.offset(ground_p2,0,-30,0),{"air","group:liquid","mcl_core:snow"}),{name=node_stone}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(ground_p1,0,-1,0),vector.offset(ground_p2,0,-4,0),replace),{name=node_filler}) + minetest.bulk_set_node(minetest.find_nodes_in_area(vector.offset(ground_p1,0,-5,0),vector.offset(ground_p2,0,-30,0),replace),{name=node_stone}) else if logging then minetest.log("warning","[mcl_structures] "..def.name.." at "..minetest.pos_to_string(pp).." not placed. No solid ground.") diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 3a778b138c..a77b3dbe4b 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -238,6 +238,7 @@ dofile(modpath.."/jungle_temple.lua") dofile(modpath.."/ocean_ruins.lua") dofile(modpath.."/witch_hut.lua") dofile(modpath.."/igloo.lua") +dofile(modpath.."/woodland_mansion.lua") dofile(modpath.."/geode.lua") diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_cabin.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_cabin.mts new file mode 100644 index 0000000000000000000000000000000000000000..f654da926d5583b0109bcdcb3b43cf5fbb768fef GIT binary patch literal 2736 zcmaJtc=E!0f?zPLZ~?d;Hfwq8AO=r19&O}L`7g3Bqjp{5lH&s)wO5Sa=X%GO#rL1wf^N6vV3k$)ks5Q>hV%6@Lzq zvAA~(EMsX{3J9U}J3zrQSqv;0h$Lf~^Q0p{kOt{I9l>`egt;DSjx>(Qz!T=+=Q884 z3h{CqQNCYM=kMKzdF%V4m@uobUC)6R=Edc$L!E z)m*|aQd%S@#azE$IE*}aHJvWp_vOyP#Co;+dZgiFmYgx<(~1e{jLE6R@b@^Vs-3&1 z)abJSe=wjcf3|?+Q^>P%BBoFGqNG7e++J~|?8g@zORf|nTsQH(a_o>`fMZ?y`OY5* zIi;6cdPh$jIVSvMo0wWV8FI&sMn^qlf#uI8t)|tt>-XJA(JFpbCM(@LGlsTgk2;Lj zS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PSbVsM4t4y-N{LekAPF=2d5>V3yVJxdoPB0<;Q`Q?pRjrSr23F50%EfcA4&0*}1$f zEJ`eBOQXxj{1{&GF|pz{e9nREV4_Q~!r)ljU~?<4TD1+Y_FFCTsD+)69gBo)tjepb z!~`{=?nz*8gPJQS_ilSkl!SMNbvqhLM&1^eaFhz$rjlD8iDW^2LB60ZuRjvqkZbEl z^D?WwJB8k@8Oft@O8~?B&wAXVSqDE>*hrNWi_vnEX(*WO)4uhBvgk?RkwZ4W+lrz+ z#)++sfq02FY456~UzR<_Rn?@oZH$so>`gzSbFURKG3-py;p%(ARNJ)!p+BOjhOb~} zr&oouD|V4h)%S)BTNOc~IGHRBkR0_EHph8EodV(PvZv84=~pZ zv#$b;{ji~^(pfNrBCu0%JdJIhNnuh^zCCxbrh~LoyD^H}@36ry*)-mf=n`Ss(xJRj eVEa;_+r6hNh|^bsCGHrP-pwD)8eHa&J^c^W-au>s literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts new file mode 100644 index 0000000000000000000000000000000000000000..6fd48068b0f5d3b67cbbd8448806c7269619a82b GIT binary patch literal 3341 zcmaJ>dmvQ#9zT_oL>omC+S``3*1MFM?z+^jlt&(|5>98%91O>tab`SgY_hxMkydT= zVC=G@^@zr!yo$;!c|?UV9!qIThFnDv-7{xUc5i$BIOq5KzR&0T`F`zPUF-olKpjv4 zRKNS%15kiP5CaER2f!%kjbb4P&ZcmJPzDRc5jwEu?_vyxm_Eo~93T|+!67yq_*CkE zLQD>VGuae27BqJQVT6G)m_C4#)C9(Ggc8hPB7n*~57-xCFaZrREy9EmHiZu1{vZbV zgWl3RuyW2@s^H)VA}f;3A%26%h(a__stLg`x-8DDMr!b0wN4smR`sD1$iY~^+PN%j z4$fe)5IX58tpiXCWkF1$FzFklp%6@zhC&<}BC`?6WMmEV3noRXA4JEP2n}bz{=lj^ zVF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I54xT2_D{?%?0GyntSk};xZNh)I&QZR z?6h)x%Ith&tQs;lUhX1Z<~)k}{n$|d%dfj=m6Jj_vw+JQlFl&m^uka>yTaDo*2Y}4 zq8myNGdFY0EoP6RC+wT}Zyw!Aw(tX~m&>?s%U#qo_uAGy*jsdFVT;3~a{cvNJXG`* zx0$4$tctDd>2+4k3zomUGV=ALR@HRW8^704PCdg*$2@OV!ULMh6O&qQ)IAOHPH9>t zg34wi*in!YHkldTU0a}&87#Nf(Q1I2tWGJ;3Mu_Ad*4#GaQn!Z-IE90Zf5$9#7|jN z;;pN5HclGVdYu_;g>Q_ur$%@#s0Jh%Q-apSNH2A@4Mo-l-}wFDu5rf1KH!hYm!!*qfu)Noq{ z&sma{a8JuCmseK7j|WMi~R&Wjr|fVb(zT1e{bNC6L56FIpHObrZz9< zk@9coD`ec4H>0 zjqpU;qt>^dmBXb*V-A*{vA#u1UJhxBPmgwo9Tg_tDdP*fY@VkWcG$iJmRp_u!4czG zC=8~&3`(22dLtHp+d&tQTJ%kIrBNXc@?o3*+xW@Z-P#(#FO<8E{XzZuS9(uJf|7p4qlCK)mm?9$9l}~_ zucKb3odeCET9I+(>Dcf($>u+A_gx$1*ev#~e}ddNS6t@5qz8 zuU^r9^BpC!eqd$FWa~wTp2}iToLFl)t<(OzqF7k0=6IiaV9iZlbryd_hh-v8R^_dT roJJoX3cr0VP@J`|re(10=jWCa>Ykfx3c@neh^H@f#L_G6?&bdh=AZnz literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_structures/woodland_mansion.lua b/mods/MAPGEN/mcl_structures/woodland_mansion.lua new file mode 100644 index 0000000000..b4b54f5fc7 --- /dev/null +++ b/mods/MAPGEN/mcl_structures/woodland_mansion.lua @@ -0,0 +1,43 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) + +mcl_structures.register_structure("woodland_cabin",{ + place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"}, + fill_ratio = 0.01, + flags = "place_center_x, place_center_z", + solid_ground = true, + make_foundation = true, + chunk_probability = 800, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + biomes = { "RoofedForest" }, + sidelen = 32, + filenames = { + modpath.."/schematics/mcl_structures_woodland_cabin.mts", + modpath.."/schematics/mcl_structures_woodland_outpost.mts", + }, + loot = { + ["mcl_chests:trapped_chest_small" ] ={{ + stacks_min = 2, + stacks_max = 6, + items = { + { itemstring = "mcl_mobitems:bone", weight = 20, amount_min = 4, amount_max=6 }, + { itemstring = "mcl_mobitems:rotten_flesh", weight = 16, amount_min = 3, amount_max=7 }, + { itemstring = "mcl_core:gold_ingot", weight = 15, amount_min = 2, amount_max = 7 }, + --{ itemstring = "mcl_bamboo:bamboo", weight = 15, amount_min = 1, amount_max=3 }, --FIXME BAMBOO + { itemstring = "mcl_core:iron_ingot", weight = 15, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_core:diamond", weight = 3, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_mobitems:saddle", weight = 3, }, + { itemstring = "mcl_core:emerald", weight = 2, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_books:book", weight = 1, func = function(stack, pr) + mcl_enchanting.enchant_uniform_randomly(stack, {"soul_speed"}, pr) + end }, + { itemstring = "mcl_mobitems:iron_horse_armor", weight = 1, }, + { itemstring = "mcl_mobitems:gold_horse_armor", weight = 1, }, + { itemstring = "mcl_mobitems:diamond_horse_armor", weight = 1, }, + { itemstring = "mcl_core:apple_gold_enchanted", weight = 2, }, + } + }} + } +})