diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-11-06 19:53:57 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-11-06 19:53:57 -0500 |
commit | a8fbfaac02cebed72477b7e11444256eb48fc4e7 (patch) | |
tree | c8a7ec09fccba3d640287c1a8cbdaace33d1d997 /biome_lib/init.lua | |
parent | fadb973205f3ad378db409c32f0ecd93b7df73ee (diff) | |
download | dreambuilder_modpack-a8fbfaac02cebed72477b7e11444256eb48fc4e7.tar dreambuilder_modpack-a8fbfaac02cebed72477b7e11444256eb48fc4e7.tar.gz dreambuilder_modpack-a8fbfaac02cebed72477b7e11444256eb48fc4e7.tar.bz2 dreambuilder_modpack-a8fbfaac02cebed72477b7e11444256eb48fc4e7.tar.xz dreambuilder_modpack-a8fbfaac02cebed72477b7e11444256eb48fc4e7.zip |
update biome lib and pipeworks
Diffstat (limited to 'biome_lib/init.lua')
-rw-r--r-- | biome_lib/init.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/biome_lib/init.lua b/biome_lib/init.lua index cb23eb7..761a57e 100644 --- a/biome_lib/init.lua +++ b/biome_lib/init.lua @@ -31,6 +31,8 @@ biome_lib.modpath = minetest.get_modpath("biome_lib") biome_lib.total_no_aircheck_calls = 0 +biome_lib.queue_run_ratio = tonumber(minetest.settings:get("biome_lib_queue_run_ratio")) or 100 + -- Boilerplate to support localized strings if intllib mod is installed. local S if minetest.get_modpath("intllib") then @@ -427,8 +429,9 @@ end) -- "Play" them back, populating them with new stuff in the process minetest.register_globalstep(function(dtime) - if dtime < 0.2 and -- don't attempt to populate if lag is already too high - (#biome_lib.blocklist_aircheck > 0 or #biome_lib.blocklist_no_aircheck > 0) then + if dtime < 0.2 -- don't attempt to populate if lag is already too high + and math.random(100) <= biome_lib.queue_run_ratio + and (#biome_lib.blocklist_aircheck > 0 or #biome_lib.blocklist_no_aircheck > 0) then biome_lib.globalstep_start_time = minetest.get_us_time() biome_lib.globalstep_runtime = 0 while (#biome_lib.blocklist_aircheck > 0 or #biome_lib.blocklist_no_aircheck > 0) |