Inhibit spawning arrival / departure with bad LATREV page type
This commit is contained in:
parent
9a929f90d6
commit
933cc91e4d
1 changed files with 20 additions and 12 deletions
|
@ -115,12 +115,16 @@ var lskbutton = func(btn, i) {
|
||||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("L1", i);
|
printInput2("L1", i);
|
||||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
|
||||||
if (canvas_mcdu.myDeparture[i] != nil) {
|
if (canvas_mcy.myLatRev[i].type == 0) {
|
||||||
canvas_mcdu.myDeparture[i].del();
|
if (canvas_mcdu.myDeparture[i] != nil) {
|
||||||
}
|
canvas_mcdu.myDeparture[i].del();
|
||||||
canvas_mcdu.myDeparture[i] = nil;
|
}
|
||||||
canvas_mcdu.myDeparture[i] = departurePage.new(canvas_mcdu.myLatRev[i].title[2], i);
|
canvas_mcdu.myDeparture[i] = nil;
|
||||||
setprop("MCDU[" ~ i ~ "]/page", "DEPARTURE");
|
canvas_mcdu.myDeparture[i] = departurePage.new(canvas_mcdu.myLatRev[i].title[2], i);
|
||||||
|
setprop("MCDU[" ~ i ~ "]/page", "DEPARTURE");
|
||||||
|
} else {
|
||||||
|
notAllowed(i);
|
||||||
|
}
|
||||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
|
||||||
canvas_mcdu.myFpln[i].pushButtonLeft(1);
|
canvas_mcdu.myFpln[i].pushButtonLeft(1);
|
||||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DIRTO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DIRTO") {
|
||||||
|
@ -300,12 +304,16 @@ var rskbutton = func(btn, i) {
|
||||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("R1", i);
|
printInput2("R1", i);
|
||||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "LATREV") {
|
||||||
if (canvas_mcdu.myArrival[i] != nil) {
|
if (canvas_mcy.myLatRev[i].type == 1) {
|
||||||
canvas_mcdu.myArrival[i].del();
|
if (canvas_mcdu.myArrival[i] != nil) {
|
||||||
}
|
canvas_mcdu.myArrival[i].del();
|
||||||
canvas_mcdu.myArrival[i] = nil;
|
}
|
||||||
canvas_mcdu.myArrival[i] = arrivalPage.new(canvas_mcdu.myLatRev[i].title[2], i);
|
canvas_mcdu.myArrival[i] = nil;
|
||||||
setprop("MCDU[" ~ i ~ "]/page", "ARRIVAL");
|
canvas_mcdu.myArrival[i] = arrivalPage.new(canvas_mcdu.myLatRev[i].title[2], i);
|
||||||
|
setprop("MCDU[" ~ i ~ "]/page", "ARRIVAL");
|
||||||
|
} else {
|
||||||
|
notAllowed(i);
|
||||||
|
}
|
||||||
} else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") {
|
||||||
canvas_mcdu.myFpln[i].pushButtonRight(1);
|
canvas_mcdu.myFpln[i].pushButtonRight(1);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue