Phi: nicer scroll animation for METAR widget
[fg:fgdata.git] / Nasal / seaport.nas
1 _setlistener("/sim/signals/nasal-dir-initialized", func {
2         _setlistener("/sim/presets/latitude-deg", func {
3                 printlog("info", "*** NEW LOCATION ***");
4                 settimer(func {
5                         var typ = getprop("/sim/type");
6                         var lat = getprop("/position/latitude-deg");
7                         var lon = getprop("/position/longitude-deg");
8                         var g = geodinfo(lat, lon);
9                         if ((g != nil and g[1] != nil and g[1].solid) and (typ == "seaplane") )
10                                 fgcommand("dialog-show", props.Node.new({ "dialog-name": "seaport" }));
11                 }, 8);
12         }, 1);
13 });