Debian Codegraph @

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

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