From 58a28b8d8237de22050da69d9a2bfafa762e13dc Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 10 Sep 2022 03:07:17 +0200 Subject: [PATCH] Fix end time of thunderstorm conversion --- mods/ITEMS/mcl_beds/functions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index ec2c925d1..c745b5f0c 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -260,12 +260,12 @@ end function mcl_beds.sleep() if is_night_skip_enabled() then if weather_mod and mcl_weather.get_weather() == "thunder" then - endtime = mcl_weather.end_time / 24000 + local endtime = (mcl_weather.end_time - minetest.get_gametime()) * 72 / 24000 minetest.set_timeofday((minetest.get_timeofday() + endtime) %1) - if not mcl_beds.is_night() then + if mcl_beds.is_night() then + mcl_beds.skip_night() mcl_beds.kick_players() else - mcl_beds.skip_night() mcl_beds.kick_players() end -- Always clear weather