MT 5.5: temporary func reset_celestial_vault no longer needed
parent
c6ab1e0b2d
commit
549bf412ee
|
@ -420,7 +420,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
if celvault.stars then player:set_stars(celvault.stars) end
|
if celvault.stars then player:set_stars(celvault.stars) end
|
||||||
if celvault.clouds then player:set_clouds(celvault.clouds) end
|
if celvault.clouds then player:set_clouds(celvault.clouds) end
|
||||||
else
|
else
|
||||||
arena_lib.temp.reset_celestial_vault(player)
|
-- TODO: this should be considered to make it shorter: https://github.com/minetest/minetest/issues/11917
|
||||||
|
player:set_sky()
|
||||||
|
player:set_sun()
|
||||||
|
player:set_moon()
|
||||||
|
player:set_stars()
|
||||||
|
player:set_clouds()
|
||||||
end
|
end
|
||||||
|
|
||||||
temp_sky_settings[p_name] = nil
|
temp_sky_settings[p_name] = nil
|
||||||
|
@ -430,7 +435,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
elseif fields.reset then
|
elseif fields.reset then
|
||||||
|
|
||||||
arena_lib.set_celestial_vault(p_name, mod, arena_name, "all", nil, true)
|
arena_lib.set_celestial_vault(p_name, mod, arena_name, "all", nil, true)
|
||||||
arena_lib.temp.reset_celestial_vault(player)
|
player:set_sky()
|
||||||
|
player:set_sun()
|
||||||
|
player:set_moon()
|
||||||
|
player:set_stars()
|
||||||
|
player:set_clouds()
|
||||||
fill_tempsky(p_name, arena)
|
fill_tempsky(p_name, arena)
|
||||||
|
|
||||||
-- TODO: there is some Minetest related bug that doesn't allow to instantly update dropdown fields.
|
-- TODO: there is some Minetest related bug that doesn't allow to instantly update dropdown fields.
|
||||||
|
|
|
@ -58,62 +58,3 @@ function arena_lib.temp.get_sky(player)
|
||||||
|
|
||||||
return p_sky
|
return p_sky
|
||||||
end
|
end
|
||||||
|
|
||||||
-- proper celestial vault reset => https://github.com/minetest/minetest/pull/11922
|
|
||||||
function arena_lib.temp.reset_celestial_vault(player)
|
|
||||||
local sky = {
|
|
||||||
base_color = "#ffffff",
|
|
||||||
type = "regular",
|
|
||||||
clouds = true,
|
|
||||||
sky_color = {
|
|
||||||
day_sky = "#61b5f5",
|
|
||||||
day_horizon = "#90d3f6",
|
|
||||||
dawn_sky = "#b4bafa",
|
|
||||||
dawn_horizon = "#bac1f0",
|
|
||||||
night_sky = "#006bff",
|
|
||||||
night_horizon = "#4090ff",
|
|
||||||
indoors = "#646464",
|
|
||||||
fog_tint_type = "default",
|
|
||||||
fog_sun_tint = "#f47d1d",
|
|
||||||
fog_moon_tint = "#7f99cc"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local sun = {
|
|
||||||
visible = true,
|
|
||||||
sunrise_visible = true,
|
|
||||||
texture = "sun.png",
|
|
||||||
tonemap = "sun_tonemap.png",
|
|
||||||
sunrise = "sunrisebg.png",
|
|
||||||
scale = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
local moon = {
|
|
||||||
visible = true,
|
|
||||||
texture = "moon.png",
|
|
||||||
tonemap = "moon_tonemap.png",
|
|
||||||
scale = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
local stars = {
|
|
||||||
visible = true,
|
|
||||||
count = 1000,
|
|
||||||
star_color = "#ebebff69",
|
|
||||||
scale = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
local clouds = {
|
|
||||||
density = 0.4,
|
|
||||||
color = "#fff0f0e5",
|
|
||||||
ambient = "#000000",
|
|
||||||
thickness = 16,
|
|
||||||
height = 120,
|
|
||||||
speed = { x = 0, z = -2}
|
|
||||||
}
|
|
||||||
|
|
||||||
player:set_sky(sky)
|
|
||||||
player:set_sun(sun)
|
|
||||||
player:set_moon(moon)
|
|
||||||
player:set_stars(stars)
|
|
||||||
player:set_clouds(clouds)
|
|
||||||
end
|
|
||||||
|
|
Loading…
Reference in New Issue