Extend dome light to most objects, hook up to elec
This commit is contained in:
parent
ca9d3aa0a0
commit
2bef070f2c
12 changed files with 145 additions and 5 deletions
|
@ -5635,26 +5635,49 @@
|
|||
<object-name>beam_f</object-name>
|
||||
<object-name>sfl.001</object-name>
|
||||
<object-name>sfl.011</object-name>
|
||||
<object-name>sfl.012</object-name>
|
||||
<object-name>sfl.014</object-name>
|
||||
<object-name>WindowCpt</object-name>
|
||||
<object-name>WindowFo</object-name>
|
||||
<object-name>ohpanel2</object-name>
|
||||
<object-name>efis_box_1</object-name>
|
||||
<object-name>efis_box_2</object-name>
|
||||
<object-name>efis_box_3</object-name>
|
||||
<object-name>efis_box_4</object-name>
|
||||
<object-name>main_panel</object-name>
|
||||
<object-name>poly000041</object-name>
|
||||
<object-name>side_base.002</object-name>
|
||||
<object-name>pedals_block_capt</object-name>
|
||||
<object-name>so.1</object-name>
|
||||
<object-name>sts</object-name>
|
||||
<object-name>sts.001</object-name>
|
||||
<object-name>sts.003</object-name>
|
||||
<object-name>sts.004</object-name>
|
||||
<object-name>wall_1</object-name>
|
||||
<object-name>carpet</object-name>
|
||||
<object-name>DoorC</object-name>
|
||||
<object-name>pedestal1</object-name>
|
||||
<object-name>pedestal2</object-name>
|
||||
<object-name>pedestal3</object-name>
|
||||
<object-name>ped_footrest</object-name>
|
||||
<object-name>pedestal_low</object-name>
|
||||
<object-name>thr_quad</object-name>
|
||||
<object-name>trim_1</object-name>
|
||||
<object-name>trim_2</object-name>
|
||||
<object-name>fcu_panel</object-name>
|
||||
<object-name>seat1</object-name>
|
||||
<object-name>seat4</object-name>
|
||||
<object-name>seat6</object-name>
|
||||
<object-name>seat7</object-name>
|
||||
<object-name>compass_box</object-name>
|
||||
<object-name>iesi</object-name>
|
||||
<object-name>clock_body</object-name>
|
||||
<object-name>gear_lever_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>controls/lighting/dome-norm</factor-prop>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
|
@ -5667,7 +5690,7 @@
|
|||
<red>0.8</red>
|
||||
<green>0.8</green>
|
||||
<blue>0.8</blue>
|
||||
<factor-prop>controls/lighting/dome-norm</factor-prop>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
|
|
|
@ -10,4 +10,15 @@
|
|||
|
||||
<path>res/ATC.ac</path>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>atc_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
</PropertyList>
|
||||
|
|
|
@ -10,4 +10,15 @@
|
|||
|
||||
<path>res/Audio1.ac</path>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>audio_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
</PropertyList>
|
||||
|
|
|
@ -10,4 +10,15 @@
|
|||
|
||||
<path>res/Audio1.ac</path>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>audio_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
</PropertyList>
|
||||
|
|
|
@ -1372,4 +1372,16 @@
|
|||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>mcdu_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -1372,4 +1372,16 @@
|
|||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>mcdu_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -985,7 +985,7 @@
|
|||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>controls/lighting/dome-norm</factor-prop>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
|
|
|
@ -10,4 +10,26 @@
|
|||
|
||||
<path>res/Pedestal_up.ac</path>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>atc_body</object-name>
|
||||
<object-name>ecam_body</object-name>
|
||||
<object-name>ecam_switch_body</object-name>
|
||||
<object-name>engine_body</object-name>
|
||||
<object-name>radar_body</object-name>
|
||||
<object-name>vu111_body</object-name>
|
||||
<object-name>vu112_body</object-name>
|
||||
<object-name>throttle_1</object-name>
|
||||
<object-name>throttle_1_label</object-name>
|
||||
<object-name>dummy_1</object-name>
|
||||
<object-name>dummy_2</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -1704,5 +1704,17 @@
|
|||
<blue>0.08</blue>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>radio_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -1704,5 +1704,17 @@
|
|||
<blue>0.08</blue>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>Panel lighting</name>
|
||||
<type>material</type>
|
||||
<object-name>radio_body</object-name>
|
||||
<emission>
|
||||
<red>0.3</red>
|
||||
<green>0.3</green>
|
||||
<blue>0.3</blue>
|
||||
<factor-prop>sim/model/lights/dome-light</factor-prop>
|
||||
</emission>
|
||||
</animation>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -118,7 +118,7 @@ var light = {
|
|||
power_consumption: func() {
|
||||
|
||||
if (getprop(me.control_prop) != 0 and getprop(me.elec_prop) != 0) {
|
||||
light_power_consumption = me.max_watts;
|
||||
light_power_consumption = me.max_watts * getprop(me.control_prop);
|
||||
} else {
|
||||
light_power_consumption = 0;
|
||||
}
|
||||
|
@ -265,7 +265,10 @@ var ELEC = {
|
|||
light.new(name: "left-turnoff", max_watts:21, control_prop:"/controls/lighting/leftturnoff", elec_prop:"/systems/electrical/bus/ac1"),
|
||||
light.new(name: "right-turnoff", max_watts:21, control_prop:"/controls/lighting/rightturnoff", elec_prop:"/systems/electrical/bus/ac2"),
|
||||
light.new(name: "left-wing", max_watts:24, control_prop:"/controls/lighting/wing-lights", elec_prop:"/systems/electrical/bus/ac1"),
|
||||
light.new(name: "right-wing", max_watts:24, control_prop:"/controls/lighting/wing-lights", elec_prop:"/systems/electrical/bus/ac2")];
|
||||
light.new(name: "right-wing", max_watts:24, control_prop:"/controls/lighting/wing-lights", elec_prop:"/systems/electrical/bus/ac2"),
|
||||
|
||||
light.new(name: "left-dome", max_watts:10, control_prop:"/controls/lighting/dome-norm", elec_prop:"/systems/electrical/bus/dc-ess"),
|
||||
light.new(name: "right-dome", max_watts:10, control_prop:"/controls/lighting/dome-norm", elec_prop:"/systems/electrical/bus/dc-ess")];
|
||||
},
|
||||
loop: func() {
|
||||
galley_sw = getprop("/controls/electrical/switches/galley");
|
||||
|
|
|
@ -40,6 +40,7 @@ var tail_strobe_switch = props.globals.getNode("/controls/switches/tailstrobe",
|
|||
var tail_strobe = aircraft.light.new("/sim/model/lights/tailstrobe", [0.1, 1], "/controls/lighting/strobe");
|
||||
var logo_lights = getprop("/sim/model/lights/logo-lights");
|
||||
var nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
|
||||
var dome_light = props.globals.initNode("/sim/model/lights/dome-light", 0.0, "DOUBLE");
|
||||
var wow = getprop("/gear/gear[2]/wow");
|
||||
var slats = getprop("/controls/flight/slats");
|
||||
var gear = getprop("/gear/gear[0]/position-norm");
|
||||
|
@ -49,6 +50,7 @@ var right_turnoff_light = props.globals.getNode("/controls/lighting/rightturnoff
|
|||
var settingT = getprop("/controls/lighting/taxi-light-switch");
|
||||
var settingTurnoff = getprop("/controls/lighting/turnoff-light-switch");
|
||||
var setting = getprop("/controls/lighting/nav-lights-switch");
|
||||
var domeSetting = getprop("/controls/lighting/dome-norm");
|
||||
var landl = getprop("/controls/lighting/landing-lights[1]");
|
||||
var landr = getprop("/controls/lighting/landing-lights[2]");
|
||||
|
||||
|
@ -458,6 +460,7 @@ var lightsLoop = maketimer(0.2, func {
|
|||
gear = getprop("/gear/gear[0]/position-norm");
|
||||
nose_lights = getprop("/sim/model/lights/nose-lights");
|
||||
settingT = getprop("/controls/lighting/taxi-light-switch");
|
||||
domeSetting = getprop("/controls/lighting/dome-norm");
|
||||
|
||||
# nose lights
|
||||
|
||||
|
@ -516,6 +519,14 @@ var lightsLoop = maketimer(0.2, func {
|
|||
} else {
|
||||
nav_lights.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (domeSetting == 0.5 and getprop("/systems/electrical/bus/dc-ess") > 0) {
|
||||
dome_light.setValue(0.5);
|
||||
} elsif (domeSetting == 1 and getprop("/systems/electrical/bus/dc-ess") > 0) {
|
||||
dome_light.setValue(1);
|
||||
} else {
|
||||
dome_light.setValue(0);
|
||||
}
|
||||
});
|
||||
|
||||
var lTray = func {
|
||||
|
|
Reference in a new issue