update logo light IMPORTANT BUGFIX PLEASE DOWNLOAD THIS ASAP
This commit is contained in:
parent
a8edebc578
commit
95f7ece761
2 changed files with 14 additions and 10 deletions
Binary file not shown.
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 44 KiB |
|
@ -41,6 +41,10 @@ var beacon_switch = props.globals.getNode("/controls/switches/beacon", 2);
|
||||||
var beacon = aircraft.light.new("/sim/model/lights/beacon", [0.015, 3], "/controls/lighting/beacon");
|
var beacon = aircraft.light.new("/sim/model/lights/beacon", [0.015, 3], "/controls/lighting/beacon");
|
||||||
var strobe_switch = props.globals.getNode("/controls/switches/strobe", 2);
|
var strobe_switch = props.globals.getNode("/controls/switches/strobe", 2);
|
||||||
var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.025, 1.5], "/controls/lighting/strobe");
|
var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.025, 1.5], "/controls/lighting/strobe");
|
||||||
|
var logo_lights = getprop("/sim/model/lights/logo-lights");
|
||||||
|
var setting = getprop("/controls/lighting/nav-lights-switch");
|
||||||
|
var wow = getprop("/gear/gear[2]/wow");
|
||||||
|
var slats = getprop("/controls/flight/slats");
|
||||||
|
|
||||||
setlistener("controls/lighting/nav-lights-switch", func {
|
setlistener("controls/lighting/nav-lights-switch", func {
|
||||||
var nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
|
var nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
|
||||||
|
@ -374,19 +378,19 @@ var flaptimer = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var logoTimer = maketimer(0.1, func {
|
var logoTimer = maketimer(0.1, func {
|
||||||
var logo_lights = props.globals.getNode("/sim/model/lights/logo-lights");
|
logo_lights = getprop("/sim/model/lights/logo-lights");
|
||||||
var setting = getprop("/controls/lighting/nav-lights-switch");
|
setting = getprop("/controls/lighting/nav-lights-switch");
|
||||||
var wow = getprop("/gear/gear[2]/wow");
|
wow = getprop("/gear/gear[2]/wow");
|
||||||
var slats = getprop("/controls/flight/slats");
|
slats = getprop("/controls/flight/slats");
|
||||||
if (setting != 2) {
|
if (setting == 0 and logo_lights == 1) {
|
||||||
logo_lights.setBoolValue(0);
|
setprop("/sim/model/lights/logo-lights", 1);
|
||||||
} else if (setting == 2) {
|
} else if (setting == 1 or setting == 2) {
|
||||||
if (wow or slats == 1) {
|
if (wow or slats == 1) {
|
||||||
logo_lights.setBoolValue(1);
|
setprop("/sim/model/lights/logo-lights", 1);
|
||||||
} else if (!wow and slats < 1) {
|
} else if (!wow and slats < 1) {
|
||||||
logo_lights.setBoolValue(0);
|
setprop("/sim/model/lights/logo-lights", 1);
|
||||||
} else {
|
} else {
|
||||||
logo_lights.setBoolValue(0);
|
setprop("/sim/model/lights/logo-lights", 0);
|
||||||
print("Logo Lights: Unknown Condition on line 390"); # this is important for debugging
|
print("Logo Lights: Unknown Condition on line 390"); # this is important for debugging
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue