forked from Mirrorlandia_minetest/mod-sneeker
Add logging messages
This commit is contained in:
parent
3d06833867
commit
58d9d44c35
5
init.lua
5
init.lua
@ -11,6 +11,11 @@ end
|
||||
|
||||
sneaker.spawn_cap = tonumber(minetest.settings:get("sneaker_spawn_cap")) or 50
|
||||
|
||||
if minetest.settings:get_bool("log_mods", false) 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 = 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"},
|
||||
|
Loading…
Reference in New Issue
Block a user