Add logging messages

This commit is contained in:
AntumDeluge 2017-05-27 19:15:23 -07:00
parent fa0b50491f
commit 3f835fa65d
2 changed files with 10 additions and 0 deletions

@ -11,6 +11,11 @@ end
sneaker.spawn_cap = minetest.setting_get('sneaker_spawn_cap') or 50
if minetest.setting_getbool('log_mods') then
minetest.log('action', 'Loading mod "' .. sneaker.modname .. '" ...')
sneaker.log('Spawn cap: ' .. tostring(sneaker.spawn_cap))
end
local scripts = {
'tnt_function',
'spawn',

@ -8,6 +8,11 @@ local time_day = time_hr * 24
local spawn_chance = minetest.setting_get('sneaker_spawn_chance') or 18000
local spawn_interval = minetest.setting_get('sneaker_spawn_interval') or time_min * 40 -- Default interval is 40 minutes
if minetest.setting_getbool('log_mods') 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'},