diff --git a/Nasal/contrail.nas b/Nasal/contrail.nas index 3ae2fcb41..c9e93572c 100644 --- a/Nasal/contrail.nas +++ b/Nasal/contrail.nas @@ -26,8 +26,8 @@ updateContrail = func{ ### Contrail -printlog ("debug", "init contrail"); _setlistener("/sim/signals/nasal-dir-initialized", func { + printlog ("debug", "init contrail"); props.globals.initNode("environment/pressure-inhg", 1, "DOUBLE"); props.globals.initNode("environment/temperature-degc", 1, "DOUBLE"); props.globals.initNode("environment/contrail", 1, "BOOL"); diff --git a/Nasal/seaport.nas b/Nasal/seaport.nas index f496b6ecb..81786fd55 100644 --- a/Nasal/seaport.nas +++ b/Nasal/seaport.nas @@ -1,11 +1,13 @@ -_setlistener("/sim/presets/latitude-deg", func { - printlog("info", "*** NEW LOCATION ***"); - settimer(func { - 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" })); - }, 8); -}, 1); +_setlistener("/sim/signals/nasal-dir-initialized", func { + _setlistener("/sim/presets/latitude-deg", func { + printlog("info", "*** NEW LOCATION ***"); + settimer(func { + 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" })); + }, 8); + }, 1); +});