Refactor more legacy
This commit is contained in:
parent
6b9209bd08
commit
ac7b9643fa
2 changed files with 20 additions and 15 deletions
|
@ -149,6 +149,11 @@ var Position = {
|
||||||
|
|
||||||
var Sim = {
|
var Sim = {
|
||||||
aero: props.globals.getNode("/sim/aero"),
|
aero: props.globals.getNode("/sim/aero"),
|
||||||
|
Input: {
|
||||||
|
Selected: {
|
||||||
|
engine: [props.globals.getNode("/sim/input/selected/engine[0]", 1),props.globals.getNode("/sim/input/selected/engine[1]", 1)],
|
||||||
|
}
|
||||||
|
},
|
||||||
Multiplay: {
|
Multiplay: {
|
||||||
online: props.globals.getNode("/sim/multiplay/online"),
|
online: props.globals.getNode("/sim/multiplay/online"),
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,38 +13,38 @@ var eng_common_init = func {
|
||||||
# nada
|
# nada
|
||||||
}
|
}
|
||||||
|
|
||||||
# Various Other Stuff
|
# Engine thrust commands
|
||||||
var doIdleThrust = func {
|
var doIdleThrust = func {
|
||||||
# Idle does not respect selected engines, because it is used to respond
|
# Idle does not respect selected engines, because it is used to respond
|
||||||
# to "Retard" and both engines must be idle for spoilers to deploy
|
# to "Retard" and both engines must be idle for spoilers to deploy
|
||||||
setprop("/controls/engines/engine[0]/throttle", 0.0);
|
pts.Controls.Engines.Engine.throttle[0].setValue(0.0);
|
||||||
setprop("/controls/engines/engine[1]/throttle", 0.0);
|
pts.Controls.Engines.Engine.throttle[1].setValue(0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var doCLThrust = func {
|
var doCLThrust = func {
|
||||||
if (getprop("/sim/input/selected/engine[0]") == 1) {
|
if (pts.Sim.Input.Selected.engine[0].getBoolValue()) {
|
||||||
setprop("/controls/engines/engine[0]/throttle", 0.63);
|
pts.Controls.Engines.Engine.throttle[0].setValue(0.63);
|
||||||
}
|
}
|
||||||
if (getprop("/sim/input/selected/engine[1]") == 1) {
|
if (pts.Sim.Input.Selected.engine[1].getBoolValue()) {
|
||||||
setprop("/controls/engines/engine[1]/throttle", 0.63);
|
pts.Controls.Engines.Engine.throttle[1].setValue(0.63);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var doMCTThrust = func {
|
var doMCTThrust = func {
|
||||||
if (getprop("/sim/input/selected/engine[0]") == 1) {
|
if (pts.Sim.Input.Selected.engine[0].getBoolValue()) {
|
||||||
setprop("/controls/engines/engine[0]/throttle", 0.8);
|
pts.Controls.Engines.Engine.throttle[0].setValue(0.80);
|
||||||
}
|
}
|
||||||
if (getprop("/sim/input/selected/engine[1]") == 1) {
|
if (pts.Sim.Input.Selected.engine[1].getBoolValue()) {
|
||||||
setprop("/controls/engines/engine[1]/throttle", 0.8);
|
pts.Controls.Engines.Engine.throttle[1].setValue(0.80);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var doTOGAThrust = func {
|
var doTOGAThrust = func {
|
||||||
if (getprop("/sim/input/selected/engine[0]") == 1) {
|
if (pts.Sim.Input.Selected.engine[0].getBoolValue()) {
|
||||||
setprop("/controls/engines/engine[0]/throttle", 1.0);
|
pts.Controls.Engines.Engine.throttle[0].setValue(1.00);
|
||||||
}
|
}
|
||||||
if (getprop("/sim/input/selected/engine[1]") == 1) {
|
if (pts.Sim.Input.Selected.engine[1].getBoolValue()) {
|
||||||
setprop("/controls/engines/engine[1]/throttle", 1.0);
|
pts.Controls.Engines.Engine.throttle[1].setValue(1.00);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue