f30e034e55
A big step at bringing the default aircraft into the state it actually deserves. Features: - new, accurate exterior modell, modelled with original 3-views by Cessna - textures with shadow shading - livery changing sytem over mp - immatriculation over mp - glass shader with fresnel effect - nearly complete 3d-panel Known Bugs: - Radio_Stack shines through the fuselage. New 3d radio_stack has yet to be done. To-Do: - Suction-Instrument - Interior with much more details and painting - Radio_stack - doors openable - lights - fully animation of the gear - failure system by Erobo
28 lines
1 KiB
Text
28 lines
1 KiB
Text
#### King KY-196 Comm Transciever ####
|
|
#### Syd Adams ####
|
|
####
|
|
####Must be included in the Set file to run the KY-196 radio
|
|
####
|
|
|
|
KY196 = props.globals.getNode("/instrumentation/ky-196",1);
|
|
FDM_ON = 0;
|
|
|
|
setlistener("/sim/signals/fdm-initialized", func {
|
|
KY196.getNode("comm-num",1).setIntValue(0);
|
|
KY196.getNode("volume-adjust",1).setDoubleValue(0);
|
|
FDM_ON = 1;
|
|
print("KY-196 Comm System ... OK");
|
|
});
|
|
|
|
setlistener("/instrumentation/ky-196/volume-adjust", func {
|
|
if(FDM_ON == 0){return;}
|
|
var setting = cmdarg().getValue();
|
|
cmdarg().setDoubleValue(0);
|
|
comm_num = KY196.getNode("comm-num").getValue();
|
|
var commNode = props.globals.getNode("instrumentation/comm[" ~ comm_num ~"]");
|
|
var vol = commNode.getNode("volume").getValue() + setting;
|
|
if(vol > 1.0){vol = 1.0;}
|
|
if(vol < 0.0){vol = 0.0;commNode.getNode("serviceable").setBoolValue(0);}
|
|
if(vol > 0.0){commNode.getNode("serviceable").setBoolValue(1);}
|
|
commNode.getNode("volume").setDoubleValue(vol);
|
|
});
|