1
0
Fork 0

- add controls.wingsDown() wrapper

- carrier-bindings.xml: remove trailing spaces & add some blanks
This commit is contained in:
mfranz 2008-12-17 18:42:41 +00:00
parent acec163fc1
commit 5df46f3e5c
2 changed files with 37 additions and 18 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<PropertyList> <PropertyList>
<!-- map keys for catapult launch --> <!-- map keys for catapult launch -->
<key n="67"> <key n="67">
<name>C</name> <name>C</name>
<desc>Catapult Launch Command.</desc> <desc>Catapult Launch Command.</desc>
<binding> <binding>
@ -17,8 +17,9 @@
</binding> </binding>
</mod-up> </mod-up>
</key> </key>
<!-- map keys for launch-bar --> <!-- map keys for launch-bar -->
<key n="76"> <key n="76">
<name>L</name> <name>L</name>
<desc>Launch-bar engage.</desc> <desc>Launch-bar engage.</desc>
<binding> <binding>
@ -34,42 +35,56 @@
</binding> </binding>
</mod-up> </mod-up>
</key> </key>
<!-- map keys for arrester hook --> <!-- map keys for arrester hook -->
<key n="79"> <key n="79">
<name>O</name> <name>O</name>
<desc>Hook down.</desc> <desc>Hook down.</desc>
<binding> <binding>
<command>property-assign</command> <command>property-assign</command>
<property>controls/gear/tailhook</property> <property>controls/gear/tailhook</property>
<value type="double">1.0</value> <value type="double">1.0</value>
</binding> </binding>
</key> </key>
<key n="111">
<key n="111">
<name>o</name> <name>o</name>
<desc>Hook Up.</desc> <desc>Hook Up.</desc>
<binding> <binding>
<command>property-assign</command> <command>property-assign</command>
<property>controls/gear/tailhook</property> <property>controls/gear/tailhook</property>
<value type="double">0.0</value> <value type="double">0.0</value>
</binding> </binding>
</key> </key>
<!-- map keys for wing fold --> <!-- map keys for wing fold -->
<key n="70"> <key n="70">
<name>F</name> <name>F</name>
<desc>Wing Fold Down.</desc> <desc>Wing Fold Down.</desc>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>controls/flight/wing-fold</property> <script>controls.wingsDown(1)</script>
<value type="double">1.0</value>
</binding> </binding>
<mod-up>
<binding>
<command>nasal</command>
<script>controls.wingsDown(0)</script>
</binding>
</mod-up>
</key> </key>
<key n="102">
<key n="102">
<name>f</name> <name>f</name>
<desc>Wing Fold Up.</desc> <desc>Wing Fold Up.</desc>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>controls/flight/wing-fold</property> <script>controls.wingsDown(-1)</script>
<value type="double">0.0</value> </binding>
</binding> <mod-up>
<binding>
<command>nasal</command>
<script>controls.wingsDown(0)</script>
</binding>
</mod-up>
</key> </key>
</PropertyList> </PropertyList>

View file

@ -98,6 +98,10 @@ var wingSweep = func(step) {
setprop("/controls/flight/wing-sweep", val > 1 ? 1 : val < 0 ? 0 : val); setprop("/controls/flight/wing-sweep", val > 1 ? 1 : val < 0 ? 0 : val);
} }
var wingsDown = func(v) {
if(v) setprop("/controls/flight/wing-fold", v > 0);
}
var stepSpoilers = func(step) { var stepSpoilers = func(step) {
if(props.globals.getNode("/sim/spoilers") != nil) { if(props.globals.getNode("/sim/spoilers") != nil) {
stepProps("/controls/flight/spoilers", "/sim/spoilers", step); stepProps("/controls/flight/spoilers", "/sim/spoilers", step);