Use setting 'sneeker.spawn_maxlight' to determine node light for spawn
This commit is contained in:
parent
1dc5b92314
commit
05019c9d7d
@ -2,4 +2,9 @@
|
||||
|
||||
|
||||
sneeker.debug = minetest.setting_get('sneeker.debug') or false
|
||||
|
||||
-- Maximum number of spawns active at one time
|
||||
sneeker.spawn_cap = minetest.setting_get('sneeker.spawn_cap') or 25
|
||||
|
||||
-- Maximum light of node for spawn
|
||||
sneeker.spawn_maxlight = minetest.setting_get('sneeker.spawn_maxlight') or 5
|
||||
|
@ -10,3 +10,6 @@ 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
|
||||
|
||||
# Sets the maximum light that a node can have for spawn to occur.
|
||||
sneeker.spawn_maxlight (Max light for spawn) int 5
|
||||
|
@ -26,7 +26,7 @@ minetest.register_abm({
|
||||
if not minetest.get_node_light(pos) then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) > 5 then
|
||||
if minetest.get_node_light(pos) > sneeker.spawn_maxlight then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) < -1 then
|
||||
|
Loading…
Reference in New Issue
Block a user