Use setlistener, 0, 0. Nasal fixes.
This commit is contained in:
parent
a61f4ab075
commit
c1e71a9112
6 changed files with 15 additions and 15 deletions
|
@ -3,7 +3,7 @@
|
|||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
setprop("/engines/engine[0]/thr", 0);
|
||||
setprop("/engines/engine[1]/thr", 0);
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/engines/engine[0]/n2", func {
|
||||
var n2 = getprop("/engines/engine[0]/n2");
|
||||
|
@ -12,7 +12,7 @@ setlistener("/engines/engine[0]/n2", func {
|
|||
thr = 0;
|
||||
}
|
||||
setprop("/engines/engine[0]/thr", thr);
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/engines/engine[1]/n2", func {
|
||||
var n2 = getprop("/engines/engine[1]/n2");
|
||||
|
@ -21,15 +21,15 @@ setlistener("/engines/engine[1]/n2", func {
|
|||
thr = 0;
|
||||
}
|
||||
setprop("/engines/engine[1]/thr", thr);
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/engines/engine[0]/egt-degf", func {
|
||||
setprop("engines/engine[0]/egt-degc", (getprop("engines/engine[0]/egt-degf") - 32) / 1.8);
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/engines/engine[1]/egt-degf", func {
|
||||
setprop("engines/engine[1]/egt-degc", (getprop("engines/engine[1]/egt-degf") - 32) / 1.8);
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", func {
|
||||
var rev = getprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad");
|
||||
|
@ -38,7 +38,7 @@ setlistener("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", func {
|
|||
} else {
|
||||
setprop("/surface-positions/reverser-norm", 0);
|
||||
}
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", func {
|
||||
var rev = getprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad");
|
||||
|
@ -47,4 +47,4 @@ setlistener("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", func {
|
|||
} else {
|
||||
setprop("/surface-positions/reverser-norm", 0);
|
||||
}
|
||||
});
|
||||
}, 0, 0);
|
|
@ -177,4 +177,4 @@ var toggle_parkingbrakes = func {
|
|||
setlistener("sim/signals/fdm-initialized", func {
|
||||
ground_services.init();
|
||||
print("Ground Services ..... Initialized");
|
||||
});
|
||||
}, 0, 0);
|
||||
|
|
|
@ -199,7 +199,7 @@ var Gain = {
|
|||
};
|
||||
|
||||
var ITAF = {
|
||||
init: func(t) { # Not everything should be reset if the reset is type 1
|
||||
init: func(t = 0) { # Not everything should be reset if the reset is type 1
|
||||
if (t != 1) {
|
||||
Input.alt.setValue(10000);
|
||||
Input.bankLimitSW.setValue(0);
|
||||
|
|
|
@ -8,7 +8,7 @@ setprop("/controls/lighting/beacon",0);
|
|||
setprop("/controls/lighting/landing-light",0);
|
||||
setprop("/controls/lighting/logo-lights",0);
|
||||
setprop("/controls/lighting/nav-lights",0);
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("controls/lighting/landing-lights[0]", func
|
||||
{
|
||||
|
@ -28,4 +28,4 @@ setlistener("controls/lighting/landing-lights[0]", func
|
|||
} else {
|
||||
setprop("sim/rendering/als-secondary-lights/use-alt-landing-light",0);
|
||||
}
|
||||
});
|
||||
}, 0, 0);
|
||||
|
|
|
@ -66,4 +66,4 @@ setlistener("controls/lighting/landing-light",
|
|||
func {
|
||||
if(getprop("controls/lighting/landing-light")) setprop("controls/lighting/landing-lights-norm",1); else setprop("controls/lighting/landing-lights-norm",0);
|
||||
}
|
||||
);
|
||||
, 0, 0);
|
|
@ -17,8 +17,8 @@ setlistener("controls/gear/gear-down", func
|
|||
{
|
||||
props.globals.getNode("controls/gear/gear-down").setBoolValue(1);
|
||||
}
|
||||
});
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
itaf.ITAF.init();
|
||||
});
|
||||
itaf.ITAF.init(0);
|
||||
}, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue