Add logging messages

This commit is contained in:
AntumDeluge
2017-05-27 19:15:23 -07:00
committed by Jordan Irwin
parent 3d06833867
commit 58d9d44c35
2 changed files with 10 additions and 0 deletions

View File

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