rain configurable

master
root 2021-09-08 01:03:36 +02:00
parent 2f0ae5bb5e
commit 3c7accffb5
3 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@ storm_chance = 5
lightning = true
lightning_chance = 300
thunder_sound = true
lightning_duration = 0.15
##Dust Screen Effect for Sandstorms
dust_effect = true
#Rain Tweaks

View File

@ -25,6 +25,7 @@ climatez.settings = {
dust_effect = settings:get_bool("dust_effect"),
rain_particles = tonumber(settings:get("rain_particles")) 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.
@ -531,7 +532,7 @@ local climate = {
if chance == 1 then
if is_on_surface(_player_pos) then
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB