forked from minetest-mods/lightning
Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev
This commit is contained in:
commit
15cc8e129c
4
init.lua
4
init.lua
|
@ -22,6 +22,8 @@ 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
|
||||
|
@ -167,7 +169,7 @@ lightning.strike = function(pos)
|
|||
return
|
||||
end
|
||||
-- very rarely, potentially cause a fire
|
||||
if fire and rng:next(1,1000) == 1 then
|
||||
if fire and random_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"})
|
||||
|
|
4
settingtypes.txt
Normal file
4
settingtypes.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
# 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
|
Loading…
Reference in New Issue
Block a user