From a2b003a195058a04889f6aa937aa581fc2b8ed35 Mon Sep 17 00:00:00 2001 From: cora Date: Mon, 1 Aug 2022 12:46:46 +0200 Subject: [PATCH] sky slightly overcast on weather in non-weather b. --- mods/ENVIRONMENT/mcl_weather/skycolor.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index 9f6028e2e1..fe65721c5f 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -97,13 +97,31 @@ mcl_weather.skycolor = { local dim = mcl_worlds.pos_to_dimension(pos) local has_weather = ((mcl_weather.state == "snow" or mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_snow(pos)) or ((mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_rain(pos)) if dim == "overworld" then - if (mcl_weather.state == "none") or not has_weather then + if (mcl_weather.state == "none") then -- Clear weather mcl_weather.set_sky_box_clear(player) player:set_sun({visible = true, sunrise_visible = true}) player:set_moon({visible = true}) player:set_stars({visible = true}) mcl_weather.skycolor.override_day_night_ratio(player, nil) + elseif not has_weather then + local day_color = mcl_weather.skycolor.get_sky_layer_color(0.15) + local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.27) + local night_color = mcl_weather.skycolor.get_sky_layer_color(0.1) + player:set_sky({ type = "regular", + sky_color = { + day_sky = day_color, + day_horizon = day_color, + dawn_sky = dawn_color, + dawn_horizon = dawn_color, + night_sky = night_color, + night_horizon = night_color, + }, + clouds = true, + }) + player:set_sun({visible = false, sunrise_visible = false}) + player:set_moon({visible = false}) + player:set_stars({visible = false}) elseif has_weather then -- Weather skies local day_color = mcl_weather.skycolor.get_sky_layer_color(0.5)