mirror of
https://github.com/minetest-mods/lightning.git
synced 2025-07-21 09:10:27 +02:00
Compare commits
2 Commits
master
...
2040363297
Author | SHA1 | Date | |
---|---|---|---|
2040363297 | |||
d091bf8025 |
6
init.lua
6
init.lua
@ -22,8 +22,6 @@ lightning.auto = true
|
||||
-- range of the skybox highlight and sound effect
|
||||
lightning.effect_range = 500
|
||||
|
||||
local random_fire = minetest.settings:get_bool("lightning_random_fire") ~= false
|
||||
|
||||
local rng = PcgRandom(32321123312123)
|
||||
|
||||
-- table with playername as key and previous skybox as value
|
||||
@ -169,7 +167,7 @@ lightning.strike = function(pos)
|
||||
return
|
||||
end
|
||||
-- very rarely, potentially cause a fire
|
||||
if fire and random_fire and rng:next(1,1000) == 1 then
|
||||
if fire and rng:next(1,1000) == 1 then
|
||||
minetest.set_node(pos2, {name = "fire:basic_flame"})
|
||||
else
|
||||
minetest.set_node(pos2, {name = "lightning:dying_flame"})
|
||||
@ -235,3 +233,5 @@ minetest.after(5, function()
|
||||
lightning.interval_high), lightning.strike)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.log("action", "[lightning] loaded.")
|
||||
|
@ -1,4 +0,0 @@
|
||||
# When fire is enabled, this setting specifies whether the lightnings
|
||||
# have a small chance to start a fire.
|
||||
# Value 'false' will disable fire caused by lightnings.
|
||||
lightning_random_fire (Enable random fire) bool true
|
Reference in New Issue
Block a user