From 3e6b16735f2611e90a307e0b29be2bb55bd1c00e Mon Sep 17 00:00:00 2001 From: codiac Date: Sat, 24 Feb 2024 14:32:02 +1000 Subject: [PATCH] delete a bunch of unused village stuff --- mods/MAPGEN/mcl_villages/buildings.lua | 213 +----------------- mods/MAPGEN/mcl_villages/const.lua | 32 --- mods/MAPGEN/mcl_villages/foundation.lua | 43 ---- mods/MAPGEN/mcl_villages/init.lua | 19 +- .../mcl_villages/schematics/belltower.mts | Bin 211 -> 0 bytes .../mcl_villages/schematics/blacksmith.mts | Bin 988 -> 0 bytes .../mcl_villages/schematics/butcher.mts | Bin 887 -> 0 bytes .../MAPGEN/mcl_villages/schematics/church.mts | Bin 949 -> 0 bytes mods/MAPGEN/mcl_villages/schematics/farm.mts | Bin 379 -> 0 bytes mods/MAPGEN/mcl_villages/schematics/lamp.mts | Bin 176 -> 0 bytes .../mcl_villages/schematics/large_house.mts | Bin 1179 -> 0 bytes .../mcl_villages/schematics/library.mts | Bin 802 -> 0 bytes .../mcl_villages/schematics/medium_house.mts | Bin 801 -> 0 bytes .../mcl_villages/schematics/small_house.mts | Bin 572 -> 0 bytes .../MAPGEN/mcl_villages/schematics/tavern.mts | Bin 1007 -> 0 bytes mods/MAPGEN/mcl_villages/schematics/well.mts | Bin 444 -> 0 bytes mods/MAPGEN/mcl_villages/utils.lua | 50 ---- settingtypes.txt | 3 - 18 files changed, 2 insertions(+), 358 deletions(-) delete mode 100644 mods/MAPGEN/mcl_villages/schematics/belltower.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/blacksmith.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/butcher.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/church.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/farm.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/lamp.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/large_house.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/library.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/medium_house.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/small_house.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/tavern.mts delete mode 100644 mods/MAPGEN/mcl_villages/schematics/well.mts diff --git a/mods/MAPGEN/mcl_villages/buildings.lua b/mods/MAPGEN/mcl_villages/buildings.lua index 28dcc16f6..2e0e2991d 100644 --- a/mods/MAPGEN/mcl_villages/buildings.lua +++ b/mods/MAPGEN/mcl_villages/buildings.lua @@ -10,14 +10,6 @@ local S = minetest.get_translator(minetest.get_current_modname()) function mcl_villages.initialize_settlement_info(pr) local count_buildings = {} - -- count_buildings table reset - for k,v in pairs(mcl_villages.schematic_table) do - count_buildings[v["name"]] = 0 - end - - -- randomize number of buildings - local number_of_buildings -- = pr:next(10, 25) - for k, v in pairs(mcl_villages.schematic_houses) do count_buildings[v["name"]] = 0 end @@ -26,109 +18,13 @@ function mcl_villages.initialize_settlement_info(pr) end -- For new villages this is the number of jobs - number_of_buildings = pr:next(min_jobs, max_jobs) + local number_of_buildings = pr:next(min_jobs, max_jobs) local number_built = 1 mcl_villages.debug("Village ".. number_of_buildings) return count_buildings, number_of_buildings, number_built end -------------------------------------------------------------------------------- --- fill settlement_info --------------------------------------------------------------------------------- -function mcl_villages.create_site_plan(maxp, minp, pr) - local settlement_info = {} - local building_all_info - local possible_rotations = {"0", "90", "180", "270"} - -- find center of chunk - local center = { - x=math.floor((minp.x+maxp.x)/2), - y=maxp.y, - z=math.floor((minp.z+maxp.z)/2) - } - -- find center_surface of chunk - local center_surface , surface_material = mcl_villages.find_surface(center, true) - local chunks = {} - chunks[mcl_vars.get_chunk_number(center)] = true - - -- go build settlement around center - if not center_surface then return false end - - -- initialize all settlement_info table - local count_buildings, number_of_buildings, number_built = mcl_villages.initialize_settlement_info(pr) - -- first building is townhall in the center - building_all_info = mcl_villages.schematic_table[1] - local rotation = possible_rotations[ pr:next(1, #possible_rotations ) ] - -- add to settlement info table - local index = 1 - settlement_info[index] = { - pos = center_surface, - name = building_all_info["name"], - hsize = building_all_info["hsize"], - rotat = rotation, - surface_mat = surface_material - } - --increase index for following buildings - index = index + 1 - -- now some buildings around in a circle, radius = size of town center - local x, z, r = center_surface.x, center_surface.z, building_all_info["hsize"] - -- draw j circles around center and increase radius by math.random(2,5) - for j = 1,20 do - -- set position on imaginary circle - for j = 0, 360, 15 do - local angle = j * math.pi / 180 - local ptx, ptz = x + r * math.cos( angle ), z + r * math.sin( angle ) - ptx = mcl_villages.round(ptx, 0) - ptz = mcl_villages.round(ptz, 0) - local pos1 = { x=ptx, y=center_surface.y+50, z=ptz} - local chunk_number = mcl_vars.get_chunk_number(pos1) - local pos_surface, surface_material - if chunks[chunk_number] then - pos_surface, surface_material = mcl_villages.find_surface(pos1) - else - chunks[chunk_number] = true - pos_surface, surface_material = mcl_villages.find_surface(pos1, true) - end - if not pos_surface then break end - - local randomized_schematic_table = mcl_villages.shuffle(mcl_villages.schematic_table, pr) - -- pick schematic - local size = #randomized_schematic_table - for i = size, 1, -1 do - -- already enough buildings of that type? - if count_buildings[randomized_schematic_table[i]["name"]] < randomized_schematic_table[i]["max_num"]*number_of_buildings then - building_all_info = randomized_schematic_table[i] - -- check distance to other buildings - local distance_to_other_buildings_ok = mcl_villages.check_distance(settlement_info, pos_surface, building_all_info["hsize"]) - if distance_to_other_buildings_ok then - -- count built houses - count_buildings[building_all_info["name"]] = count_buildings[building_all_info["name"]] +1 - rotation = possible_rotations[ pr:next(1, #possible_rotations ) ] - number_built = number_built + 1 - settlement_info[index] = { - pos = pos_surface, - name = building_all_info["name"], - hsize = building_all_info["hsize"], - rotat = rotation, - surface_mat = surface_material - } - index = index + 1 - break - end - end - end - if number_of_buildings == number_built then - break - end - end - if number_built >= number_of_buildings then - break - end - r = r + pr:next(2,5) - end - mcl_villages.debug("really ".. number_built) - return settlement_info -end ------------------------------------------------------------------------------- -- evaluate settlement_info and place schematics @@ -151,31 +47,6 @@ local function construct_node(p1, p2, name) minetest.log("warning", "[mcl_villages] Attempt to 'construct' inexistant nodes: " .. name) end -local function spawn_iron_golem(pos) - local p = minetest.find_node_near(pos,50,"mcl_core:grass_path") - if p then - local l=minetest.add_entity(p,"mobs_mc:iron_golem"):get_luaentity() - if l then - l._home = p - end - end -end - -local function spawn_villagers(minp,maxp) - local beds=minetest.find_nodes_in_area(vector.offset(minp,-20,-20,-20),vector.offset(maxp,20,20,20),{"mcl_beds:bed_red_bottom"}) - for _,bed in pairs(beds) do - local m = minetest.get_meta(bed) - if m:get_string("villager") == "" then - local v=minetest.add_entity(bed,"mobs_mc:villager") - if v then - local l=v:get_luaentity() - l._bed = bed - m:set_string("villager",l._id) - end - end - end -end - local function spawn_cats(pos) local sp=minetest.find_nodes_in_area_under_air(vector.offset(pos,-20,-20,-20),vector.offset(pos,20,20,20),{"group:opaque"}) for i=1,math.random(5) do @@ -222,88 +93,6 @@ local function init_nodes(p1, p2, size, rotation, pr) end end -function mcl_villages.place_schematics(settlement_info, pr) - local building_all_info - - --attempt to place one belltower in the center of the village - this doesn't always work out great but it's a lot better than doing it first or last. - local belltower = table.remove(settlement_info,math.floor(#settlement_info/2)) - if belltower then - mcl_structures.place_schematic( - vector.offset(belltower["pos"],0,0,0), - mcl_villages.modpath.."/schematics/belltower.mts", - belltower["rotation"], - nil, - true, - nil, - function(p1, p2, size, rotation, pr) - spawn_iron_golem(p1) - end, - pr - ) - spawn_cats(belltower["pos"]) - end - - for i, built_house in ipairs(settlement_info) do - for j, schem in ipairs(mcl_villages.schematic_table) do - if settlement_info[i]["name"] == schem["name"] then - building_all_info = schem - break - end - end - - local pos = settlement_info[i]["pos"] - local rotation = settlement_info[i]["rotat"] - - -- get building node material for better integration to surrounding - local platform_material = settlement_info[i]["surface_mat"] - local building = building_all_info["mts"] - local replace_wall = building_all_info["rplc"] - - -- schematic conversion to lua - local schem_lua = minetest.serialize_schematic(building, - "lua", - {lua_use_comments = false, lua_num_indent_spaces = 0}).." return schematic" - - -- replace material - if replace_wall then - --Note, block substitution isn't matching node names exactly; so nodes that are to be substituted that have the same prefixes cause bugs. - -- Example: Attempting to swap out 'mcl_core:stonebrick'; which has multiple, additional sub-variants: (carved, cracked, mossy). Will currently cause issues, so leaving disabled. - if platform_material == "mcl_core:snow" or platform_material == "mcl_core:dirt_with_grass_snow" or platform_material == "mcl_core:podzol" then - schem_lua = schem_lua:gsub("mcl_core:tree", "mcl_core:sprucetree") - schem_lua = schem_lua:gsub("mcl_core:wood", "mcl_core:sprucewood") - elseif platform_material == "mcl_core:sand" or platform_material == "mcl_core:redsand" then - schem_lua = schem_lua:gsub("mcl_core:tree", "mcl_core:sandstonecarved") - schem_lua = schem_lua:gsub("mcl_core:cobble", "mcl_core:sandstone") - schem_lua = schem_lua:gsub("mcl_core:wood", "mcl_core:sandstonesmooth") - schem_lua = schem_lua:gsub("mcl_core:brick_block", "mcl_core:redsandstone") - end - end - schem_lua = schem_lua:gsub("mcl_core:dirt_with_grass", platform_material) - - schem_lua = schem_lua:gsub("mcl_stairs:stair_wood_outer", "mcl_stairs:slab_wood") - schem_lua = schem_lua:gsub("mcl_stairs:stair_stone_rough_outer", "air") - - -- format schematic string - local schematic = loadstring(schem_lua)() - - -- build foundation for the building an make room above - -- place schematic - mcl_structures.place_schematic( - pos, - schematic, - rotation, - nil, - true, - nil, - function(p1, p2, size, rotation, pr) - init_nodes(p1, p2, size, rotation, pr) - spawn_villagers(p1,p2) - end, - pr - ) - end -end - local function layout_town(minp, maxp, pr, input_settlement_info) local settlement_info = {} local xdist = math.abs(minp.x - maxp.x) diff --git a/mods/MAPGEN/mcl_villages/const.lua b/mods/MAPGEN/mcl_villages/const.lua index 31cb853d8..b31182ae6 100644 --- a/mods/MAPGEN/mcl_villages/const.lua +++ b/mods/MAPGEN/mcl_villages/const.lua @@ -46,38 +46,6 @@ function mcl_villages.grundstellungen() end end --- --- possible surfaces where buildings can be built --- - --- --- path to schematics --- -schem_path = mcl_villages.modpath.."/schematics/" - --- --- list of schematics --- -local basic_pseudobiome_villages = minetest.settings:get_bool("basic_pseudobiome_villages", true) - -mcl_villages.schematic_table = { - {name = "large_house", mts = schem_path.."large_house.mts", hwidth = 11, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, - {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.055, rplc = basic_pseudobiome_villages }, - {name = "butcher", mts = schem_path.."butcher.mts", hwidth = 11, hdepth = 8, hheight = 10, hsize = 14, max_num = 0.03 , rplc = basic_pseudobiome_villages }, - {name = "church", mts = schem_path.."church.mts", hwidth = 13, hdepth = 13, hheight = 14, hsize = 15, max_num = 0.04 , rplc = basic_pseudobiome_villages }, - {name = "farm", mts = schem_path.."farm.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.1 , rplc = basic_pseudobiome_villages }, - {name = "lamp", mts = schem_path.."lamp.mts", hwidth = 3, hdepth = 3, hheight = 13, hsize = 10, max_num = 0.1 , rplc = false }, - {name = "library", mts = schem_path.."library.mts", hwidth = 12, hdepth = 12, hheight = 8, hsize = 13, max_num = 0.04 , rplc = basic_pseudobiome_villages }, - {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 8, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, - {name = "small_house", mts = schem_path.."small_house.mts", hwidth = 9, hdepth = 7, hheight = 8, hsize = 13, max_num = 0.7 , rplc = basic_pseudobiome_villages }, - {name = "tavern", mts = schem_path.."tavern.mts", hwidth = 11, hdepth = 10, hheight = 10, hsize = 13, max_num = 0.050, rplc = basic_pseudobiome_villages }, - {name = "well", mts = schem_path.."well.mts", hwidth = 6, hdepth = 8, hheight = 6, hsize = 10, max_num = 0.045, rplc = basic_pseudobiome_villages }, -} - --- --- maximum allowed difference in height for building a sttlement --- -mcl_villages.max_height_difference = 56 mcl_villages.half_map_chunk_size = 40 -- diff --git a/mods/MAPGEN/mcl_villages/foundation.lua b/mods/MAPGEN/mcl_villages/foundation.lua index dd4500020..3349d3960 100644 --- a/mods/MAPGEN/mcl_villages/foundation.lua +++ b/mods/MAPGEN/mcl_villages/foundation.lua @@ -25,49 +25,6 @@ function mcl_villages.ground(pos, pr) -- role model: Wendelsteinkircherl, Branne end end -------------------------------------------------------------------------------- --- function clear space above baseplate -------------------------------------------------------------------------------- -function mcl_villages.terraform(settlement_info, pr) - local fheight, fwidth, fdepth, schematic_data - - for i, built_house in ipairs(settlement_info) do - -- pick right schematic_info to current built_house - for j, schem in ipairs(mcl_villages.schematic_table) do - if settlement_info[i]["name"] == schem["name"] then - schematic_data = schem - break - end - end - local pos = settlement_info[i]["pos"] - if settlement_info[i]["rotat"] == "0" or settlement_info[i]["rotat"] == "180" then - fwidth = schematic_data["hwidth"] - fdepth = schematic_data["hdepth"] - else - fwidth = schematic_data["hdepth"] - fdepth = schematic_data["hwidth"] - end - fheight = schematic_data["hheight"] -- remove trees and leaves above - - -- - -- now that every info is available -> create platform and clear space above - -- - for xi = 0,fwidth-1 do - for zi = 0,fdepth-1 do - for yi = 0,fheight *3 do - if yi == 0 then - local p = {x=pos.x+xi, y=pos.y, z=pos.z+zi} - mcl_villages.ground(p, pr) - else - -- write ground - minetest.swap_node({x=pos.x+xi, y=pos.y+yi, z=pos.z+zi},{name="air"}) - end - end - end - end - end -end - -- Empty space above ground local function overground(pos, fwidth, fdepth, fheight) diff --git a/mods/MAPGEN/mcl_villages/init.lua b/mods/MAPGEN/mcl_villages/init.lua index ea11de780..e0a2e66df 100644 --- a/mods/MAPGEN/mcl_villages/init.lua +++ b/mods/MAPGEN/mcl_villages/init.lua @@ -18,11 +18,8 @@ mcl_villages.grundstellungen() local S = minetest.get_translator(minetest.get_current_modname()) -local villagegen={} - minetest.register_alias("mcl_villages:stonebrickcarved", "mcl_core:stonebrickcarved") - -minetest.register_node("mcl_villages:structblock", {drawtype="airlike",groups = {not_in_creative_inventory=1},}) +minetest.register_alias("mcl_villages:structblock", "air") -- -- on map generation, try to build a settlement @@ -73,20 +70,6 @@ if mg_name ~= "singlenode" then end) end -minetest.register_lbm({ - name = "mcl_villages:structblock", - run_at_every_load = true, - nodenames = {"mcl_villages:structblock"}, - action = function(pos, node) - minetest.set_node(pos, {name = "air"}) - if not villagegen[minetest.pos_to_string(pos)] then return end - local minp=villagegen[minetest.pos_to_string(pos)].minp - local maxp=villagegen[minetest.pos_to_string(pos)].maxp - minetest.emerge_area(minp, maxp, ecb_village, villagegen[minetest.pos_to_string(minp)]) - villagegen[minetest.pos_to_string(minp)]=nil - end -}) - minetest.register_on_mods_loaded(function() local olfunc = minetest.registered_chatcommands["spawnstruct"].func minetest.registered_chatcommands["spawnstruct"].func = function(pn,p) diff --git a/mods/MAPGEN/mcl_villages/schematics/belltower.mts b/mods/MAPGEN/mcl_villages/schematics/belltower.mts deleted file mode 100644 index 8eb524312cc98c62899ef6d7714398c5ef869d4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 211 zcmeYb3HD`RVPIuoV_>ZZ0|s^m;oRh$_~iVeRIB2W{JhkpqRixM2Ij=fA_g&#OnG8X zPBD^Hya9sAc0LZz9heZfe$2;lnOEjL^240_&JGrC8Y)GSQ} zsDLR;mSKP~BEZgiViC-l1x-OL%MrwMsYrSYDO9=Y1i9Z2w#aTa7r531sR$bor64)_ z7K(J22zMW7bJN>0ICp7DLWDt?Kpp0R%*ge!2_-=yG`WIm2{~KtunLR$H9X}mH8o`yj6{$aQ6{1&h@izCfr+Pr9F$browH}K z{AKF97F#2tPGk4is@L&tnTaR9-}+g2Z#-Q6H(XP6t{9iLm1lIXzuJ-3{sa^aW#_EU zDa&+ftJ=#R6;8*Dj8>PtKj2HMe7te^<>{L}hmQ>OO@6HDF>b#iHCJ8?XFu!PG2Rr; zZR$)h2A=Z^c%=WDcK6JkE~_PPCN}2F{-F&Ol^?o7{evA-6`xzl-oX`T>-QZ!HT(33 z&nzB4p5nusvPS+KnwZ~y35RCG1rN~;UqfS}uemw-elN~R3ymf3ZUN`x(&_b!V{@_J u^tt)?ne5(Fzi1ns9((h;N^)upGx2T`u8?t%~S!*JsB#=fAAj=)s0^O diff --git a/mods/MAPGEN/mcl_villages/schematics/butcher.mts b/mods/MAPGEN/mcl_villages/schematics/butcher.mts deleted file mode 100644 index 1780912bb50de442c5027d61066532ccc3b6cee8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 887 zcmeYb3HD`RVc=%qWMHd@0R|}s-rVGz_~iVeRI8NCq7nvSI5)j0vA8(CAh9HafgdiI zoS&4GlghxHm|4Ui0uoJ2%}Y)#w#rY;hAP0;!D8FD*%hx*A=MK?0-$9t!d0nI#$V-~eFI%S|m#P0r5)21QY7adBx; zY5~xRAZJ6l@nAm0hO{(DsAQI;=B5=T0<~I!DF#tw7v&@-0bQ4$mkLpwl$ug(1tj8& zfVd>T01{lqx%t_tMOF}sK^&wXMPX8YNlAV#gCyMHU=x#yGLy5D6N}1HQy_X!d{9c@P+iW>qoo)S^TjVD= zah6{US|0Uo|3;6}wc#H>tTI>}1W&8tQ*%(EA5dHeVQbC zRIhsBs`qpL-xhj3Z$;snpo^8EC9~(Q*uU%U`@?*4^L>4L)LHey6_>S^O)ruN6L>g5DdzLy Y6?Ui9wpk0Ld1cIM>#b!7lQ)(D0Jvyd-v9sr diff --git a/mods/MAPGEN/mcl_villages/schematics/church.mts b/mods/MAPGEN/mcl_villages/schematics/church.mts deleted file mode 100644 index e59f90f1f812d393f49c0ffe6d2e0b8f5fba7ab4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 949 zcmeYb3HD`RVc=!pXW*+x1q_l5yt&Ca@yYo`sa7eOMI{W(iJ3(V(jc+o5+JkK3QWb9 z=jW%y=a-hG7BProm1N+Do0FWMl$4Xozy}vd&q*vUW)MNvmy?(THWSJElA_d924T3S z;*$Kl)TE-!f$Qd7PX$dy1-2B^Zx5JM&%8+X&VPOD%HrFtb6cCkcV5=$5Byy(;7TWqzc))gZJXBf*P_aFyW9?|rLhT5;`V&gHgAdB16UB61Gp(_y z6rF5&?q}?cYj;b;Zxn4wZ(pu{aPPw=srNo{YfgEd{Brfe{jO_LVfXfOz3JDDzsXwp zKl|;W9=!)$OElD~<0n43Sx~<1>aF*O{_hO_8}Q5iqhDwtW7vn4Yu9j>cKlEH^5D?f z&)kg;3IZG~OpPyu`kuGmZhXD+rI*6e1Giim8&g@1p3l#&;#*wdq|9cinWC)Ax;N@* zki-Eug-O93e|Tjyn5A!?+?mwDE|cM<%sb_kp{UiwP0VNa%=vmmYvJFnD<>C8wd~uz UP2tbH^e<7t8GZTxIFjc80G0iX;s5{u diff --git a/mods/MAPGEN/mcl_villages/schematics/farm.mts b/mods/MAPGEN/mcl_villages/schematics/farm.mts deleted file mode 100644 index b45ff1d6f3cf640419ec53309916e48db2d5c7a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 379 zcmeYb3HD`RVc=xoU|_F@0tOxi-rVGz_~iVeRI8NCq7nw?#LOZjv67diorBYG1P|m^30Nq`1GR0;$j97 zu)&E%xtV$CR>k?5Iq~JGB@Chv!-49{6M?437w4B2C8sh7AuBG(FG(!PhuD?|HK05r zHL(O$S#n}gQGQ9qoVUThz#utYZ);oI*k1Z5-aA@2YAn1Fc z@o8Y_!b2~$m0v&n>Dk{o!{pb-BbF=f{T6cwS~6qyq~#?MX=~+k&h;yo9t@SP`%rMT vY5o@b_&fe@|38`>|0_QGxcNV10ahxH#sLhIlm~?DkZb1gn>CRvxq?)B$kq&UsP;WQj}N# zV#Vhdq~Pm5LMB78 z#7hvAR4<|+K0uhNDqatW_+3-RlB6QPCMZGvs#!O>NEbC^2>cH9`w%He_@_~W zVhu?|k@rIErHFvV0YX5uzf%<@6DOot2Mhf@d=hL%W~))$Q7EdaAy^i;2F&3$2hwEL zq`Xx@Ql%BKl=uwn->{H3|2KLBNs_|T-wjxpO6pBB;}SD?iD zGGG1cqRbUwm(;5&IxKW46j?YNUZRO6HcJ4DcsHz=DyWLnMa{iK){f4$Z{xoIlf+7l ziKsadNHh_NgkmQVbyqQ@B4dKUvixna$Y>UGGHz&7b<71>*eFY2V#Yesz$y40 z>I4}EeCWnhqF@kncF^Y>W zjOO-49a$X~R#qBcH8V7>`h8tN!Kur`k2bCCJFvX|gTmcHZKO2ZNDOkB!b3^^->VO->u diff --git a/mods/MAPGEN/mcl_villages/schematics/library.mts b/mods/MAPGEN/mcl_villages/schematics/library.mts deleted file mode 100644 index 521ee9fb60fcd3fb459bd09bced589d811a84366..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmeYb3HD`RVc=olWZJ1OR5AYrHJ89 zM2N)amzJa!F-YT4!XSYx2@93@lKcWl7$@cDXBS(6$&A#TGzLMCaumly90!gtgw4r` zMP;ce45}d2X*v1jsYM0(CBP5^Gvk5m_@tcD)Ob)JWTsTic^lTv*Q~(fqH!)a?_J`i z^LN*;mnsom!5I5Y`HrfJT<38|U9N))w=JBDJ)NV&nI>pCT|ZGE%X4??^Ajs~@~KRB z+O^X`#N)d736GU0B^DLGKY6?M!Q|HY;?qyR-~BhnUG2K2(RIn6^J6Y0P51s9%D?U VA*koetk8QC-R6){`zv?$2Xnn56&MfPOxF> z3#nYh_k8`Qk~j4;5B=9Rsn`2(vu0n?uCpfdz1M#?d48Y2`&V3OsOfCA*MIX o?wO}U!uRfJ`zIKB9)4WgQm>>S@1G=}Gx4+a{~dA@CvH&!0B-S0od5s; diff --git a/mods/MAPGEN/mcl_villages/schematics/small_house.mts b/mods/MAPGEN/mcl_villages/schematics/small_house.mts deleted file mode 100644 index a3789504eedee18849ec211439fa09659c898b5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 572 zcmeYb3HD`RVc-Np_Iem#5MtoXP0oo=&M!)}O35rLVPH5Qk0sCWHVTkBuG9&5I;2! z%!yBmH)N2gC`impEw%!Y@p*|QrA3K3@o71UB@8$;l>jvfg3K$)FG|h;>IBmaV#w|S zxfbdRuqog$C@#s*OHC@uOwLYDEGkP)fjBZJKR?$BL_h)}DK(|o3P{8k0dZ1(NeNH_ z91tiHCHVym66h9!dLB*W6!EgBvD{!!!O1WD;zhb@Jqg{N3(U(`9tox$3KuAU1 zv4LlWN~*Z6*u<&3UtGWbW8DOyRz{X@SqELJELOCtxcl(Ep7&sdn%m+do9jJyIu&ZK z+E#M5xMG*T8*^`3Wz^CSHj6)O{k`;q>_e5+zWn+Ht+(U98q9YtEVdA@JePPsg)e(z wVt~B`Yj@qZ+QV&6e;C}zb^K|s2ADF6Tf diff --git a/mods/MAPGEN/mcl_villages/schematics/tavern.mts b/mods/MAPGEN/mcl_villages/schematics/tavern.mts deleted file mode 100644 index 139003bff9b40135691bff3167b1b109040901aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1007 zcmeYb3HD`RVc=%qW#Fnu1`N^+yt&Ca@yYo`sa7eOMI{W(iJ3(V{BW`4{G_CuR0biC zKuJ+*YOz&$ett@PequI*G)SxnG#sMfMzyT@-G7I8MMBv36GDyPhLH8N-Qc$1%@(&j!(|XF9zBIPB19JZ&oqq?Nr9{ zCIx}x4=-%%S+g}OJH9O5)}e*D-{ASCdyn7QPPIRA_b*FIk4fB}idlR-F{_m>xwx&J z(jR*Ky!17J?efm<5ywj!u0GqBl>h2i-qlm*wuNOacKedN_totONzMg#BSP6$@oZu( z@83V`+uE)>zsnS@*474x$5>nKmX_HPb-Qfxf?&%~A!DAG32wFdXTO~)Jy!jj*YZ{O z)R!f8HxxIQS^O@klnZQ&o7#9wpyW@45Busb5kBqxOO(~#+TY^qJEOU%xGcYJq0Roq zkz04URhl15w$k-fUo$^w`m*Bew>;U_lR{4{Uu69J+^eMJWntM$FNL2qt$N`n_v?>n zpWm77rLXu;WqoH_Ui5SE@|Pmd_aE&N)ed{psq^uCl_>M4kAa0><>O0qIjq=@HA~;M z^bTrDUGO32$hzP=qE_)vNiKG0=3jOct+xF*_n*4#iFIdZzIehMXsEW<{+Fsjnf%znX*_Be_~C{o=O-oQq%w$s1j-Y0azF;cjEXmA5QZy62;)#} zhC|$dK?K<;If+T}<@xz345DzO%M(jdi{gv(ON)|I86>bNjxWhCz+t>4gE&YBhT9E| zD&{07I572uG`&bOGBgOj=_97Wa&m*w21Z5e8D|@tpR_pLNi#ZlmSyME-bQYYn;&*{ zOm39s_&D>V53_OL-*e30to2*#*gwu(Dd!&2_;qo^s)j@Xh61NVwxqJ8&`rW2o?Hn@ Ni{?c#%uQYy3jh;rs2BhM diff --git a/mods/MAPGEN/mcl_villages/utils.lua b/mods/MAPGEN/mcl_villages/utils.lua index 485e94763..e8de9362e 100644 --- a/mods/MAPGEN/mcl_villages/utils.lua +++ b/mods/MAPGEN/mcl_villages/utils.lua @@ -191,57 +191,7 @@ function mcl_villages.shuffle(tbl, pr) end return table end -------------------------------------------------------------------------------- --- evaluate heightmap -------------------------------------------------------------------------------- -function mcl_villages.evaluate_heightmap() - local heightmap = minetest.get_mapgen_object("heightmap") - if not heightmap then - minetest.log("action", "[mcl_villages] No heightmap. That should not happen") - return mcl_villages.max_height_difference + 1 - end - - -- max height and min height, initialize with impossible values for easier first time setting - local max_y = -50000 - local min_y = 50000 - -- only evaluate the center square of heightmap 40 x 40 - local square_start = 1621 - local square_end = 1661 - for j = 1 , 40, 1 do - for i = square_start, square_end, 1 do - if i >= #heightmap then - break - end - local current_hm_entry = heightmap[i] - if current_hm_entry then - -- skip buggy heightmaps, return high value. Converted mcl5 maps can be -31007 - if current_hm_entry == -31000 or heightmap[i] == 31000 then - return mcl_villages.max_height_difference + 1 - end - if current_hm_entry < min_y then - min_y = current_hm_entry - end - if current_hm_entry > max_y then - max_y = current_hm_entry - end - end - end - -- set next line - square_start = square_start + 80 - square_end = square_end + 80 - end - -- return the difference between highest and lowest pos in chunk - local height_diff = max_y - min_y - - -- filter buggy heightmaps - if height_diff <= 1 then - return mcl_villages.max_height_difference + 1 - end - -- debug info - mcl_villages.debug("heightdiff ".. height_diff) - return height_diff -end ------------------------------------------------------------------------------- -- Set array to list -- https://stackoverflow.com/questions/656199/search-for-an-item-in-a-lua-list diff --git a/settingtypes.txt b/settingtypes.txt index 6d7826e58..7486fc95b 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -194,9 +194,6 @@ mcl_villages_placement_priority (Buildings closest to the bell) enum random rand # If disabled, command blocks will be unusable (but still present). mcl_enable_commandblocks (Command blocks) bool true -# If enabled, this will substitute a few blocks in village schematics so they blend into normal, snowy, and sandy areas -mcl_pseudobiome_villages (Pseudobiome villages) bool true - # This is fine for players, but expect all the villagers to die very quickly mcl_villages_allow_water_villages (Spawn village buildings on top of water) bool false