From 0dd4d501ef23dc417c5285d8d0ffc0f9f1b2d5eb Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 8 Sep 2017 03:31:20 +0200 Subject: [PATCH] Move villages into schematic, fix bad nodes --- mods/MAPGEN/mcl_structures/init.lua | 14 ++++++-------- .../schematics/mcl_structures_village.mts | Bin 0 -> 3498 bytes .../mcl_structures/schematics/pnj_field_1.we | 1 - .../mcl_structures/schematics/pnj_house_1.we | 1 - .../mcl_structures/schematics/pnj_house_2.we | 1 - .../mcl_structures/schematics/pnj_house_3.we | 1 - .../mcl_structures/schematics/pnj_light.we | 1 - .../mcl_structures/schematics/pnj_town_1.we | 1 - .../schematics/pnj_town_withway_1.we | 1 - .../mcl_structures/schematics/pnj_watersource.we | 1 - 10 files changed, 6 insertions(+), 16 deletions(-) create mode 100644 mods/MAPGEN/mcl_structures/schematics/mcl_structures_village.mts delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_field_1.we delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_house_1.we delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_house_2.we delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_house_3.we delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_light.we delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_town_1.we delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_town_withway_1.we delete mode 100644 mods/MAPGEN/mcl_structures/schematics/pnj_watersource.we diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 441674ae..2bb3cd7c 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -142,7 +142,7 @@ end -- The call of Struct mcl_structures.call_struct= function(pos, struct_style) if struct_style == "village" then - mcl_structures.geerate_village(pos) + mcl_structures.generate_village(pos) elseif struct_style == "desert_temple" then mcl_structures.generate_desert_temple(pos) elseif struct_style == "desert_well" then @@ -163,13 +163,11 @@ mcl_structures.call_struct= function(pos, struct_style) end mcl_structures.generate_village = function(pos) - -- No Generating for the moment only place it :D - local city = mcl_structures.get_struct("pnj_town_1.we") - local newpos = {x=pos.x,y=pos.y,z=pos.z} - if newpos == nil then - return - end - mcl_structures.deserialise_WE(newpos, city ) + -- No generating for the moment, only place it :D + -- TODO: Do complete overhaul of the algorithm + local newpos = {x=pos.x,y=pos.y-1,z=pos.z} + local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_village.mts" + minetest.place_schematic(newpos, path, "random", nil, true) end mcl_structures.generate_desert_well = function(pos) diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_village.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_village.mts new file mode 100644 index 0000000000000000000000000000000000000000..a63aa3e810c66170615e8850dd0b748dfb952510 GIT binary patch literal 3498 zcmeYb3HD`RVbEdVWw5G81`H|;%!!#r4E(vtIq}K)MX6TF`AJDRsSE-jfwa`TB2w^aYfz@WD7MB!TC4;E=qRjLRsL@~nn0QWVS_uO$SUJd*<@xz3 z48l+sf!r0JmsnC-l$e9+Dv;yi!D_`pT49a_3qw6B36e<3&o3&r0x3+*iwAMylj02- zB(Rtd@j4DoCGmz3FO}pMfn09|rsK;Kb8;AjLG~o&=VupNfys>2oHQg4l@z6>GU(@~ z7N;iX=M~2n6r~mymlmZK?SR^qh zfK;UA%w737x`TS1ud1^FfMi8(o$rMVEhA;Rb?iW3WRGV{_IRB;=Ul30`tQzipe z21$qzN5+HGV|;pINh(qRreqeCK+;}XVo`2pUb)r2{2f5@bKeq1o*j2OqX+`1e&o6dL+<*CK-@Qj=>psXxeqZ~s zsW7I7{XS#trJv_smhCOtV;k=Ct~Kbnb-Y{Q*P7#U;`a}hJ4`Rx_xbCx6${^o^maWh zwD!4kEq9;D$Lo>XcKqPm$9!war@5ck9;=)alYaEaxt%M&Zu{?ZNAL8+=hoZ)-rfG* z=Q!^p>j}nE`;z;kg{Qy2@#2&0&i6Y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