Added logs during pre-generation

This commit is contained in:
Gaël C 2021-07-25 10:14:15 +02:00
parent 2c5e0ee5af
commit f7bc5ee0b4
2 changed files with 4 additions and 6 deletions

View File

@ -33,7 +33,7 @@ if first_mapgen then
-- Generate a map!!
local pregenerate = dofile(mapgen_rivers.modpath .. '/pregenerate.lua')
minetest.register_on_mods_loaded(function()
print('Generating grid')
print('[mapgen_rivers] Generating grid')
pregenerate(load_all)
if load_all then
@ -58,9 +58,9 @@ if not (first_mapgen and load_all) then
minetest.register_on_mods_loaded(function()
if load_all then
print('Loading full grid')
print('[mapgen_rivers] Loading full grid')
else
print('Loading grid as interactive loaders')
print('[mapgen_rivers] Loading grid as interactive loaders')
end
local grid = mapgen_rivers.grid

View File

@ -21,9 +21,7 @@ local function pregenerate(keep_loaded)
np_base.seed = (np_base.seed or 0) + seed
local nobj_base = PerlinNoiseMap(np_base, {x=size.x, y=1, z=size.y})
--nobj_base:calc_3d_map({x=0, y=0, z=0})
--local dem = nobj_base:get_map_slice({z=1}, {z=1})
local dem = nobj_base:get_3d_map_flat({x=0, y=0, z=0})
dem.X = size.x
dem.Y = size.y
@ -34,7 +32,7 @@ local function pregenerate(keep_loaded)
local tectonic_step = tectonic_speed * time_step
for i=1, niter do
--nobj_base:get_map_slice({z=i+1}, {z=1}, ref_dem)
print("[mapgen_rivers] Iteration " .. i .. " of " .. niter)
model:diffuse(time_step)
model:flow()