summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-01-26 12:16:51 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-01-26 12:16:51 -0500
commit9cdcdcfe6b9538c4f6daaa79c5e65f786f9577fa (patch)
tree021bd51ac51307790b82de3145bada55df907c50
parente64a41fcc611be9fe4d591c90f628264179b7566 (diff)
don't execute the "playing out" shutdown code if log is already empty
-rw-r--r--init.lua24
1 files changed, 14 insertions, 10 deletions
diff --git a/init.lua b/init.lua
index 349b2f2..5cb6202 100644
--- a/init.lua
+++ b/init.lua
@@ -448,20 +448,24 @@ end)
-- to prevent unpopulated map areas
minetest.register_on_shutdown(function()
- print("[biome_lib] Stand by, playing out the rest of the aircheck mapblock log")
- print("(there are "..#biome_lib.blocklist_aircheck.." entries)...")
- while true do
- biome_lib:generate_block_with_air_checking(0.1)
- if #biome_lib.blocklist_aircheck == 0 then return end
+ if #biome_lib.blocklist_aircheck > 0 then
+ print("[biome_lib] Stand by, playing out the rest of the aircheck mapblock log")
+ print("(there are "..#biome_lib.blocklist_aircheck.." entries)...")
+ while true do
+ biome_lib:generate_block_with_air_checking(0.1)
+ if #biome_lib.blocklist_aircheck == 0 then return end
+ end
end
end)
minetest.register_on_shutdown(function()
- print("[biome_lib] Stand by, playing out the rest of the no-aircheck mapblock log")
- print("(there are "..#biome_lib.blocklist_no_aircheck.." entries)...")
- while true do
- biome_lib:generate_block_no_aircheck(0.1)
- if #biome_lib.blocklist_no_aircheck == 0 then return end
+ if #biome_lib.blocklist_no_aircheck > 0 then
+ print("[biome_lib] Stand by, playing out the rest of the no-aircheck mapblock log")
+ print("(there are "..#biome_lib.blocklist_no_aircheck.." entries)...")
+ while true do
+ biome_lib:generate_block_no_aircheck(0.1)
+ if #biome_lib.blocklist_no_aircheck == 0 then return end
+ end
end
end)