Move AW auto-start detection outside AW namespace to avoid duplicate AW start issue when de-selected in launcher and selected in-sim
This commit is contained in:
parent
43ac415a8a
commit
73073c4512
2 changed files with 17 additions and 10 deletions
|
@ -4757,13 +4757,3 @@ var updateMenu = func {
|
|||
_setlistener("/nasal/local_weather/enabled", updateMenu);
|
||||
|
||||
|
||||
var autoInit = func {
|
||||
var isEnabled = getprop("/nasal/local_weather/enabled");
|
||||
if (isEnabled == 1)
|
||||
{
|
||||
print ("Request detected to initialize Advanced Weather on startup...");
|
||||
settimer( func {local_weather.set_tile();}, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
autoInit();
|
||||
|
|
17
Nasal/local_weather_auto_init.nas
Normal file
17
Nasal/local_weather_auto_init.nas
Normal file
|
@ -0,0 +1,17 @@
|
|||
# this routine checks whether the launcher has requested to auto-start AW
|
||||
# we can't do this inside the AW namespace because that is only loaded
|
||||
# on demand, and we want this at Nasal (re-)init, not at AW namespace loading
|
||||
|
||||
# Thorsten Renk 2018
|
||||
|
||||
|
||||
var autoInit = func {
|
||||
var isEnabled = getprop("/nasal/local_weather/enabled");
|
||||
if (isEnabled == 1)
|
||||
{
|
||||
print ("Request detected to initialize Advanced Weather on startup...");
|
||||
settimer( func {local_weather.set_tile();}, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
autoInit();
|
Loading…
Add table
Reference in a new issue