1
0
mirror of https://github.com/mt-mods/biome_lib.git synced 2024-12-23 17:30:18 +01:00

rename debug variable and option for consistency

make global so it can be changed while running
This commit is contained in:
Vanessa Dannenberg 2021-04-07 07:30:58 -04:00
parent 07c2b1d9d4
commit 0a34e3c7af

View File

@ -70,7 +70,7 @@ biome_lib.default_wet_surfaces = c3 and tableize(c3) or {"default:dirt", "defaul
biome_lib.default_ground_nodes = c4 and tableize(c4) or {"default:dirt_with_grass"} biome_lib.default_ground_nodes = c4 and tableize(c4) or {"default:dirt_with_grass"}
biome_lib.default_grow_nodes = c5 and tableize(c5) or {"default:dirt_with_grass"} biome_lib.default_grow_nodes = c5 and tableize(c5) or {"default:dirt_with_grass"}
local DEBUG_LEVEL = tonumber(minetest.settings:get("biome_lib_debug")) or 0 biome_lib.debug_log_level = tonumber(minetest.settings:get("biome_lib_debug_log_level")) or 0
local rr = tonumber(minetest.settings:get("biome_lib_queue_run_ratio")) or -100 local rr = tonumber(minetest.settings:get("biome_lib_queue_run_ratio")) or -100
biome_lib.queue_run_ratio = 100 - rr biome_lib.queue_run_ratio = 100 - rr
@ -109,7 +109,7 @@ biome_lib.perlin_humidity = PerlinNoise(humidity_seeddiff, humidity_octaves, hum
function biome_lib.dbg(msg, level) function biome_lib.dbg(msg, level)
local l = tonumber(level) or 0 local l = tonumber(level) or 0
if DEBUG_LEVEL >= l then if biome_lib.debug_log_level >= l then
print("[Biome Lib] "..msg) print("[Biome Lib] "..msg)
minetest.log("verbose", "[Biome Lib] "..msg) minetest.log("verbose", "[Biome Lib] "..msg)
end end
@ -763,7 +763,7 @@ function biome_lib:get_nodedef_field(nodename, fieldname)
return minetest.registered_nodes[nodename][fieldname] return minetest.registered_nodes[nodename][fieldname]
end end
if DEBUG_LEVEL >= 3 then if biome_lib.debug_log_level >= 3 then
biome_lib.last_count = 0 biome_lib.last_count = 0
function biome_lib.show_pending_block_count() function biome_lib.show_pending_block_count()