<?xml version="1.0"?>

<PropertyList>
	
	<path>mags.ac</path>
	
	<animation>
		<type>material</type>
		<object-name>key</object-name>
		<object-name>mags</object-name>
		<object-name>mags.moving</object-name>
		<emission>
			<red>0.075</red>
			<green>0.015</green>
			<blue>0.00001</blue>
			<factor-prop>/sim/model/material/instruments/factor</factor-prop>
		</emission>
	</animation>
	
	<animation>
		<type>knob</type>
		<object-name>key</object-name>
		<property>/controls/engines/engine/magnetos</property>
		<factor>30</factor>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<action>
			<binding>
				<command>property-adjust</command>
				<property>/controls/engines/engine/magnetos</property>
				<min>0</min>
				<max>3</max>
				<factor>1</factor>
			</binding>
		</action>
		<hovered>
			<binding>
				<command>set-tooltip</command>
				<tooltip-id>magneto-switch</tooltip-id>
				<label>Magnetos: %s</label>
				<property>controls/engines/engine/magnetos</property>
				<mapping>nasal</mapping>
				<script>
					var m = getprop('controls/engines/engine/magnetos');
					if (m == 1) return 'RIGHT';
					if (m == 2) return 'LEFT';
					if (m == 3) return 'BOTH';
					return 'OFF';
				</script>
			</binding>
		</hovered>		
	</animation>
	<animation>
		<type>pick</type>
		<object-name>click.start</object-name>
		<visible>0</visible>
		<action>
			<button>0</button>
			<binding>
				<condition>
					<equals>
						<property>controls/engines/engine/magnetos</property>
						<value>3</value>
					</equals>
				</condition>
				<command>property-assign</command>
				<property>controls/switches/starter</property>
				<value>1</value>
			</binding>
			<mod-up>
				<binding>
					<condition>
						<equals>
							<property>controls/engines/engine/magnetos</property>
							<value>3</value>
						</equals>
					</condition>
					<command>property-assign</command>
					<property>controls/switches/starter</property>
					<value>0</value>
				</binding>
			</mod-up>
		</action>
	</animation>
	<!--   key animations  -->   
	<animation>
		<type>rotate</type>
		<object-name>mags.moving</object-name>
		<property>controls/engines/engine/magnetos</property>
		<factor>30</factor>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>         
	<animation>
		<type>rotate</type>
		<condition>
			<equals>
				<property>controls/engines/engine/magnetos</property>
				<value>3</value>
			</equals>
		</condition>
		<object-name>mags.moving</object-name>
		<object-name>key</object-name>
		<property>controls/switches/starter</property>
		<factor>30</factor>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>       
	
</PropertyList>


