Shutdown Function

This commit is contained in:
Marsdolphin 2020-09-06 09:03:44 +08:00 committed by GitHub
parent 35238370b5
commit c1a32c6419
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,6 +24,19 @@ Engines.autostart = func {
} }
if ( ! getprop('/engines/engine[1]/running') ) { if ( ! getprop('/engines/engine[1]/running') ) {
me.startengine[1] = 1; me.startengine[1] = 1;
}
if ( ! getprop('/engines/engine[0]/running') ) {
setprop('system/electrical/outputs/efis', 10);
setprop('systems/electric/outputs/avionics', 1);
}
}
Engines.shutdown = func {
if ( ! getprop('/controls/engines/engine[0]/cutoff',1) ) {
setprop('system/electrical/outputs/efis', 0);
}
if ( ! getprop('/controls/engines/engine[0]/cutoff',1) ) {
setprop('system/electrical/outputs/efis', 0);
} }
} }