Debian Codegraph @

Aircraft/c172p/Models/Interior/Panel/Instruments/magneto-switch/magneto-switch-fg1000.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4
5 <path>magneto-switch-fg1000.ac</path>
6
7 <effect>
8 <inherits-from>Aircraft/c172p/Models/Effects/interior/lm-fg1000-magsw</inherits-from>
9 <object-name>key</object-name>
10 <object-name>start</object-name>
11 <object-name>magsw</object-name>
12 </effect>
13
14 <animation>
15 <type>material</type>
16 <object-name>key</object-name>
17 <object-name>start</object-name>
18 <object-name>magsw</object-name>
19 <condition>
20 <not>
21 <property>sim/rendering/shaders/skydome</property>
22 </not>
23 </condition>
24 <emission>
25 <red-prop>/sim/model/c172p/lighting/rgb-ra-r-factor</red-prop>
26 <green-prop>/sim/model/c172p/lighting/rgb-ra-g-factor</green-prop>
27 <blue-prop>/sim/model/c172p/lighting/rgb-ra-b-factor</blue-prop>
28 </emission>
29 </animation>
30
31 <animation>
32 <type>material</type>
33 <object-name>key</object-name>
34 <object-name>start</object-name>
35 <object-name>magsw</object-name>
36 </animation>
37
38 <!-- Magneto switch -->
39 <animation>
40 <type>knob</type>
41 <object-name>key</object-name>
42 <object-name>start</object-name>
43 <object-name>magsw</object-name>
44 <visible>true</visible>
45 <action>
46 <binding>
47 <command>property-adjust</command>
48 <property>controls/switches/magnetos</property>
49 <factor>1</factor>
50 <min>0</min>
51 <max>3</max>
52 </binding>
53 </action>
54 <increase>
55 <binding>
56 <command>nasal</command>
57 <script>c172p.click("magneto-forward")</script>
58 </binding>
59 </increase>
60 <decrease>
61 <binding>
62 <command>nasal</command>
63 <script>c172p.click("magneto-back")</script>
64 </binding>
65 </decrease>
66 <hovered>
67 <binding>
68 <command>set-tooltip</command>
69 <tooltip-id>magneto-switch</tooltip-id>
70 <label>Magnetos: %s</label>
71 <property>controls/switches/magnetos</property>
72 <mapping>nasal</mapping>
73 <script>
74 var m = arg[0];
75 if (m == 1) return 'RIGHT';
76 if (m == 2) return 'LEFT';
77 if (m == 3) return 'BOTH';
78 return 'OFF';
79 </script>
80 </binding>
81 </hovered>
82 </animation>
83
84 <!-- Starter -->
85 <animation>
86 <type>pick</type>
87 <object-name>click-S</object-name>
88 <visible>false</visible>
89 <action>
90 <name>starter</name>
91 <button>0</button>
92 <binding>
93 <command>property-assign</command>
94 <property>controls/switches/starter</property>
95 <value>1</value>
96 </binding>
97 <binding>
98 <command>property-assign</command>
99 <property>controls/switches/magnetos</property>
100 <value>3</value>
101 </binding>
102 <binding>
103 <command>nasal</command>
104 <script>c172p.click("magneto-forward")</script>
105 </binding>
106 <mod-up>
107 <binding>
108 <command>property-assign</command>
109 <property>controls/switches/starter</property>
110 <value>0</value>
111 </binding>
112 <binding>
113 <command>nasal</command>
114 <script>c172p.click("magneto-back")</script>
115 </binding>
116 </mod-up>
117 </action>
118 <hovered>
119 <binding>
120 <command>set-tooltip</command>
121 <tooltip-id>starter-switch</tooltip-id>
122 <label>Engine Starter</label>
123 </binding>
124 </hovered>
125 </animation>
126
127 <!-- Key rotation animation -->
128 <animation>
129 <type>rotate</type>
130 <object-name>key</object-name>
131 <object-name>start</object-name>
132 <expression>
133 <sum>
134 <product>
135 <!-- 1 if starter is false, 0 if starter is true -->
136 <difference>
137 <value>1</value>
138 <property>controls/switches/starter</property>
139 </difference>
140 <property>controls/switches/magnetos</property>
141 <value>30</value>
142 </product>
143 <product>
144 <property>controls/switches/starter</property>
145 <value>120</value>
146 </product>
147 </sum>
148 </expression>
149 <center>
150 <x-m>-0.357935</x-m>
151 <y-m>-0.427319</y-m>
152 <z-m>-0.225186</z-m>
153 </center>
154 <axis>
155 <x>-1</x>
156 <y>0</y>
157 <z>0</z>
158 </axis>
159 </animation>
160
161 </PropertyList>