mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2024-12-29 12:20:41 +01:00
Added logs during pre-generation
This commit is contained in:
parent
2c5e0ee5af
commit
f7bc5ee0b4
@ -33,7 +33,7 @@ if first_mapgen then
|
|||||||
-- Generate a map!!
|
-- Generate a map!!
|
||||||
local pregenerate = dofile(mapgen_rivers.modpath .. '/pregenerate.lua')
|
local pregenerate = dofile(mapgen_rivers.modpath .. '/pregenerate.lua')
|
||||||
minetest.register_on_mods_loaded(function()
|
minetest.register_on_mods_loaded(function()
|
||||||
print('Generating grid')
|
print('[mapgen_rivers] Generating grid')
|
||||||
pregenerate(load_all)
|
pregenerate(load_all)
|
||||||
|
|
||||||
if load_all then
|
if load_all then
|
||||||
@ -58,9 +58,9 @@ if not (first_mapgen and load_all) then
|
|||||||
|
|
||||||
minetest.register_on_mods_loaded(function()
|
minetest.register_on_mods_loaded(function()
|
||||||
if load_all then
|
if load_all then
|
||||||
print('Loading full grid')
|
print('[mapgen_rivers] Loading full grid')
|
||||||
else
|
else
|
||||||
print('Loading grid as interactive loaders')
|
print('[mapgen_rivers] Loading grid as interactive loaders')
|
||||||
end
|
end
|
||||||
local grid = mapgen_rivers.grid
|
local grid = mapgen_rivers.grid
|
||||||
|
|
||||||
|
@ -21,9 +21,7 @@ local function pregenerate(keep_loaded)
|
|||||||
np_base.seed = (np_base.seed or 0) + seed
|
np_base.seed = (np_base.seed or 0) + seed
|
||||||
|
|
||||||
local nobj_base = PerlinNoiseMap(np_base, {x=size.x, y=1, z=size.y})
|
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})
|
local dem = nobj_base:get_3d_map_flat({x=0, y=0, z=0})
|
||||||
dem.X = size.x
|
dem.X = size.x
|
||||||
dem.Y = size.y
|
dem.Y = size.y
|
||||||
@ -34,7 +32,7 @@ local function pregenerate(keep_loaded)
|
|||||||
|
|
||||||
local tectonic_step = tectonic_speed * time_step
|
local tectonic_step = tectonic_speed * time_step
|
||||||
for i=1, niter do
|
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:diffuse(time_step)
|
||||||
model:flow()
|
model:flow()
|
||||||
|
Loading…
Reference in New Issue
Block a user