Don't trigger lightning if mods disable auto at init.
This commit is contained in:
parent
0cdcb34d6b
commit
7ba1adae2b
11
init.lua
11
init.lua
@ -198,7 +198,10 @@ minetest.register_node("lightning:dying_flame", {
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if lightning.auto then
|
||||
minetest.after(rng:next(lightning.interval_low, lightning.interval_high), lightning.strike)
|
||||
end
|
||||
-- if other mods disable auto lightning during initialization, don't trigger the first lightning.
|
||||
minetest.after(5, function(dtime)
|
||||
if lightning.auto then
|
||||
minetest.after(rng:next(lightning.interval_low,
|
||||
lightning.interval_high), lightning.strike)
|
||||
end
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user