forked from VoxeLibre/VoxeLibre
Remove inter-village distance check
This commit is contained in:
parent
e66d66caf9
commit
9a668204cb
|
@ -113,6 +113,7 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||||
if maxp.y < 0 then return end
|
if maxp.y < 0 then return end
|
||||||
|
|
||||||
-- don't build settlements too close to each other
|
-- don't build settlements too close to each other
|
||||||
|
--[[
|
||||||
local center_of_chunk = {
|
local center_of_chunk = {
|
||||||
x=maxp.x-half_map_chunk_size,
|
x=maxp.x-half_map_chunk_size,
|
||||||
y=maxp.y-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)
|
local dist_ok = settlements.check_distance_other_settlements(center_of_chunk)
|
||||||
if dist_ok == false then return end
|
if dist_ok == false then return end
|
||||||
|
]]
|
||||||
|
|
||||||
-- don't build settlements on (too) uneven terrain
|
-- don't build settlements on (too) uneven terrain
|
||||||
local height_difference = settlements.evaluate_heightmap(minp, maxp)
|
local height_difference = settlements.evaluate_heightmap(minp, maxp)
|
||||||
|
|
|
@ -208,6 +208,7 @@ end
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- check distance to other settlements
|
-- check distance to other settlements
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
--[[
|
||||||
function settlements.check_distance_other_settlements(center_new_chunk)
|
function settlements.check_distance_other_settlements(center_new_chunk)
|
||||||
-- local min_dist_settlements = 300
|
-- local min_dist_settlements = 300
|
||||||
for i, pos in ipairs(settlements_in_world) do
|
for i, pos in ipairs(settlements_in_world) do
|
||||||
|
@ -219,6 +220,7 @@ function settlements.check_distance_other_settlements(center_new_chunk)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
]]
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- fill chests
|
-- fill chests
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue