<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <path>jetranger.ac</path>

  <!-- MP sound call -->
  <sound>
    <path>../Sounds/mp-sound.xml</path>
  </sound>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/Bell-206-JetRanger/Models/Liveries", 10);
    </load>
    <unload>
      livery_update.stop();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>tail</object-name>
    <object-name>elevatortrim</object-name>
    <object-name>vertstab</object-name>
    <object-name>leftdoor1</object-name>
    <object-name>leftdoor2</object-name>
    <object-name>rightdoor1</object-name>
    <object-name>rightdoor2</object-name>
    <object-name>caches</object-name>
    <object-name>grip</object-name>
    <object-name>skids</object-name>
    <object-name>skids2</object-name>
    <object-name>skids3</object-name>
    <object-name>skids4</object-name>
    <object-name>lhinge1H</object-name>
    <object-name>lhinge1B</object-name>
    <object-name>rhinge1H</object-name>
    <object-name>rhinge1B</object-name>
    <object-name>lhinge2H</object-name>
    <object-name>lhinge2B</object-name>
    <object-name>rhinge2H</object-name>
    <object-name>rhinge2B</object-name>
    <object-name>clapet</object-name>
    <object-name>pate</object-name>
    <object-name>antennes</object-name>

    <object-name>trous</object-name>
    <object-name>lexhaust</object-name>

    <!-- Objets transparents -->
    <object-name>windows</object-name>
    <object-name>leftwindow1</object-name>
    <object-name>leftwindow2</object-name>
    <object-name>rightwindow1</object-name>
    <object-name>rightwindow2</object-name>
    <object-name>lightred</object-name>
    <object-name>lightgreen</object-name>
    <object-name>strobe</object-name>
    <!-- HDR Mode -->
    <object-name>HDRwindows</object-name>
    <object-name>HDRleftwindow1</object-name>
    <object-name>HDRleftwindow2</object-name>
    <object-name>HDRrightwindow1</object-name>
    <object-name>HDRrightwindow2</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>tail</object-name>
    <object-name>elevatortrim</object-name>
    <object-name>vertstab</object-name>
    <object-name>leftdoor1</object-name>
    <object-name>leftdoor2</object-name>
    <object-name>rightdoor1</object-name>
    <object-name>rightdoor2</object-name>
    <object-name>caches</object-name>
    <object-name>grip</object-name>
    <object-name>skids</object-name>
    <object-name>skids2</object-name>
    <object-name>skids3</object-name>
    <object-name>skids4</object-name>
    <object-name>lhinge1H</object-name>
    <object-name>lhinge1B</object-name>
    <object-name>rhinge1H</object-name>
    <object-name>rhinge1B</object-name>
    <object-name>lhinge2H</object-name>
    <object-name>lhinge2B</object-name>
    <object-name>rhinge2H</object-name>
    <object-name>rhinge2B</object-name>
    <object-name>clapet</object-name>
    <object-name>pate</object-name>
    <object-name>antennes</object-name>
    <object-name>trous</object-name>
    <object-name>lexhaust</object-name>
    <object-name>windows</object-name>
    <object-name>leftwindow1</object-name>
    <object-name>leftwindow2</object-name>
    <object-name>rightwindow1</object-name>
    <object-name>rightwindow2</object-name>
    <object-name>lightred</object-name>
    <object-name>lightgreen</object-name>
    <object-name>strobe</object-name>
    <object-name>HDRwindows</object-name>
    <object-name>HDRleftwindow1</object-name>
    <object-name>HDRleftwindow2</object-name>
    <object-name>HDRrightwindow1</object-name>
    <object-name>HDRrightwindow2</object-name>

    <property-base>sim/model/livery</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture.png</texture>
    <specular>
      <red-prop>specular/red</red-prop>
      <green-prop>specular/green</green-prop>
      <blue-prop>specular/blue</blue-prop>
    </specular>
  </animation>

  <effect>
    <inherits-from>Aircraft/Bell-206-JetRanger/Models/Effects/Bump/bumpspec</inherits-from>
    <object-name>fuselage</object-name>
    <object-name>tail</object-name>
    <object-name>elevatortrim</object-name>
    <object-name>vertstab</object-name>
    <object-name>leftdoor1</object-name>
    <object-name>leftdoor2</object-name>
    <object-name>rightdoor1</object-name>
    <object-name>rightdoor2</object-name>
    <object-name>caches</object-name>
    <object-name>grip</object-name>
    <object-name>skids</object-name>
    <object-name>skids2</object-name>
    <object-name>skids3</object-name>
    <object-name>skids4</object-name>
    <object-name>lhinge1H</object-name>
    <object-name>lhinge1B</object-name>
    <object-name>rhinge1H</object-name>
    <object-name>rhinge1B</object-name>
    <object-name>lhinge2H</object-name>
    <object-name>lhinge2B</object-name>
    <object-name>rhinge2H</object-name>
    <object-name>rhinge2B</object-name>
    <object-name>clapet</object-name>
    <object-name>pate</object-name>
    <object-name>antennes</object-name>
  </effect>

  <!-- working for Compositor -->
  <effect>
    <inherits-from>Effects/Glass/glassrain</inherits-from>
    <object-name>windows</object-name>
    <object-name>leftwindow1</object-name>
    <object-name>leftwindow2</object-name>
    <object-name>rightwindow1</object-name>
    <object-name>rightwindow2</object-name>
  </effect>

  <effect>
    <inherits-from>Effects/Glass/glass</inherits-from>
    <object-name>HDRwindows</object-name>
    <object-name>HDRleftwindow1</object-name>
    <object-name>HDRleftwindow2</object-name>
    <object-name>HDRrightwindow1</object-name>
    <object-name>HDRrightwindow2</object-name>
  </effect>

  <!-- Sélection des vitres en fonction de HDR ou pas -->
  <animation>
    <type>select</type>
    <condition>
      <!-- <property>sim/rendering/hdr/hdr-enabled</property> -->
      <property>sim/multiplay/generic/bool[2]</property>
    </condition>
    <object-name>HDRwindows</object-name>
    <object-name>HDRleftwindow1</object-name>
    <object-name>HDRleftwindow2</object-name>
    <object-name>HDRrightwindow1</object-name>
    <object-name>HDRrightwindow2</object-name>
  </animation>

  <animation>
    <type>select</type>
    <condition>
      <!-- <not><property>sim/rendering/hdr/hdr-enabled</property></not> -->
      <not><property>sim/multiplay/generic/bool[2]</property></not>
    </condition>
    <object-name>windows</object-name>
    <object-name>leftwindow1</object-name>
    <object-name>leftwindow2</object-name>
    <object-name>rightwindow1</object-name>
    <object-name>rightwindow2</object-name>
  </animation>

  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <object-name>lightred</object-name>
    <object-name>lightgreen</object-name>
    <object-name>strobe</object-name>
  </effect>

  <model>
    <path>Interior/interior.xml</path>
  </model>

  <model>
    <path>Externals/MainRotor/all-mainrotor.xml</path>
  </model>

  <model>
    <path>Externals/TailRotor/all-tailrotor.xml</path>
  </model>

  <model>
    <path>Effects/cranking/all-crankings.xml</path>
  </model>

  <model>
    <path>Effects/particles/all-particles.xml</path>
  </model>

  <model>
    <path>lights/all-lights.xml</path>
  </model>

  <!--Door -->
  <animation>
    <type>pick</type>
    <object-name>leftdoor1</object-name>
    <object-name>leftwindow1</object-name>
    <object-name>HDRleftwindow1</object-name>
    <object-name>lhinge1H</object-name>
    <object-name>lhinge1B</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <condition>
          <and>
            <or>
              <property>gear/gear[0]/wow</property>
              <property>gear/gear[1]/wow</property>
              <property>gear/gear[2]/wow</property>
              <property>gear/gear[3]/wow</property>
            </or>
            <less-than>
              <property>gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.crewG.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>leftdoor1</object-name>
    <object-name>leftwindow1</object-name>
    <object-name>HDRleftwindow1</object-name>
    <object-name>lhinge1H</object-name>
    <object-name>lhinge1B</object-name>
    <!-- <property>sim/model/door-positions/crewG/position-norm</property> -->
    <property>sim/multiplay/generic/float[30]</property>
    <factor> -80 </factor>
    <axis>
      <x1-m> -2.482 </x1-m>
      <y1-m> -0.698 </y1-m>
      <z1-m> -0.697 </z1-m>
      <x2-m> -2.150 </x2-m>
      <y2-m> -0.678 </y2-m>
      <z2-m> -0.062 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>rightdoor1</object-name>
    <object-name>rightwindow1</object-name>
    <object-name>HDRrightwindow1</object-name>
    <object-name>rhinge1H</object-name>
    <object-name>rhinge1B</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <condition>
          <and>
            <or>
              <property>gear/gear[0]/wow</property>
              <property>gear/gear[1]/wow</property>
              <property>gear/gear[2]/wow</property>
              <property>gear/gear[3]/wow</property>
            </or>
            <less-than>
              <property>gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.crewD.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>rightdoor1</object-name>
    <object-name>rightwindow1</object-name>
    <object-name>HDRrightwindow1</object-name>
    <object-name>rhinge1H</object-name>
    <object-name>rhinge1B</object-name>
    <!-- <property>sim/model/door-positions/crewD/position-norm</property> -->
    <property>sim/multiplay/generic/float[31]</property>
    <factor> 80 </factor>
    <axis>
      <x1-m> -2.482 </x1-m>
      <y1-m>  0.698 </y1-m>
      <z1-m> -0.697 </z1-m>
      <x2-m> -2.150 </x2-m>
      <y2-m>  0.678 </y2-m>
      <z2-m> -0.062 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>leftdoor2</object-name>
    <object-name>leftwindow2</object-name>
    <object-name>HDRleftwindow2</object-name>
    <object-name>lhinge2H</object-name>
    <object-name>lhinge2B</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <condition>
          <and>
            <or>
              <property>gear/gear[0]/wow</property>
              <property>gear/gear[1]/wow</property>
              <property>gear/gear[2]/wow</property>
              <property>gear/gear[3]/wow</property>
            </or>
            <less-than>
              <property>gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.rearG.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>leftdoor2</object-name>
    <object-name>leftwindow2</object-name>
    <object-name>HDRleftwindow2</object-name>
    <object-name>lhinge2H</object-name>
    <object-name>lhinge2B</object-name>
    <!-- <property>sim/model/door-positions/rearG/position-norm</property> -->
    <property>sim/multiplay/generic/float[32]</property>
    <factor> -80 </factor>
    <axis>
      <x1-m> -1.665 </x1-m>
      <y1-m> -0.700 </y1-m>
      <z1-m> -0.768 </z1-m>
      <x2-m> -1.535 </x2-m>
      <y2-m> -0.693 </y2-m>
      <z2-m> -0.136 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>rightdoor2</object-name>
    <object-name>rightwindow2</object-name>
    <object-name>HDRrightwindow2</object-name>
    <object-name>rhinge2H</object-name>
    <object-name>rhinge2B</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <condition>
          <and>
            <or>
              <property>gear/gear[0]/wow</property>
              <property>gear/gear[1]/wow</property>
              <property>gear/gear[2]/wow</property>
              <property>gear/gear[3]/wow</property>
            </or>
            <less-than>
              <property>gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.rearD.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>rightdoor2</object-name>
    <object-name>rightwindow2</object-name>
    <object-name>HDRrightwindow2</object-name>
    <object-name>rhinge2H</object-name>
    <object-name>rhinge2B</object-name>
    <!-- <property>sim/model/door-positions/rearD/position-norm</property> -->
    <property>sim/multiplay/generic/float[33]</property>
    <factor> 80 </factor>
    <axis>
      <x1-m> -1.665 </x1-m>
      <y1-m>  0.700 </y1-m>
      <z1-m> -0.768 </z1-m>
      <x2-m> -1.535 </x2-m>
      <y2-m>  0.693 </y2-m>
      <z2-m> -0.136 </z2-m>
    </axis>
  </animation>

</PropertyList>
