diff --git a/settings.lua b/settings.lua index b5265f9..ec64b9c 100644 --- a/settings.lua +++ b/settings.lua @@ -1,5 +1,5 @@ -- Settings for sneeker mod -sneeker.debug = minetest.setting_get('sneeker_debug') or false -sneeker.spawn_cap = minetest.setting_get('sneeker_spawn_cap') or 50 +sneeker.debug = minetest.setting_get('sneeker.debug') or false +sneeker.spawn_cap = minetest.setting_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 8eb34b2..3e3f153 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 = minetest.setting_get('sneeker_spawn_chance') or 18000 -local spawn_interval = minetest.setting_get('sneeker_spawn_interval') or time_min * 40 -- Default interval is 40 minutes +local spawn_chance = minetest.setting_get('sneeker.spawn_chance') or 18000 +local spawn_interval = minetest.setting_get('sneeker.spawn_interval') or time_min * 40 -- Default interval is 40 minutes if minetest.setting_getbool('log_mods') then sneeker.log('Spawn chance: ' .. tostring(spawn_chance) .. ' (1/' .. tostring(spawn_chance) .. ')')