Remove inter-village distance check

This commit is contained in:
kay27 2021-01-28 23:12:16 +04:00
parent e66d66caf9
commit 9a668204cb
2 changed files with 13 additions and 9 deletions

@ -113,6 +113,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
if maxp.y < 0 then return end
-- don't build settlements too close to each other
--[[
local center_of_chunk = {
x=maxp.x-half_map_chunk_size,
y=maxp.y-half_map_chunk_size,
@ -120,6 +121,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
}
local dist_ok = settlements.check_distance_other_settlements(center_of_chunk)
if dist_ok == false then return end
]]
-- don't build settlements on (too) uneven terrain
local height_difference = settlements.evaluate_heightmap(minp, maxp)

@ -208,17 +208,19 @@ end
-------------------------------------------------------------------------------
-- check distance to other settlements
-------------------------------------------------------------------------------
--[[
function settlements.check_distance_other_settlements(center_new_chunk)
-- local min_dist_settlements = 300
for i, pos in ipairs(settlements_in_world) do
local distance = vector.distance(center_new_chunk, pos)
-- minetest.chat_send_all("dist ".. distance)
if distance < settlements.min_dist_settlements then
return false
end
end
return true
-- local min_dist_settlements = 300
for i, pos in ipairs(settlements_in_world) do
local distance = vector.distance(center_new_chunk, pos)
-- minetest.chat_send_all("dist ".. distance)
if distance < settlements.min_dist_settlements then
return false
end
end
return true
end
]]
-------------------------------------------------------------------------------
-- fill chests
-------------------------------------------------------------------------------