<?xml version="1.0"?>
<!--
    This file is part of do228

    The do228 is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    The do228 is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with do228.  If not, see <http://www.gnu.org/licenses/>.

    Dornier DO228 simulation by Benedikt Wolf (D-ECHO)
    Started 06/2020
-->

<PropertyList>

	<path>lg.ac</path>
	
	<!--	EFFECTS	-->
	<effect>
		<inherits-from>Effects/model-transparent</inherits-from>
		<object-name>lg.lit</object-name>
		<object-name>light.nose</object-name>
		<object-name>light.left</object-name>
		<object-name>light.right</object-name>
	</effect>
	
	<!--	ANIMATIONS	-->
	<!--	Lighting	-->
	<animation>
		<type>material</type>
		<object-name>lg.lit</object-name>
		<emission>
			<red>1</red>
			<green>1</green>
			<blue>1</blue>
			<factor-prop>systems/electrical/lights/panel-lights[1]</factor-prop>
		</emission>
	</animation>
	
	<!--	Position Lights	-->
	<animation>
		<type>select</type>
		<object-name>light.nose</object-name>
		<condition>
			<equals>
				<property>gear/gear[0]/position-norm</property>
				<value>1.0</value>
			</equals>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>light.left</object-name>
		<condition>
			<equals>
				<property>gear/gear[1]/position-norm</property>
				<value>1.0</value>
			</equals>
		</condition>
	</animation>
	<animation>
		<type>select</type>
		<object-name>light.right</object-name>
		<condition>
			<equals>
				<property>gear/gear[2]/position-norm</property>
				<value>1.0</value>
			</equals>
		</condition>
	</animation>
	
	<!--	Gear Lever	-->
	<animation>
		<type>pick</type>
		<object-name>gear.lever.1</object-name>
		<object-name>gear.lever.2</object-name>
		<action>
			<button>0</button>
			<binding>
				<command>property-toggle</command>
				<property>controls/gear/gear-down</property>
			</binding>
		</action>
	</animation>
	<animation>
		<type>rotate</type>
		<object-name>gear.lever.1</object-name>
		<object-name>gear.lever.2</object-name>
		<property>controls/gear/gear-down</property>
		<offset-deg>-50</offset-deg>
		<factor>50</factor>
		<center>
			<x-m>-0.00826</x-m>
			<z-m> 0.009384</z-m>
		</center>
		<axis>
			<y>1</y>
		</axis>
	</animation>
	<animation>
		<type>textranslate</type>
		<object-name>gear.lever.1</object-name>
		<property>gear/lever-light/state</property>
		<factor>0.1981</factor>
		<axis>
			<x>1</x>
		</axis>
	</animation>
	<animation>
		<type>material</type>
		<object-name>gear.lever.1</object-name>
		<emission>
			<red>1</red>
			<green>0.1</green>
			<blue>0.1</blue>
			<factor-prop>gear/lever-light/state</factor-prop>
		</emission>
	</animation>
    
</PropertyList>
