From 2b0871207fea61bad08fb5dae1a6e60ae7743602 Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Mon, 29 May 2017 02:57:56 -0700 Subject: [PATCH] Change 'spawn_interval' default to 2 minutes (120) --- settingtypes.txt | 4 ++-- spawn.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/settingtypes.txt b/settingtypes.txt index 6df626e..9c0826a 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -8,8 +8,8 @@ sneeker.spawn_cap (Maximum spawns) int 25 sneeker.spawn_chance (Spawn chance) int 2 # Sets frequency of spawn chance. -# Default 1200 is equivalent to 20 minutes (60 * 40). -sneeker.spawn_interval (Spawn interval) int 2400 +# Default 120 is equivalent to 2 minutes (60 * 2). +sneeker.spawn_interval (Spawn interval) int 120 # Sets the maximum light that a node can have for spawn to occur. sneeker.spawn_maxlight (Max light for spawn) int 5 diff --git a/spawn.lua b/spawn.lua index dd41fb7..fd4e7d2 100644 --- a/spawn.lua +++ b/spawn.lua @@ -6,7 +6,7 @@ local time_hr = time_min * 60 local time_day = time_hr * 24 local spawn_chance = minetest.setting_get('sneeker.spawn_chance') or 2 -- 50% chance of spawn -local spawn_interval = minetest.setting_get('sneeker.spawn_interval') or time_min * 40 -- Default interval is 40 minutes +local spawn_interval = minetest.setting_get('sneeker.spawn_interval') or time_min * 2 -- Default interval is 2 minutes local spawn_chance_percent = tostring(math.floor(1 / spawn_chance * 100)) .. '%'