Use engine decorations when possible

This commit is contained in:
Vanessa Dannenberg
2021-04-20 19:58:09 -04:00
parent 76b5046009
commit e8afe017da
6 changed files with 320 additions and 169 deletions

View File

@ -77,13 +77,25 @@ dofile(biome_lib.modpath .. "/search_functions.lua")
dofile(biome_lib.modpath .. "/growth.lua")
dofile(biome_lib.modpath .. "/compat.lua")
-- and report the final registration results:
minetest.after(0.01, function()
-- report the final registration results and enable the active block queue stuff
minetest.after(0, function()
biome_lib.dbg("Registered a total of "..(#biome_lib.surfaceslist_aircheck)+(#biome_lib.surfaceslist_no_aircheck).." surface types to be evaluated, spread", 0)
biome_lib.dbg("across "..#biome_lib.actionslist_aircheck.." actions with air-checking and "..#biome_lib.actionslist_no_aircheck.." actions without.", 0)
biome_lib.dbg("within an elevation range of "..biome_lib.mapgen_elevation_limit.min.." and "..biome_lib.mapgen_elevation_limit.max.." meters.", 0)
local n = #biome_lib.actionslist_aircheck + #biome_lib.actionslist_no_aircheck
biome_lib.dbg("All mapgen registrations completed.", 0)
if n > 0 then
biome_lib.dbg("Total items/actions to handle manually: "..n.." ("..#biome_lib.actionslist_no_aircheck.." without air checks)", 0)
biome_lib.dbg("Total surface types to handle manually: "..#biome_lib.surfaceslist_aircheck + #biome_lib.surfaceslist_no_aircheck, 0)
else
biome_lib.dbg("There are no \"handle manually\" items/actions registered,", 0)
biome_lib.dbg("so the mapblock queue will not be not used this session.", 0)
end
biome_lib.dbg("Items sent to the engine's decorations handler: "..#biome_lib.registered_decorations, 0)
biome_lib.dbg("Elevation range: "..biome_lib.mapgen_elevation_limit.min.." to "..string.format("%+d", biome_lib.mapgen_elevation_limit.max).." meters.", 0)
if n > 0 then
dofile(biome_lib.modpath .. "/block_queue_checks.lua")
end
end)
biome_lib.dbg("[Biome Lib] Loaded", 0)