updateLite

This commit is contained in:
Jonathan Redpath 2017-08-03 19:31:12 +01:00
parent 5ff7ede4e5
commit e744b71016
3 changed files with 20 additions and 2 deletions

View file

@ -15,7 +15,7 @@
<light_color_center_r type="float">0.98</light_color_center_r>
<light_color_center_g type="float">0.98</light_color_center_g>
<light_color_center_b type="float">0.98</light_color_center_b>
<intensity_scale type="float"><use>controls/lighting/taxi-light-switch</use></intensity_scale>
<intensity_scale type="float"><use>/sim/model/lights/nose-lights</use></intensity_scale>
<pointing_x type="float">1</pointing_x>
<pointing_y type="float">0.0</pointing_y>
<pointing_z type="float">0.0</pointing_z>

View file

@ -33,7 +33,10 @@
<property>systems/electrical/bus/ac-ess</property>
<value>110</value>
</greater-than-equals>
<property>controls/lighting/landing-lights[1]</property>
<greater-than-equals>
<property>/sim/model/lights/nose-lights</property>
<value>0.5</value>
</greater-than-equals>
<equals>
<property>gear/gear[0]/position-norm</property>
<value>1</value>

View file

@ -24,6 +24,9 @@ setprop("/controls/lighting/ndl-norm", 0);
setprop("/controls/lighting/ndr-norm", 0);
setprop("/controls/lighting/upper-norm", 0);
# Lights
setprop("/sim/model/lights/nose-lights", 1);
# Oil Qty
var qty1 = math.round((rand() * 5 ) + 20, 0.1);
var qty2 = math.round((rand() * 5 ) + 20, 0.1);
@ -53,6 +56,18 @@ setlistener("controls/lighting/nav-lights-switch", func {
logo_lights.setBoolValue(0);
}
});
setlistener("controls/lighting/taxi-light-switch", func {
var nose_lights = getprop("/sim/model/lights/nose-lights");
var settingT = getprop("/controls/lighting/taxi-light-switch");
if (settingT == 0) {
setprop("/sim/model/lights/nose-lights", 0);
} else if (settingT == 0.5) {
setprop("/sim/model/lights/nose-lights", 0.85);
} else if (settingT == 1) {
setprop("/sim/model/lights/nose-lights", 1);
}
}, 1, 0);
setlistener("controls/lighting/landing-lights[1]", func {
var landl = getprop("/controls/lighting/landing-lights[1]");