A3XX: Fix Man Engine Start System

This commit is contained in:
Joshua Davidson 2017-07-12 20:45:02 -04:00
parent ec418dbef2
commit 317039cbb2

View file

@ -77,12 +77,9 @@ setlistener("/controls/engines/engine[0]/man-start", func {
var start_one_mancheck = func {
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
setprop("/systems/pneumatic/eng1-starter", 1);
if (getprop("/systems/pneumatic/total-psi") >= 28) {
setprop("/engines/engine[0]/state", 1);
setprop("/controls/engines/engine[0]/starter", 1);
}
settimer(start_one_mancheck_b, 0.5);
}
} else {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
@ -93,6 +90,13 @@ var start_one_mancheck = func {
}
}
var start_one_mancheck_b = func {
if (getprop("/systems/pneumatic/total-psi") >= 28) {
setprop("/engines/engine[0]/state", 1);
setprop("/controls/engines/engine[0]/starter", 1);
}
}
var start_one_check = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
setprop("/systems/pneumatic/eng1-starter", 1);
@ -134,12 +138,9 @@ setlistener("/controls/engines/engine[1]/man-start", func {
var start_two_mancheck = func {
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
setprop("/systems/pneumatic/eng2-starter", 1);
if (getprop("/systems/pneumatic/total-psi") >= 28) {
setprop("/engines/engine[1]/state", 1);
setprop("/controls/engines/engine[1]/starter", 1);
}
settimer(start_two_mancheck_b, 0.5);
}
} else {
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
@ -150,6 +151,13 @@ var start_two_mancheck = func {
}
}
var start_two_mancheck_b = func {
if (getprop("/systems/pneumatic/total-psi") >= 28) {
setprop("/engines/engine[1]/state", 1);
setprop("/controls/engines/engine[1]/starter", 1);
}
}
var start_two_check = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
setprop("/systems/pneumatic/eng2-starter", 1);