2018-12-15 15:28:32 +00:00
|
|
|
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
2020-04-20 14:24:49 +00:00
|
|
|
setlistener("/sim/presets/latitude-deg", func {
|
|
|
|
logprint(LOG_INFO, "*** NEW LOCATION ***");
|
2018-12-15 15:28:32 +00:00
|
|
|
settimer(func {
|
2010-10-13 18:46:31 +00:00
|
|
|
var typ = getprop("/sim/type");
|
|
|
|
var lat = getprop("/position/latitude-deg");
|
|
|
|
var lon = getprop("/position/longitude-deg");
|
|
|
|
var g = geodinfo(lat, lon);
|
|
|
|
if ((g != nil and g[1] != nil and g[1].solid) and (typ == "seaplane") )
|
|
|
|
fgcommand("dialog-show", props.Node.new({ "dialog-name": "seaport" }));
|
2018-12-15 15:28:32 +00:00
|
|
|
}, 8);
|
2010-10-13 18:46:31 +00:00
|
|
|
}, 1);
|
|
|
|
});
|