mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 16:15:10 +00:00
Always clear weather after sleep
This commit is contained in:
parent
c9dc405531
commit
a46064bd92
1 changed files with 4 additions and 1 deletions
|
@ -164,6 +164,10 @@ end
|
||||||
-- Handle environment stuff related to sleeping: skip night and thunderstorm
|
-- Handle environment stuff related to sleeping: skip night and thunderstorm
|
||||||
function mcl_beds.sleep()
|
function mcl_beds.sleep()
|
||||||
local storm_skipped = mcl_beds.skip_thunderstorm()
|
local storm_skipped = mcl_beds.skip_thunderstorm()
|
||||||
|
-- Always clear weather
|
||||||
|
if weather_mod then
|
||||||
|
mcl_weather.change_weather("none")
|
||||||
|
end
|
||||||
if is_night_skip_enabled() then
|
if is_night_skip_enabled() then
|
||||||
if not storm_skipped then
|
if not storm_skipped then
|
||||||
mcl_beds.skip_night()
|
mcl_beds.skip_night()
|
||||||
|
@ -186,7 +190,6 @@ end
|
||||||
function mcl_beds.skip_thunderstorm()
|
function mcl_beds.skip_thunderstorm()
|
||||||
-- Skip thunderstorm
|
-- Skip thunderstorm
|
||||||
if weather_mod and mcl_weather.get_weather() == "thunder" then
|
if weather_mod and mcl_weather.get_weather() == "thunder" then
|
||||||
mcl_weather.change_weather("none")
|
|
||||||
-- Sleep for a half day (=minimum thunderstorm duration)
|
-- Sleep for a half day (=minimum thunderstorm duration)
|
||||||
minetest.set_timeofday((minetest.get_timeofday() + 0.5) % 1)
|
minetest.set_timeofday((minetest.get_timeofday() + 0.5) % 1)
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue