in favor of more normal "." notation.
In the process, I have renamed a few functions in favor of
more meaningful names (see API.txt), and provided
"compatibility shims" for old mods where needed, with warnings.
since nothing much is normally found outside that range anyway
only enqueue blocks that are within that range, or within
the range specfied by all of the mods that make generate_plant() calls,
whichever covers more volume.
to give old, deferrred blocks a chance to time-out. Needed
because if players aren't currently creating new terrain,
old blocks would never get processed, causing the block log
to only grow rather than eventually run dry (which could result
in very long shutdown times).
(default 5 minutes).
Rationale: if a block is old enough, there's a very high probability
that the engine's done screwing around with its neighbors, so it's safe
to process.
time to run through it, just use it in-place, copying its entries back
to the main block log if they have to be skipped again (essentially
using the re-check list and the end of the block log as a double buffer)
populated yet, move those blocks to a separate list, and replay that
list whenever new mapblocks come in. That way the main block list can
run dry and allow the block populate routines to go idle.
Thanks to Warr1024 for the idea!
and improve lag management
minetest.conf settings added:
biome_lib_dtime_limit:
Maximum lag allowed, in seconds. Default 0.5s. Larger values allow for
more lag, but make map updates run a bit faster.
biome_lib_queue_run_ratio:
If positive, this is the approximate number of globalstep ticks to skip
between map updates. If negative, it becomes the positive number of map
updates to run per globalstep tick before lag is checked. No minimum
value, maximum +100. Default: -100 (that is, 100 updates per globalstep
tick, with none intentionally skipped). Use positive numbers for slow
machines or biome_lib-using mods that tend to cause lag, and negative
values for fast machines and mods.
biome.max_count as received from mods has to be scaled appropriately
as mods expect this value to be relative to the usual
chunk size of 80x80 = 6400 nodes' horizontal area.