master #5

Merged
epCode merged 255 commits from VoxeLibre/VoxeLibre:master into master 2021-02-02 23:20:01 +01:00
2 changed files with 13 additions and 9 deletions
Showing only changes of commit 9a668204cb - Show all commits

View File

@ -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)

View File

@ -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
-------------------------------------------------------------------------------