diff --git a/settingtypes.txt b/settingtypes.txt index 2f7cafc..6df626e 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -5,7 +5,7 @@ sneeker.debug (Log debug output) bool false sneeker.spawn_cap (Maximum spawns) int 25 # Sets possibility for spawn. -sneeker.spawn_chance (Spawn chance) int 18000 +sneeker.spawn_chance (Spawn chance) int 2 # Sets frequency of spawn chance. # Default 1200 is equivalent to 20 minutes (60 * 40). diff --git a/spawn.lua b/spawn.lua index 1d356b1..354f9c5 100644 --- a/spawn.lua +++ b/spawn.lua @@ -5,7 +5,7 @@ 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_chance = tonumber(minetest.settings:get("sneeker.spawn_chance")) or 2 -- 50% chance of spawn local spawn_interval = tonumber(minetest.settings:get("sneeker.spawn_interval")) or time_min * 40 -- Default interval is 40 minutes local spawn_chance_percent = tostring(math.floor(1 / spawn_chance * 100)) .. "%"