From e744b71016399ea168decba9d0149fc4b01060ce Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 3 Aug 2017 19:31:12 +0100 Subject: [PATCH] updateLite --- Models/Lights/ALS/taxilight.eff | 2 +- Models/Lights/landing-nose.xml | 5 ++++- Nasal/libraries.nas | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Models/Lights/ALS/taxilight.eff b/Models/Lights/ALS/taxilight.eff index 2c98950a..877ade9d 100644 --- a/Models/Lights/ALS/taxilight.eff +++ b/Models/Lights/ALS/taxilight.eff @@ -15,7 +15,7 @@ 0.98 0.98 0.98 - controls/lighting/taxi-light-switch + /sim/model/lights/nose-lights 1 0.0 0.0 diff --git a/Models/Lights/landing-nose.xml b/Models/Lights/landing-nose.xml index 24772b89..f1ab04e5 100644 --- a/Models/Lights/landing-nose.xml +++ b/Models/Lights/landing-nose.xml @@ -33,7 +33,10 @@ systems/electrical/bus/ac-ess 110 - controls/lighting/landing-lights[1] + + /sim/model/lights/nose-lights + 0.5 + gear/gear[0]/position-norm 1 diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index 94793893..2c95256a 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -24,6 +24,9 @@ setprop("/controls/lighting/ndl-norm", 0); setprop("/controls/lighting/ndr-norm", 0); setprop("/controls/lighting/upper-norm", 0); +# Lights +setprop("/sim/model/lights/nose-lights", 1); + # Oil Qty var qty1 = math.round((rand() * 5 ) + 20, 0.1); var qty2 = math.round((rand() * 5 ) + 20, 0.1); @@ -53,6 +56,18 @@ setlistener("controls/lighting/nav-lights-switch", func { logo_lights.setBoolValue(0); } }); + +setlistener("controls/lighting/taxi-light-switch", func { + var nose_lights = getprop("/sim/model/lights/nose-lights"); + var settingT = getprop("/controls/lighting/taxi-light-switch"); + if (settingT == 0) { + setprop("/sim/model/lights/nose-lights", 0); + } else if (settingT == 0.5) { + setprop("/sim/model/lights/nose-lights", 0.85); + } else if (settingT == 1) { + setprop("/sim/model/lights/nose-lights", 1); + } +}, 1, 0); setlistener("controls/lighting/landing-lights[1]", func { var landl = getprop("/controls/lighting/landing-lights[1]");