diff --git a/settings.lua b/settings.lua index ec7c29f..60227ad 100644 --- a/settings.lua +++ b/settings.lua @@ -1,5 +1,5 @@ -- Settings for sneeker mod -sneeker.debug = minetest.settings:get_bool("sneeker_debug", false) -sneeker.spawn_cap = tonumber(minetest.settings:get("sneeker_spawn_cap")) or 50 +sneeker.debug = minetest.settings:get_bool("sneeker.debug", false) +sneeker.spawn_cap = tonumber(minetest.settings:get("sneeker.spawn_cap")) or 50 diff --git a/settingtypes.txt b/settingtypes.txt index a90038d..607737c 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -1,12 +1,12 @@ # Logs debug output. -sneeker_debug (Log debug output) bool false +sneeker.debug (Log debug output) bool false # Sets maximum number of spawns that can exist in world. -sneeker_spawn_cap (Maximum spawns) int 50 +sneeker.spawn_cap (Maximum spawns) int 50 # Sets possibility for spawn. -sneeker_spawn_chance (Spawn chance) int 18000 +sneeker.spawn_chance (Spawn chance) int 18000 # Sets frequency of spawn chance. # Default 1200 is equivalent to 20 minutes (60 * 40). -sneeker_spawn_interval (Spawn interval) int 2400 +sneeker.spawn_interval (Spawn interval) int 2400 diff --git a/spawn.lua b/spawn.lua index bdf0bb1..9eb7157 100644 --- a/spawn.lua +++ b/spawn.lua @@ -5,8 +5,8 @@ local time_min = 60 local time_hr = time_min * 60 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 +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) .. ")")