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

<PropertyList>

  <path>alouette.ac</path>

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

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

  <animation>
    <object-name>fuselage</object-name>
    <object-name>tourvitre</object-name>
    <object-name>structure</object-name>
    <object-name>reservoir</object-name>
    <object-name>ailerons</object-name>
    <object-name>cache</object-name>
    <object-name>porteG</object-name>
    <object-name>porteD</object-name>
    <object-name>supports</object-name>
    <!-- Mode Patins -->
    <object-name>patins</object-name>

    <object-name>roueG</object-name>
    <object-name>roueD</object-name>

    <!-- Mode Flotteurs -->
    <object-name>flotteurs</object-name>
    <object-name>barres</object-name>

    <!-- -->
    <object-name>moteur</object-name>

    <!-- Transparence -->
    <object-name>verriere</object-name>
    <object-name>vitreporteG</object-name>
    <object-name>vitreporteD</object-name>
    <object-name>lampeG</object-name>
    <object-name>lampeR</object-name>
    <!-- HDR mode -->
    <object-name>HDRverriere</object-name>
    <object-name>HDRvitreporteG</object-name>
    <object-name>HDRvitreporteD</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>tourvitre</object-name>
    <object-name>structure</object-name>
    <object-name>reservoir</object-name>
    <object-name>ailerons</object-name>
    <object-name>cache</object-name>
    <object-name>porteG</object-name>
    <object-name>porteD</object-name>
    <object-name>supports</object-name>
    <object-name>patins</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>flotteurs</object-name>
    <object-name>barres</object-name>
    <object-name>moteur</object-name>
    <object-name>verriere</object-name>
    <object-name>vitreporteG</object-name>
    <object-name>vitreporteD</object-name>
    <object-name>lampeG</object-name>
    <object-name>lampeR</object-name>
    <object-name>HDRverriere</object-name>
    <object-name>HDRvitreporteG</object-name>
    <object-name>HDRvitreporteD</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/Alouette-II/Models/Effects/Bump/bumpspec</inherits-from>
    <object-name>fuselage</object-name>
    <object-name>tourvitre</object-name>
    <object-name>structure</object-name>
    <object-name>reservoir</object-name>
    <object-name>ailerons</object-name>
    <object-name>cache</object-name>
    <object-name>porteG</object-name>
    <object-name>porteD</object-name>
    <object-name>supports</object-name>
    <object-name>patins</object-name>
    <object-name>flotteurs</object-name>
    <object-name>barres</object-name>
  </effect>

  <!-- working for Compositor -->
  <effect>
    <inherits-from>Effects/Glass/glassrain</inherits-from>
    <object-name>verriere</object-name>
    <object-name>vitreporteG</object-name>
    <object-name>vitreporteD</object-name>
  </effect>

  <effect>
    <inherits-from>Effects/Glass/glass</inherits-from>
    <object-name>HDRverriere</object-name>
    <object-name>HDRvitreporteG</object-name>
    <object-name>HDRvitreporteD</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>HDRverriere</object-name>
    <object-name>HDRvitreporteG</object-name>
    <object-name>HDRvitreporteD</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>verriere</object-name>
    <object-name>vitreporteG</object-name>
    <object-name>vitreporteD</object-name>
  </animation>

  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <object-name>lampeG</object-name>
    <object-name>lampeR</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>

  <!-- Mode Patins -->
  <animation>
    <type>select</type>
    <condition>
      <equals>
        <!-- <property>sim/model/mode</property> -->
        <property>sim/multiplay/generic/string[0]</property>
        <value>SKID</value>
      </equals>
    </condition>
    <object-name>patins</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
  </animation>

  <!-- Mode Flotteurs -->
  <animation>
    <type>select</type>
    <condition>
      <equals>
        <!-- <property>sim/model/mode</property> -->
        <property>sim/multiplay/generic/string[0]</property>
        <value>FLOAT</value>
      </equals>
    </condition>
    <object-name>flotteurs</object-name>
    <object-name>barres</object-name>
  </animation>

  <!-- Porte passager -->
  <animation>
    <type>pick</type>
    <object-name>porteG</object-name>
    <object-name>vitreporteG</object-name>
    <object-name>HDRvitreporteG</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>
              <property>gear/gear[5]/wow</property>
              <property>gear/gear[6]/wow</property>
              <property>gear/gear[7]/wow</property>
              <property>gear/gear[8]/wow</property>
            </or>
            <less-than>
              <property>gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.crew.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>porteG</object-name>
    <object-name>vitreporteG</object-name>
    <object-name>HDRvitreporteG</object-name>
    <!-- <property>sim/model/door-positions/crew/position-norm</property> -->
    <property>sim/multiplay/generic/float[10]</property>
    <factor> -175 </factor>
    <center>
      <x-m> -4.215 </x-m>
      <y-m> -0.819 </y-m>
      <z-m> -0.438 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Porte pilote -->
  <animation>
    <type>pick</type>
    <object-name>porteD</object-name>
    <object-name>vitreporteD</object-name>
    <object-name>HDRvitreporteD</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>
              <property>gear/gear[5]/wow</property>
              <property>gear/gear[6]/wow</property>
              <property>gear/gear[7]/wow</property>
              <property>gear/gear[8]/wow</property>
            </or>
            <less-than>
              <property>gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.passenger.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>porteD</object-name>
    <object-name>vitreporteD</object-name>
    <object-name>HDRvitreporteD</object-name>
    <!-- <property>sim/model/door-positions/passenger/position-norm</property> -->
    <property>sim/multiplay/generic/float[11]</property>
    <factor> 175 </factor>
    <center>
      <x-m> -4.215 </x-m>
      <y-m>  0.819 </y-m>
      <z-m> -0.438 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

</PropertyList>
