rain configurable
parent
2f0ae5bb5e
commit
3c7accffb5
|
@ -22,6 +22,7 @@ storm_chance = 5
|
||||||
lightning = true
|
lightning = true
|
||||||
lightning_chance = 300
|
lightning_chance = 300
|
||||||
thunder_sound = true
|
thunder_sound = true
|
||||||
|
lightning_duration = 0.15
|
||||||
##Dust Screen Effect for Sandstorms
|
##Dust Screen Effect for Sandstorms
|
||||||
dust_effect = true
|
dust_effect = true
|
||||||
#Rain Tweaks
|
#Rain Tweaks
|
||||||
|
|
|
@ -25,6 +25,7 @@ climatez.settings = {
|
||||||
dust_effect = settings:get_bool("dust_effect"),
|
dust_effect = settings:get_bool("dust_effect"),
|
||||||
rain_particles = tonumber(settings:get("rain_particles")) or 15,
|
rain_particles = tonumber(settings:get("rain_particles")) or 15,
|
||||||
rain_falling_speed = tonumber(settings:get("rain_falling_speed")) or 15,
|
rain_falling_speed = tonumber(settings:get("rain_falling_speed")) or 15,
|
||||||
|
lightning_duration = tonumber(settings:get("lightning_duration")) or 0.15,
|
||||||
}
|
}
|
||||||
|
|
||||||
local timer = 0 -- A timer to create climates each x seconds an for lightning too.
|
local timer = 0 -- A timer to create climates each x seconds an for lightning too.
|
||||||
|
@ -531,7 +532,7 @@ local climate = {
|
||||||
if chance == 1 then
|
if chance == 1 then
|
||||||
if is_on_surface(_player_pos) then
|
if is_on_surface(_player_pos) then
|
||||||
show_lightning(_player_name)
|
show_lightning(_player_name)
|
||||||
minetest.after(0.15, remove_lightning, _player_name)
|
minetest.after(climatez.settings.lightning_duration, remove_lightning, _player_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 9.8 KiB |
Loading…
Reference in New Issue