mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-05 07:41:06 +01:00
Fix fog tint in overworld, apply memory leak fix from rain.lua to snow.lua and thunder.lua
This commit is contained in:
parent
614518c6cd
commit
2ca0ccd8fe
3 changed files with 21 additions and 14 deletions
|
@ -52,6 +52,9 @@ function dimension_handlers.overworld(player, sky_data)
|
||||||
dawn_horizon = dawn_color,
|
dawn_horizon = dawn_color,
|
||||||
night_sky = night_color,
|
night_sky = night_color,
|
||||||
night_horizon = night_color,
|
night_horizon = night_color,
|
||||||
|
fog_sun_tint = "#ff5f33",
|
||||||
|
fog_moon_tint = nil,
|
||||||
|
fog_tint_type = "custom",
|
||||||
},
|
},
|
||||||
clouds = true,
|
clouds = true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,15 @@ function mcl_weather.has_snow(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_weather.snow.set_sky_box()
|
function mcl_weather.snow.set_sky_box()
|
||||||
mcl_weather.skycolor.add_layer(
|
if mcl_weather.skycolor.current_layer_name() ~= "weather-pack-snow-sky" then
|
||||||
"weather-pack-snow-sky",
|
mcl_weather.skycolor.add_layer(
|
||||||
{{r=0, g=0, b=0},
|
"weather-pack-snow-sky",
|
||||||
{r=85, g=86, b=86},
|
{{r=0, g=0, b=0},
|
||||||
{r=135, g=135, b=135},
|
{r=85, g=86, b=86},
|
||||||
{r=85, g=86, b=86},
|
{r=135, g=135, b=135},
|
||||||
{r=0, g=0, b=0}})
|
{r=85, g=86, b=86},
|
||||||
|
{r=0, g=0, b=0}})
|
||||||
|
end
|
||||||
mcl_weather.skycolor.active = true
|
mcl_weather.skycolor.active = true
|
||||||
for _, player in pairs(get_connected_players()) do
|
for _, player in pairs(get_connected_players()) do
|
||||||
player:set_clouds({color="#ADADADE8"})
|
player:set_clouds({color="#ADADADE8"})
|
||||||
|
|
|
@ -23,13 +23,15 @@ minetest.register_globalstep(function(dtime)
|
||||||
mcl_weather.rain.make_weather()
|
mcl_weather.rain.make_weather()
|
||||||
|
|
||||||
if mcl_weather.thunder.init_done == false then
|
if mcl_weather.thunder.init_done == false then
|
||||||
mcl_weather.skycolor.add_layer("weather-pack-thunder-sky", {
|
if mcl_weather.skycolor.current_layer_name() ~= "weather-pack-thunder-sky" then
|
||||||
{r=0, g=0, b=0},
|
mcl_weather.skycolor.add_layer("weather-pack-thunder-sky", {
|
||||||
{r=40, g=40, b=40},
|
{r=0, g=0, b=0},
|
||||||
{r=85, g=86, b=86},
|
{r=40, g=40, b=40},
|
||||||
{r=40, g=40, b=40},
|
{r=85, g=86, b=86},
|
||||||
{r=0, g=0, b=0},
|
{r=40, g=40, b=40},
|
||||||
})
|
{r=0, g=0, b=0},
|
||||||
|
})
|
||||||
|
end
|
||||||
mcl_weather.skycolor.active = true
|
mcl_weather.skycolor.active = true
|
||||||
for _, player in pairs(get_connected_players()) do
|
for _, player in pairs(get_connected_players()) do
|
||||||
player:set_clouds({color="#3D3D3FE8"})
|
player:set_clouds({color="#3D3D3FE8"})
|
||||||
|
|
Loading…
Reference in a new issue