From 0803bb18222a5831a8912e4ef5cb84f96cbc18bc Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 3 Dec 2017 09:44:01 -0400 Subject: [PATCH] Remove extra bracket from pneumatics.nas --- Nasal/pneumatics.nas | 52 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Nasal/pneumatics.nas b/Nasal/pneumatics.nas index f67137d5..4663b43d 100644 --- a/Nasal/pneumatics.nas +++ b/Nasal/pneumatics.nas @@ -415,36 +415,36 @@ var flashfault2 = func { setprop("/controls/deice/eng2-fault", 0); }, 0.5); } - # Oxygen (Cabin) - setlistener("/controls/oxygen/masksDeployMan", func { - if (guard and masks) { - setprop("/controls/oxygen/masksDeployMan", 0); - } else if (!guard and masks) { - setprop("/controls/oxygen/masksDeployMan", 1); - setprop("/controls/oxygen/masksDeploy", 1); - setprop("/controls/oxygen/masksSys", 1); - } - }); +# Oxygen (Cabin) - if (cabinalt > 13500) { +setlistener("/controls/oxygen/masksDeployMan", func { + if (guard and masks) { + setprop("/controls/oxygen/masksDeployMan", 0); + } else if (!guard and masks) { + setprop("/controls/oxygen/masksDeployMan", 1); setprop("/controls/oxygen/masksDeploy", 1); setprop("/controls/oxygen/masksSys", 1); } - - setlistener("/controls/oxygen/masksDeployMan", func { - var masks = getprop("/controls/oxygen/masksDeployMan"); - var autoMasks = getprop("/controls/oxygen/masksDeploy"); - if (!masks) { - setprop("/controls/oxygen/masksDeployMan", 1); - } - }); +}); - setlistener("/controls/oxygen/masksDeploy", func { - var masks = getprop("/controls/oxygen/masksDeployMan"); - var autoMasks = getprop("/controls/oxygen/masksDeploy"); - if (!autoMasks) { - setprop("/controls/oxygen/masksDeploy", 1); - } - }); +if (cabinalt > 13500) { + setprop("/controls/oxygen/masksDeploy", 1); + setprop("/controls/oxygen/masksSys", 1); } + +setlistener("/controls/oxygen/masksDeployMan", func { + var masks = getprop("/controls/oxygen/masksDeployMan"); + var autoMasks = getprop("/controls/oxygen/masksDeploy"); + if (!masks) { + setprop("/controls/oxygen/masksDeployMan", 1); + } +}); + +setlistener("/controls/oxygen/masksDeploy", func { + var masks = getprop("/controls/oxygen/masksDeployMan"); + var autoMasks = getprop("/controls/oxygen/masksDeploy"); + if (!autoMasks) { + setprop("/controls/oxygen/masksDeploy", 1); + } +});