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,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- if other mods disable auto lightning during initialization, don't trigger the first lightning.
|
||||||
if lightning.auto then
|
minetest.after(5, function(dtime)
|
||||||
minetest.after(rng:next(lightning.interval_low, lightning.interval_high), lightning.strike)
|
if lightning.auto then
|
||||||
end
|
minetest.after(rng:next(lightning.interval_low,
|
||||||
|
lightning.interval_high), lightning.strike)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user