forked from mtcontrib/weather_pack
lovered chance for rain appearance
This commit is contained in:
parent
17a67b846e
commit
34d9615c60
@ -26,7 +26,7 @@ local SKYCOLOR_LAYER = "happy_weather_light_rain_sky"
|
|||||||
light_rain.is_starting = function(dtime, position)
|
light_rain.is_starting = function(dtime, position)
|
||||||
if light_rain.last_check + light_rain.check_interval < os.time() then
|
if light_rain.last_check + light_rain.check_interval < os.time() then
|
||||||
light_rain.last_check = os.time()
|
light_rain.last_check = os.time()
|
||||||
if math.random() < 0.2 then
|
if math.random() < 0.15 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -42,7 +42,7 @@ end
|
|||||||
light_rain.is_ending = function(dtime)
|
light_rain.is_ending = function(dtime)
|
||||||
if light_rain.last_check + light_rain.check_interval < os.time() then
|
if light_rain.last_check + light_rain.check_interval < os.time() then
|
||||||
light_rain.last_check = os.time()
|
light_rain.last_check = os.time()
|
||||||
if math.random() < 0.4 then
|
if math.random() < 0.5 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
2
rain.lua
2
rain.lua
@ -44,7 +44,7 @@ end
|
|||||||
rain.is_ending = function(dtime)
|
rain.is_ending = function(dtime)
|
||||||
if rain.last_check + rain.check_interval < os.time() then
|
if rain.last_check + rain.check_interval < os.time() then
|
||||||
rain.last_check = os.time()
|
rain.last_check = os.time()
|
||||||
if math.random() < 0.3 then
|
if math.random() < 0.6 then
|
||||||
happy_weather.request_to_start("light_rain")
|
happy_weather.request_to_start("light_rain")
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user