diff --git a/gui/dialogs/weather.xml b/gui/dialogs/weather.xml index 38be4af9e..482c00ed8 100644 --- a/gui/dialogs/weather.xml +++ b/gui/dialogs/weather.xml @@ -4,22 +4,22 @@ 6) and string.match(word, "*[0-9][0-9]KT")) { # We've got the wind definition word. Now to split it up. # Format is nnnmmKT or nnnmmGppKT # Direction is easy - the first 3 characters. var dir = chr(word[0]) ~ chr(word[1]) ~ chr(word[2]); - + if (dir == "VRB") { setprop("/local-weather/tmp/tile-orientation-deg", 360.0 * rand()); setprop("/local-weather/tmp/gust-angular-variation-deg", 180.0); setprop("/local-weather/tmp/gust-frequency-hz", 0.001); } else { - setprop("/local-weather/tmp/tile-orientation-deg", dir); + setprop("/local-weather/tmp/tile-orientation-deg", dir); setprop("/local-weather/tmp/gust-angular-variation-deg", 0.0); setprop("/local-weather/tmp/gust-frequency-hz", 0.0); } - + # Next two are the base wind var spd = chr(word[3]) ~ chr(word[4]); setprop("/local-weather/tmp/windspeed-kt", spd); - + var gst = 0; if ((size(word) > 7) and (chr(word[5]) == 'G')) { # Gusty case gst = chr(word[6]) ~ chr(word[7]); } - + if ((gst > spd) and (spd > 0)) { setprop("/local-weather/tmp/gust-relative-strength", (gst - spd) / spd); setprop("/local-weather/tmp/gust-frequency-hz", 0.7); @@ -255,10 +255,10 @@ } } } - - + + if (local_weather_props != nil) { - # The local weather properties need to be set now, so they can + # The local weather properties need to be set now, so they can # be configured by the user if they select Advanced Settings props.copy(local_weather_props, props.globals.getNode("/local-weather/tmp", 1)); } else { @@ -266,20 +266,20 @@ # METAR setprop("/local-weather/tmp/tile-type", "manual"); setprop("/local-weather/tmp/tile-management", "METAR"); - } + } me.refresh(); }, metarListener : func( n ) { - var metar = getprop("environment/metar/data"); + var metar = getprop("environment/metar/data"); if( metar == nil or metar == "" ) metar = "NIL"; metar = normalize_string(metar); printlog( "info", "new METAR: " ~ metar ); setprop( me.base ~ "/metar-string", metar ); gui.dialog_update( "weather-conditions", "metar-string" ); }, - + }; var controller = GlobalWeatherDialogController.new( cmdarg() ); @@ -665,9 +665,9 @@ --> 70 15 - false + true true - true + false 0 sim/gui/dialogs/metar/metar-string