Changes to 'sneeker.log' method:

Only log message if minetest setting 'log_mods' is 'true'.
This commit is contained in:
AntumDeluge
2017-05-29 01:23:15 -07:00
committed by Jordan Irwin
parent ea3ab21024
commit c905656ec8
3 changed files with 13 additions and 14 deletions

View File

@@ -8,10 +8,8 @@ local time_day = time_hr * 24
local spawn_chance = tonumber(minetest.settings:get("sneeker.spawn_chance")) or 18000
local spawn_interval = tonumber(minetest.settings:get("sneeker.spawn_interval")) or time_min * 40 -- Default interval is 40 minutes
if minetest.settings:get_bool("log_mods", false) then
sneeker.log("Spawn chance: " .. tostring(spawn_chance) .. " (1/" .. tostring(spawn_chance) .. ")")
sneeker.log("Spawn interval: " .. tostring(spawn_interval) .. " (" .. tostring(spawn_interval/60) .. " minutes)")
end
sneeker.log("Spawn chance: " .. tostring(spawn_chance) .. " (1/" .. tostring(spawn_chance) .. ")")
sneeker.log("Spawn interval: " .. tostring(spawn_interval) .. " (" .. tostring(spawn_interval/60) .. " minutes)")
minetest.register_abm({
nodenames = {"default:dirt_with_grass", "default:stone"},