sometimes no_path is not cleared up correctly :-(

This commit is contained in:
kno10 2024-10-31 00:53:10 +01:00
parent 64aaa91cf8
commit 99a1ac82ff
2 changed files with 2 additions and 3 deletions

@ -219,9 +219,10 @@ function mcl_villages.place_schematics(sminp, smaxp, settlement, blockseed, pr)
-- Path planning and placement
mcl_villages.paths(blockseed, minetest.get_biome_name(minetest.get_biome_data(bell_pos).biome), sminp, smaxp)
mcl_villages.clean_no_paths(sminp, smaxp)
-- Clean up paths and initialize nodes
mcl_villages.clean_no_paths(sminp, smaxp) -- sometimes does not work?
for i, building in ipairs(settlement) do
mcl_villages.clean_no_paths(building.minp, building.maxp)
init_nodes(building.minp, building.maxp, pr)
end

@ -12,7 +12,6 @@ local swap_node = core.swap_node
-- 3rd is the pos of the end points
local path_ends = {}
-- note: not using LVM here, as this runs after the pathfinder
-- simple function to increase "no_paths" walls
function mcl_villages.clean_no_paths(minp, maxp)
local no_paths_nodes = minetest.find_nodes_in_area(minp, maxp, { "mcl_villages:no_paths" })
@ -21,7 +20,6 @@ function mcl_villages.clean_no_paths(minp, maxp)
end
end
-- this can still run in LVM
-- simple function to increase "no_paths" walls
function mcl_villages.increase_no_paths(minp, maxp)
local p = vector.zero()