From a22dadf412b32b0745ccc367b45b762d835e75d6 Mon Sep 17 00:00:00 2001 From: kno10 Date: Fri, 26 Jul 2024 01:13:21 +0200 Subject: [PATCH] fix bamboo biomes, add new schematic --- mods/MAPGEN/mcl_villages/api.lua | 15 ++++------ mods/MAPGEN/mcl_villages/const.lua | 25 +++++++++++++++-- mods/MAPGEN/mcl_villages/init.lua | 26 +++++++++++++++--- .../MAPGEN/mcl_villages/schematics/bogner.mts | Bin 0 -> 675 bytes .../mcl_villages/schematics/haeuschen2.mts | Bin 0 -> 1083 bytes .../MAPGEN/mcl_villages/schematics/kirche.mts | Bin 0 -> 1880 bytes .../mcl_villages/schematics/schreiber.mts | Bin 0 -> 1210 bytes mods/MAPGEN/mcl_villages/utils.lua | 4 ++- 8 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 mods/MAPGEN/mcl_villages/schematics/bogner.mts create mode 100644 mods/MAPGEN/mcl_villages/schematics/haeuschen2.mts create mode 100644 mods/MAPGEN/mcl_villages/schematics/kirche.mts create mode 100644 mods/MAPGEN/mcl_villages/schematics/schreiber.mts diff --git a/mods/MAPGEN/mcl_villages/api.lua b/mods/MAPGEN/mcl_villages/api.lua index 3648c1269..870d8910c 100644 --- a/mods/MAPGEN/mcl_villages/api.lua +++ b/mods/MAPGEN/mcl_villages/api.lua @@ -46,19 +46,16 @@ local function job_count(schem_lua) end local function load_schema(name, mts) - local schem_lua = minetest.serialize_schematic(mts, "lua", { lua_use_comments = false, lua_num_indent_spaces = 0 }) - .. " return schematic" + local schem_lua = minetest.serialize_schematic(mts, "lua", { lua_use_comments = false, lua_num_indent_spaces = 0 }) .. " return schematic" -- MCLA node names to VL for import - for _, sub in pairs(mcl_villages.mcla_to_vl) do - schem_lua = schem_lua:gsub(sub[1], sub[2]) + if string.find(mts, "new_villages/") then + for _, sub in pairs(mcl_villages.mcla_to_vl) do + schem_lua = schem_lua:gsub(sub[1], sub[2]) + end end local schematic = loadstring(schem_lua)() - return { - name = name, - size = schematic.size, - schem_lua = schem_lua, - } + return { name = name, size = schematic.size, schem_lua = schem_lua } end local all_optional = { "yadjust", "no_ground_turnip", "no_clearance" } diff --git a/mods/MAPGEN/mcl_villages/const.lua b/mods/MAPGEN/mcl_villages/const.lua index 77e3911ac..33ac64301 100644 --- a/mods/MAPGEN/mcl_villages/const.lua +++ b/mods/MAPGEN/mcl_villages/const.lua @@ -110,6 +110,13 @@ mcl_villages.vl_to_mcla = { { '"mcl_core:([a-z]*)wood"', '"mcl_trees:wood_%1"'}, { '"mcl_stairs:stair_darkwood"', '"mcl_stairs:stair_dark_oak"'}, { '"mcl_stairs:stair_([a-z]*)wood"', '"mcl_stairs:stair_%1"'}, + { '"mcl_bamboo:bamboo_fence', '"mcl_fences:bamboo_fence'}, + { '"mcl_bamboo:bamboo_plank', '"mcl_core:bamboowood'}, + { '"mcl_bamboo:bamboo_block', '"mcl_core:bambootree'}, + { '"mcl_stairs:stair_bamboo_plank', '"mcl_stairs:stair_bamboo'}, + { '"mcl_bamboo:pressure_plate_bamboo_wood_', '"mesecons_pressureplates:pressure_plate_bamboo_'}, + { '"mcl_bamboo:bamboo_trapdoor', '"mcl_doors:trapdoor_bamboo'}, + { '"mcl_bamboo:bamboo_door', '"mcl_doors:door_bamboo'}, } mcl_villages.mcla_to_vl = { -- oneway @@ -147,7 +154,13 @@ mcl_villages.mcla_to_vl = { { '"mcl_stairs:stair_dark_oak(["_])', '"mcl_stairs:stair_darkwood%1'}, { '"mcl_stairs:stair_jungle(["_])', '"mcl_stairs:stair_junglewood%1'}, { '"mcl_stairs:stair_acacia(["_])', '"mcl_stairs:stair_acaciawood%1'}, - { '"mcl_stairs:stair_bamboo(["_])', '"mcl_stairs:stair_bamboowood%1'}, + { '"mcl_fences:bamboo_fence', '"mcl_bamboo:bamboo_fence'}, + { '"mcl_core:bamboowood', '"mcl_bamboo:bamboo_plank'}, + { '"mcl_core:bambootree', '"mcl_bamboo:bamboo_block'}, + { '"mcl_stairs:stair_bamboo', '"mcl_stairs:stair_bamboo_plank'}, + { '"mesecons_pressureplates:pressure_plate_bamboo_', '"mcl_bamboo:pressure_plate_bamboo_wood_'}, + { '"mcl_doors:trapdoor_bamboo', '"mcl_bamboo:bamboo_trapdoor'}, + { '"mcl_doors:door_bamboo', '"mcl_bamboo:bamboo_door'}, } mcl_villages.material_substitions = { desert = { @@ -178,6 +191,7 @@ mcl_villages.material_substitions = { { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:birch_fence%1"' }, { '"mcl_stairs:stair_oak_bark([^"]*)"', '"mcl_stairs:stair_sandstonesmooth2%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_sandstonesmooth2%1"' }, -- divert from MCLA, no version 1? + { '"mcl_core:leaves"', '"air"' }, -- addition to MCLA }, spruce = { { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_sprucewood%1"' }, @@ -191,6 +205,7 @@ mcl_villages.material_substitions = { { "mcl_trees:wood_oak", "mcl_trees:wood_spruce" }, { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:spruce_fence%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_spruce%1"' }, + { '"mcl_core:leaves"', '"mcl_core:spruceleaves"' }, -- addition to MCLA }, birch = { { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_birchwood%1"' }, @@ -204,6 +219,7 @@ mcl_villages.material_substitions = { { "mcl_trees:wood_oak", "mcl_trees:wood_birch" }, { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:birch_fence%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_birch%1"' }, + { '"mcl_core:leaves"', '"mcl_core:birchleaves"' }, -- addition to MCLA }, acacia = { { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_acaciawood%1"' }, @@ -217,6 +233,7 @@ mcl_villages.material_substitions = { { "mcl_trees:wood_oak", "mcl_trees:wood_acacia" }, { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:acacia_fence%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_acacia%1"' }, + { '"mcl_core:leaves"', '"mcl_core:acacialeaves"' }, -- addition to MCLA }, dark_oak = { { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_darkwood%1"' }, @@ -230,6 +247,7 @@ mcl_villages.material_substitions = { { "mcl_trees:wood_oak", "mcl_trees:wood_dark_oak" }, { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:dark_oak_fence%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_dark_oak%1"' }, + { '"mcl_core:leaves"', '"mcl_core:darkleaves"' }, -- addition to MCLA }, jungle = { { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_junglewood%1"' }, @@ -243,9 +261,10 @@ mcl_villages.material_substitions = { { "mcl_trees:wood_oak", "mcl_trees:wood_jungle" }, { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:jungle_fence%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_jungle%1"' }, + { '"mcl_core:leaves"', '"mcl_core:jungleleaves"' }, -- addition to MCLA }, bamboo = { - { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_bamboo_block%1"' }, + { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_bamboo_plank%1"' }, -- divert from MCLA { '"mesecons_pressureplates:pressure_plate_oak_([^"]+)"', '"mesecons_pressureplates:pressure_plate_bamboo_%1"', @@ -261,6 +280,7 @@ mcl_villages.material_substitions = { { "mcl_trees:wood_oak", "mcl_trees:wood_bamboo" }, { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:bamboo_fence%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_bamboo%1"' }, + { '"mcl_core:leaves"', '"air"' }, -- addition to MCLA }, cherry = { { '"mcl_stairs:slab_oak([^"]*)"', '"mcl_stairs:slab_cherry_blossom%1"' }, @@ -274,5 +294,6 @@ mcl_villages.material_substitions = { { "mcl_trees:wood_oak", "mcl_trees:wood_cherry_blossom" }, { '"mcl_fences:oak_fence([^"]*)"', '"mcl_fences:cherry_blossom_fence%1"' }, { '"mcl_stairs:stair_oak([^"]*)"', '"mcl_stairs:stair_cherry_blossom%1"' }, + { '"mcl_core:leaves"', '"mcl_core:leaves"' }, -- addition to MCLA }, } diff --git a/mods/MAPGEN/mcl_villages/init.lua b/mods/MAPGEN/mcl_villages/init.lua index 930ef840c..0272643eb 100644 --- a/mods/MAPGEN/mcl_villages/init.lua +++ b/mods/MAPGEN/mcl_villages/init.lua @@ -230,6 +230,14 @@ mcl_villages.register_building({ yadjust = 1, }) +mcl_villages.register_building({ + name = "house_chimney", + mts = schem_path .. "haeuschen2.mts", + min_jobs = 2, + max_jobs = 99, + yadjust = 1, +}) + mcl_villages.register_building({ name = "house_small", mts = schem_path .. "new_villages/house_1_bed.mts", @@ -268,18 +276,28 @@ mcl_villages.register_building({ mcl_villages.register_building({ name = "fletcher", - mts = schem_path .. "new_villages/fletcher.mts", + mts = schem_path .. "bogner.mts", num_others = 8, - yadjust = 1, + yadjust = 0, }) mcl_villages.register_building({ name = "library", mts = schem_path .. "new_villages/library.mts", + min_jobs = 12, + max_jobs = 99, num_others = 15, yadjust = 1, }) +mcl_villages.register_building({ + name = "librarian", + mts = schem_path .. "schreiber.mts", + min_jobs = 1, + max_jobs = 11, + yadjust = 0, +}) + mcl_villages.register_building({ name = "map_shop", mts = schem_path .. "new_villages/cartographer.mts", @@ -333,11 +351,11 @@ mcl_villages.register_building({ mcl_villages.register_building({ name = "church", - mts = schem_path .. "new_villages/church.mts", + mts = schem_path .. "kirche.mts", num_others = 20, min_jobs = 10, max_jobs = 99, - yadjust = 1, + yadjust = 0, }) mcl_villages.register_building({ diff --git a/mods/MAPGEN/mcl_villages/schematics/bogner.mts b/mods/MAPGEN/mcl_villages/schematics/bogner.mts new file mode 100644 index 0000000000000000000000000000000000000000..7a27fbe199972d61d55c6c800a31dcd8d413e30a GIT binary patch literal 675 zcmeYb3HD`RVPI!qWnixd0R~Y9iQMFz_~iVeRI8NCqLTRX%#w`w^rFP#Vg^x=Oj%}5 zPGWj$u~lAvd_iJKMlnP~aY zi&6`65=($CgK^`*d`Jl7r=>ASflSRw%qvMP$}6^lGUC&6^7D%za`4~;g=KtdUP?iJ zW?l({BuHNhP*t%N$oZ*xU`~8eydfk|(@Kl-62UHafF(D zklvb@pLeDN{rcXiRH2btFeR~2|I^jDx+3@U^;Nc@ ap~?)EGu6E*nPQXo{9epe$+(ucUKId;vI!0V literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_villages/schematics/haeuschen2.mts b/mods/MAPGEN/mcl_villages/schematics/haeuschen2.mts new file mode 100644 index 0000000000000000000000000000000000000000..04f3d2c9c808a2b9b4fe3d4852f5514a435487bd GIT binary patch literal 1083 zcmZ`%ZAcVB7#=FDD9b2Iqg<0Dv*=S44t{eIQs_T`A!gX*0W>3e_$<@AtFsJnx&cJ2wYR0n_+9 zJ^1GV5{UJw7#8Rl%N|5s27#u`ycEn4ZVi(FvZxE|SXRMgS+~G^;b+8By*%5NFd$>> zz);3hsLK{GK!_X67U?RnkV_?sf)R+Zagm|&a!m*jJ(j{OG|{vHR{Ib|DlsTDEkvo` zLME0OFOHbdw(Y+`qG@2(7@P;ol!AG}R*;*z_yH~cF=B!^;f=J5WyPr%kz^5ZE^ZRW zo3uHAT!*9(6(Q)Bby@@#`~|BJ#)!`$NU+0eZ2_rI5H!vNmfdb-fkgrV%LYT1!6|kW zs3INfh6l{G@d-J|`xd7cVQm5iXET5lr;Ern1o@n6o92b0d~B*>q!1ZyljsHm@gn9X zgilIPj11d=3S9fY5aXeQ@hWOseicDx$)eC|TU_=D@R>s?EhmkCj*dT9cNLIjP&*(v#iy>30DS=OG`qZ3@}(z z^GHc``|>)U9w|Hby>{!5ZAlAO?TVVebWjiV7M(o(;2) literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_villages/schematics/kirche.mts b/mods/MAPGEN/mcl_villages/schematics/kirche.mts new file mode 100644 index 0000000000000000000000000000000000000000..74436ddb1dba4cf60a2cc47cd01075cce467cc45 GIT binary patch literal 1880 zcmaJ=eNfY87>}oJ;0GUNP(}f9Wj%GAmI@VWoz{9(y`tX0573zsYyzUI=w@o z14QtH3W7NC5Si$3VMM(ol~5GSih!IQ1n=mdaTU4{E_#~`~2SD^Lw7> zm-xhlcwiLZ2?zl1jc+_a1Q3{x;2=U$s6vNP3~0s}1E{AUng+awA_xh?I12c42N@WS zLwb}}5F}`X7y}ImxMMSf)#Zf2&bqA6IKHS9=lt5TEesM!314cp^1^9AM zhNKV!i{)3R8k%9Fw1QtiGfCZp|oVBpG%Z{1#;Q zAY;NYBWN~Y4EldC(t>89pbo<5Odx<`8#XN79>92~X4Y!_r1;(p*@^QKh!Q#@i4hF& zJ_psY(r6xw68r}UgOP6wF>Hu$${QsjD28K%-sy~CK8=*R7?t&|8HL@nE(Y*-9s7R< zK9mkIKo|iCU71mlb_XUeZ~2My}qRwpm>HTe2f5?R?PXL)1Vf zF;0xg4@Zi~_C-Hm-PR_&@$Bf>bNiZZU0rvodcZd(qDmC9Y(>J};x7Y6Ti>m{6!T)1 zO-r@u3T!a52^H%_KWs^QXTP85v@~2L7i87yX8kfC)KCR60lSVTH20RRnYM@eX7-NT za_hK{n>3;`+Ud_0h(+h2MLvV2@r$>#C?{QdnccAUV2E^X8 zbNYJnt0PwRUsF%&%?d_oa&+jm6UUc#cJ%~29!+Shxo7t&P9C3CmiW1UnBAi?u3JX^ z(N%jXB{T(2b{yLn`uK)&eMgOVV|(VEz^I7sTUbf=?QLO&;pX|i?Ne@vRA&2NMM!7! z!|v~&%I{}Adul0DSDBuyinH#VP}LIGAUdR0m_Z|&xOc(rN2(xL|!PZZh5$SZ?95$2GUxmjmn(Zs2&r0 zp?|Piecj%t*mq(=$%ea>NOf~YGuU~pMq_V>8`g)mZs=*M+O8GMt}d}3T3B=WlN!&I zXuam8jvxu_ey6j znqOhMTjcY+Ar`kkb#!FxY(BEBWkimur=;+pnxdBsMpqq{6gNKDT_}tzd^O@TZ~w4= E0Kk41od5s; literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_villages/schematics/schreiber.mts b/mods/MAPGEN/mcl_villages/schematics/schreiber.mts new file mode 100644 index 0000000000000000000000000000000000000000..3656c72f0591e26e080695756ded768dc8df6984 GIT binary patch literal 1210 zcmeYb3HD`RVc-P8dKh3(W{}8D&WTUXFG{sa$t)^~FV8H=h)*v{EG}kXPRuM~5Cut> zW#;50rl%HL<>kj0B$i|pLxhVd3x zpI?xg2eAyMEhjMvtSi1Gzkopqq_aFRC#TpdIX@{WCpF%PK@cQXl3$dZ0kj%SGw_0h zz^(<`hv0%7&%h6tg_wb)yrd{Kl|dLTUtE%(mzq?RnViia4iZeu$uCa@x;n9{v?w(` zDW^2Ggn*j*7Xv#H7(6AwU;|O{#ks&Rgm^S5KR+92F^J4a%}HZW1u2Gjv>+d- z0m6(2vcVpX2L*Iy3WF3#89c^8(H)p=cX2?Cg)RTi@V|@yl{%kV9ANgkZ27$HPZ|U~KD}LR&@l6XljzAApXaQ*6kRO1VUd`~ z;+Y%1vWi@peueA(#3kW(*n3WG%gnW0DPJb*R>3iZ8Z%YVw& zJ<|LC@%x9zO5#8J7tKj|_n>^K>D^5&Hy(zmtqWVWn?+qFcj<=+FP+myr7t6$I)pwg z`|K-dmO;=DB##bcFQlz=V(7)Y`pwV{nQUN4}*WRgk)AW0RRN-?hpU~ literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/mcl_villages/utils.lua b/mods/MAPGEN/mcl_villages/utils.lua index fc6868110..2527fd547 100644 --- a/mods/MAPGEN/mcl_villages/utils.lua +++ b/mods/MAPGEN/mcl_villages/utils.lua @@ -1,4 +1,5 @@ local function is_above_surface(name) + -- TODO: use groups return name == "air" or -- note: not dirt_with_grass! string.find(name,"tree") or @@ -6,7 +7,8 @@ local function is_above_surface(name) string.find(name,"snow") or string.find(name,"fern") or string.find(name,"flower") or -- includes grass decorations - string.find(name,"bush") + string.find(name,"bush") or + name == "mcl_bamboo:bamboo" or name == "mcl_core:vine" end function mcl_villages.find_surface_down(lvm, pos, surface_node) local p6 = vector.new(pos)