This commit is contained in:
commit
2b8cacbc96
13 changed files with 166 additions and 37 deletions
|
@ -722,6 +722,7 @@
|
|||
<file>Aircraft/A320Family/Nasal/gpws.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/efis.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/ECAM.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/shake.nas</file>
|
||||
</libraries>
|
||||
<acconfig>
|
||||
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
|
||||
|
|
|
@ -4,6 +4,32 @@
|
|||
|
||||
<path>res/fd_complete.ac</path>
|
||||
|
||||
<animation>
|
||||
<type>translate</type>
|
||||
<property>/systems/shake/shaking</property>
|
||||
<axis>
|
||||
<x1-m> 0</x1-m>
|
||||
<y1-m> 0</y1-m>
|
||||
<z1-m> 0</z1-m>
|
||||
<x2-m> 0.5</x2-m>
|
||||
<y2-m>-0.5</y2-m>
|
||||
<z2-m> 0.8</z2-m>
|
||||
</axis>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>translate</type>
|
||||
<property>/systems/shake/shaking</property>
|
||||
<axis>
|
||||
<x1-m> 0</x1-m>
|
||||
<y1-m> 0</y1-m>
|
||||
<z1-m> 0</z1-m>
|
||||
<x2-m> 0.5</x2-m>
|
||||
<y2-m>-0.5</y2-m>
|
||||
<z2-m> 0.8</z2-m>
|
||||
</axis>
|
||||
</animation>
|
||||
|
||||
<!-- Overhead Panel -->
|
||||
|
||||
<model>
|
||||
|
|
|
@ -2233,7 +2233,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>controls/lighting/strobe</property>
|
||||
</binding>
|
||||
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2268,7 +2271,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>controls/lighting/beacon</property>
|
||||
</binding>
|
||||
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2303,7 +2309,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>controls/lighting/wing-lights</property>
|
||||
</binding>
|
||||
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2341,7 +2350,10 @@
|
|||
<value>1</value>
|
||||
<value>2</value>
|
||||
</binding>
|
||||
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2378,6 +2390,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>controls/lighting/landing-lights[2]</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2413,7 +2429,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>controls/lighting/landing-lights[1]</property>
|
||||
</binding>
|
||||
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2615,6 +2634,10 @@
|
|||
<value>0.5</value>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/knb1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2653,6 +2676,10 @@
|
|||
<value>0</value>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2689,6 +2716,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>controls/switches/seatbelt-sign</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -2723,6 +2754,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>controls/switches/no-smoking-sign</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
|
|
@ -88,6 +88,15 @@ setlistener("/sim/sounde/knb1", func {
|
|||
}, 0.05);
|
||||
});
|
||||
|
||||
setlistener("/sim/sounde/switch1", func {
|
||||
if (!getprop("/sim/sounde/switch1")) {
|
||||
return;
|
||||
}
|
||||
settimer(func {
|
||||
props.globals.getNode("/sim/sounde/switch1").setBoolValue(0);
|
||||
}, 0.05);
|
||||
});
|
||||
|
||||
setlistener("/controls/switches/seatbelt-sign", func {
|
||||
props.globals.getNode("/sim/sounde/seatbelt-sign").setBoolValue(1);
|
||||
settimer(func {
|
||||
|
@ -154,7 +163,7 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
systems.hyd_init();
|
||||
systems.press_init();
|
||||
fmgc.APinit();
|
||||
externalconnections.start();
|
||||
librariesLoop.start();
|
||||
fmgc.FMGCinit();
|
||||
mcdu1.MCDU_init();
|
||||
mcdu2.MCDU_init();
|
||||
|
@ -165,6 +174,26 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
libraries.variousReset();
|
||||
});
|
||||
|
||||
var librariesLoop = maketimer(0.1, func {
|
||||
var groundpwr = getprop("/controls/switches/cart");
|
||||
var groundair = getprop("/controls/pneumatic/switches/groundair");
|
||||
var gs = getprop("/velocities/groundspeed-kt");
|
||||
var parkbrake = getprop("controls/gear/brake-parking");
|
||||
|
||||
if ((groundair or groundpwr) and ((gs > 2) or !parkbrake)) {
|
||||
setprop("/controls/switches/cart", 0);
|
||||
setprop("/controls/pneumatic/switches/groundair", 0);
|
||||
}
|
||||
|
||||
var V = getprop("/velocities/groundspeed-kt");
|
||||
|
||||
if (V > 15) {
|
||||
setprop("/systems/shake/effect", 1);
|
||||
} else {
|
||||
setprop("/systems/shake/effect", 0);
|
||||
}
|
||||
});
|
||||
|
||||
var variousReset = func {
|
||||
setprop("/modes/cpt-du-xfr", 0);
|
||||
setprop("/modes/fo-du-xfr", 0);
|
||||
|
@ -182,17 +211,6 @@ var aglgears = func {
|
|||
|
||||
aglgears();
|
||||
|
||||
var externalconnections = maketimer(0.1, func {
|
||||
var groundpwr = getprop("/controls/switches/cart");
|
||||
var groundair = getprop("/controls/pneumatic/switches/groundair");
|
||||
var gs = getprop("/velocities/groundspeed-kt");
|
||||
var parkbrake = getprop("controls/gear/brake-parking");
|
||||
if ((groundair or groundpwr) and ((gs > 2) or !parkbrake)) {
|
||||
setprop("/controls/switches/cart", 0);
|
||||
setprop("/controls/pneumatic/switches/groundair", 0);
|
||||
}
|
||||
});
|
||||
|
||||
var mcpSPDKnbPull = func {
|
||||
setprop("/it-autoflight/input/spd-managed", 0);
|
||||
fmgc.ManagedSPD.stop();
|
||||
|
|
37
Nasal/shake.nas
Normal file
37
Nasal/shake.nas
Normal file
|
@ -0,0 +1,37 @@
|
|||
# A3XX Shaking
|
||||
|
||||
var shakeEffectA3XX = props.globals.initNode("/systems/shake/effect",0,"BOOL");
|
||||
var shakeA3XX = props.globals.initNode("/systems/shake/shaking",0,"DOUBLE");
|
||||
var rSpeed = 0;
|
||||
var sf = 0;
|
||||
var n_g_c = 0;
|
||||
var n_g_l = 0;
|
||||
var n_g_r = 0;
|
||||
|
||||
var theShakeEffect = func{
|
||||
n_g_c = getprop("/gear/gear[0]/compression-norm") or 0;
|
||||
n_g_l = getprop("/gear/gear[1]/compression-norm") or 0;
|
||||
n_g_r = getprop("/gear/gear[2]/compression-norm") or 0;
|
||||
rSpeed = getprop("/gear/gear[0]/rollspeed-ms") or 0;
|
||||
sf = rSpeed / 94000;
|
||||
|
||||
if (shakeEffectA3XX.getBoolValue() and (n_g_c > 0 or n_g_l > 0 or n_g_r > 0)) {
|
||||
interpolate("/systems/shake/shaking", sf, 0.03);
|
||||
settimer(func {
|
||||
interpolate("/systems/shake/shaking", -sf * 2, 0.03);
|
||||
}, 0.06);
|
||||
settimer(func {
|
||||
interpolate("/systems/shake/shaking", sf, 0.03);
|
||||
}, 0.12);
|
||||
settimer(theShakeEffect, 0.09);
|
||||
} else {
|
||||
setprop("/systems/shake/shaking", 0);
|
||||
setprop("/systems/shake/effect",0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/systems/shake/effect", func(state){
|
||||
if(state.getBoolValue()){
|
||||
theShakeEffect();
|
||||
}
|
||||
}, 1, 0);
|
|
@ -394,7 +394,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendaa</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state1</property>
|
||||
|
@ -409,7 +409,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendba</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state2</property>
|
||||
|
@ -424,7 +424,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendab</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state1</property>
|
||||
|
@ -439,7 +439,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendbb</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state2</property>
|
||||
|
@ -454,7 +454,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendac</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state1</property>
|
||||
|
@ -469,7 +469,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendbc</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state2</property>
|
||||
|
@ -484,7 +484,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendad</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state1</property>
|
||||
|
@ -499,7 +499,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendbd</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state2</property>
|
||||
|
@ -514,7 +514,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendae</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state1</property>
|
||||
|
@ -529,7 +529,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendbe</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state2</property>
|
||||
|
@ -544,7 +544,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendaf</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state1</property>
|
||||
|
@ -559,7 +559,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendbf</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/systems/thrust/state2</property>
|
||||
|
@ -574,7 +574,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendag</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[0]/reverser</property>
|
||||
|
@ -589,7 +589,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendbg</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[1]/reverser</property>
|
||||
|
@ -604,7 +604,7 @@
|
|||
<detenta>
|
||||
<mode>once</mode>
|
||||
<name>detendah</name>
|
||||
<path>detenta.wav</path>
|
||||
<path>Cockpit/detenta.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[0]/reverser</property>
|
||||
|
@ -619,7 +619,7 @@
|
|||
<detentb>
|
||||
<mode>once</mode>
|
||||
<name>detendbh</name>
|
||||
<path>detentb.wav</path>
|
||||
<path>Cockpit/detentb.wav</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/engines/engine[1]/reverser</property>
|
||||
|
@ -667,9 +667,9 @@
|
|||
</ns>
|
||||
|
||||
<switch>
|
||||
<name>Overhead Button</name>
|
||||
<name>Button</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320Family/Sounds/oh-button.wav</path>
|
||||
<path>Aircraft/A320Family/Sounds/Cockpit/button.wav</path>
|
||||
<condition>
|
||||
<property>/sim/sounde/btn1</property>
|
||||
</condition>
|
||||
|
@ -679,9 +679,9 @@
|
|||
</switch>
|
||||
|
||||
<switch>
|
||||
<name>Overhead Knob</name>
|
||||
<name>Knob</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320Family/Sounds/oh-knob.wav</path>
|
||||
<path>Aircraft/A320Family/Sounds/Cockpit/knob.wav</path>
|
||||
<condition>
|
||||
<property>/sim/sounde/knb1</property>
|
||||
</condition>
|
||||
|
@ -690,5 +690,17 @@
|
|||
</volume>
|
||||
</switch>
|
||||
|
||||
<switch>
|
||||
<name>Switch</name>
|
||||
<mode>once</mode>
|
||||
<path>Aircraft/A320Family/Sounds/Cockpit/switch.wav</path>
|
||||
<condition>
|
||||
<property>/sim/sounde/switch1</property>
|
||||
</condition>
|
||||
<volume>
|
||||
<factor>0.60</factor>
|
||||
</volume>
|
||||
</switch>
|
||||
|
||||
</fx>
|
||||
</PropertyList>
|
BIN
Sounds/Cockpit/switch.wav
Normal file
BIN
Sounds/Cockpit/switch.wav
Normal file
Binary file not shown.
Reference in a new issue