1
0
Fork 0

Local Weather: auto-enable 3D clouds and disable the checkbox.

This commit is contained in:
Michael Danilov 2021-08-23 21:18:25 +02:00
parent eed433ce9f
commit d394edb0a2
2 changed files with 1 additions and 2 deletions

View file

@ -4756,6 +4756,7 @@ setprop(lwi~"ipoint-number",0);
var updateMenu = func { var updateMenu = func {
var isEnabled = getprop("/nasal/local_weather/enabled"); var isEnabled = getprop("/nasal/local_weather/enabled");
gui.menuEnable("local_weather", isEnabled); gui.menuEnable("local_weather", isEnabled);
if (isEnabled) {setprop("/sim/rendering/clouds3d-enable", "true");}
} }
_setlistener("/nasal/local_weather/enabled", updateMenu); _setlistener("/nasal/local_weather/enabled", updateMenu);

View file

@ -174,8 +174,6 @@
# If Local Weather is enabled, re-initialize with updated # If Local Weather is enabled, re-initialize with updated
# initial tile and tile selection. # initial tile and tile selection.
setprop("/nasal/local_weather/enabled", "true"); setprop("/nasal/local_weather/enabled", "true");
# Local Weather requires 3D clouds.
setprop("/sim/rendering/clouds3d-enable", "true");
# Re-initialize local weather. # Re-initialize local weather.
settimer( func {local_weather.set_tile();}, 0.2); settimer( func {local_weather.set_tile();}, 0.2);