Fuel selector for c172p.
This commit is contained in:
parent
13af11ae1f
commit
2c178fe750
3 changed files with 6040 additions and 4157 deletions
File diff suppressed because it is too large
Load diff
|
@ -1728,6 +1728,141 @@
|
|||
</center>
|
||||
</animation>
|
||||
|
||||
<!-- Fuel Selector -->
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>FuelSelectorOff</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<not>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
</not>
|
||||
<not>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>FuelSelectorLeft</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
<not>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>FuelSelectorRight</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<not>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
</not>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>FuelSelectorBoth</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>FuelHotspotOff</object-name>
|
||||
<visible>true</visible>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
<value>false</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
<value>false</value>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>FuelHotspotLeft</object-name>
|
||||
<visible>true</visible>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
<value>true</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
<value>false</value>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>FuelHotspotRight</object-name>
|
||||
<visible>true</visible>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
<value>false</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
<value>true</value>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>FuelHotspotBoth</object-name>
|
||||
<visible>true</visible>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[0]/selected</property>
|
||||
<value>true</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>consumables/fuel/tank[1]/selected</property>
|
||||
<value>true</value>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<!-- Switches -->
|
||||
|
||||
<animation>
|
||||
<type>rotate</type>
|
||||
|
|
|
@ -123,5 +123,15 @@ var scissor_angle = func(H,C,L,phi) {
|
|||
#
|
||||
setlistener("sim/signals/fdm-initialized", init_actions);
|
||||
|
||||
#
|
||||
# Listeners to tie the /consumables/fuels/tank[]/selected to
|
||||
# /fdm/jsbsim/propulsion/tank[]/priority
|
||||
|
||||
setlistener("consumables/fuel/tank[0]/selected", func(selected) {
|
||||
setprop("/fdm/jsbsim/propulsion/tank[0]/priority", selected.getBoolValue() ? 1 : 0);
|
||||
});
|
||||
|
||||
setlistener("consumables/fuel/tank[1]/selected", func(selected) {
|
||||
setprop("/fdm/jsbsim/propulsion/tank[1]/priority", selected.getBoolValue() ? 1 : 0);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue