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

<PropertyList>

  <path>p26.ac</path>

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

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Liveries", 10);

      var self = cmdarg();

      var float_0 = self.getNode("sim/multiplay/generic/float[0]", 1);
      var float_1 = self.getNode("sim/multiplay/generic/float[1]", 1);

      var crew_door      = self.getNode("sim/model/door-positions/crew/position-norm", 1);
      var passenger_door = self.getNode("sim/model/door-positions/passenger/position-norm", 1);

      crew_door       .alias(self.getNode ("sim/multiplay/generic/float[0]"));
      passenger_door  .alias(self.getNode ("sim/multiplay/generic/float[1]"));
    </load>
    <unload>
      livery_update.stop();
      crew_door.unalias();
      passenger_door.unalias();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>capot</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>ailes2</object-name>
    <object-name>direction</object-name>
    <object-name>profondeurG</object-name>
    <object-name>profondeurD</object-name>
    <object-name>cacheroues</object-name>
    <object-name>cachemoteur</object-name>
    <object-name>bol</object-name>

    <object-name>trous</object-name>
    <object-name>viseur</object-name>
    <object-name>guns</object-name>
    <object-name>tour</object-name>
    <object-name>tourvitres</object-name>
    <object-name>helice</object-name>
    <object-name>echappes</object-name>
    <object-name>cables</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>roueA</object-name>

    <!-- Objets transparents -->
    <object-name>vitres</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>capot</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>ailes2</object-name>
    <object-name>direction</object-name>
    <object-name>profondeurG</object-name>
    <object-name>profondeurD</object-name>
    <object-name>cacheroues</object-name>
    <object-name>cachemoteur</object-name>
    <object-name>bol</object-name>

    <object-name>trous</object-name>
    <object-name>viseur</object-name>
    <object-name>guns</object-name>
    <object-name>tour</object-name>
    <object-name>tourvitres</object-name>
    <object-name>helice</object-name>
    <object-name>echappes</object-name>
    <object-name>cables</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>roueA</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>Effects/Bump/bumpspec</inherits-from>
    <object-name>fuselage</object-name>
    <object-name>capot</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>ailes2</object-name>
    <object-name>direction</object-name>
    <object-name>profondeurG</object-name>
    <object-name>profondeurD</object-name>
    <object-name>cacheroues</object-name>
    <object-name>cachemoteur</object-name>
    <object-name>bol</object-name>
  </effect>

  <!-- working for Rembrandt -->
  <effect>
    <inherits-from>Effects/Glass/glassrain</inherits-from>
    <object-name>vitres</object-name>
  </effect>

  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
  </effect>

  <!-- Engine -->
  <model>
    <path>engines/engine.xml</path>
    <offsets>
      <x-m> -3.07449 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.00000 </z-m>
    </offsets>
  </model>

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

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

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

  <model>
    <path>Effects/Weapons/guns/all-fire.xml</path>
  </model>

  <!-- L'hélice -->
  <animation>
    <name>HeliceComplete</name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
    <object-name>helice</object-name>
    <object-name>bol</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdisc</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblur</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>600.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>helice</object-name>
    <condition>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceComplete</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value> 5 </value>
      </greater-than>
    </condition>
    <property>engines/engine[0]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -3.44903 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.00495 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Gouverne de direction -->
  <animation>
    <type>rotate</type>
    <object-name>direction</object-name>
    <property>controls/flight/rudder</property>
    <factor> 15 </factor>
    <center>
      <x-m> 3.07455 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.41191 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Gouverne de profondeur -->
  <animation>
    <type>rotate</type>
    <object-name>profondeurG</object-name>
    <property>controls/flight/elevator</property>
    <factor> 15 </factor>
    <axis>
      <x1-m>  2.63968 </x1-m>
      <y1-m> -1.16917 </y1-m>
      <z1-m>  0.10231 </z1-m>
      <x2-m>  2.64118 </x2-m>
      <y2-m> -0.12285 </y2-m>
      <z2-m>  0.12920 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>profondeurD</object-name>
    <property>controls/flight/elevator</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> 2.64118 </x1-m>
      <y1-m> 0.12285 </y1-m>
      <z1-m> 0.12920 </z1-m>
      <x2-m> 2.63968 </x2-m>
      <y2-m> 1.16917 </y2-m>
      <z2-m> 0.10231 </z2-m>
    </axis>
  </animation>

  <!-- ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <property>surface-positions/left-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> -1.07452 </x1-m>
      <y1-m> -3.70734 </y1-m>
      <z1-m> -0.09977 </z1-m>
      <x2-m> -0.73727 </x2-m>
      <y2-m> -1.57314 </y2-m>
      <z2-m> -0.23628 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <property>surface-positions/right-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> -0.73727 </x1-m>
      <y1-m>  1.57314 </y1-m>
      <z1-m> -0.23628 </z1-m>
      <x2-m> -1.07452 </x2-m>
      <y2-m>  3.70734 </y2-m>
      <z2-m> -0.09977 </z2-m>
    </axis>
  </animation>

  <!-- Volets -->
  <animation>
    <type>rotate</type>
    <object-name>voletG</object-name>
    <property>surface-positions/flap-pos-norm</property>
    <factor> 50 </factor>
    <axis>
      <x1-m> -1.09524 </x1-m>
      <y1-m> -2.14547 </y1-m>
      <z1-m> -0.26640 </z1-m>
      <x2-m> -1.09524 </x2-m>
      <y2-m> -0.82861 </y2-m>
      <z2-m> -0.34725 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>voletD</object-name>
    <property>surface-positions/flap-pos-norm</property>
    <factor> 50 </factor>
    <axis>
      <x1-m> -1.09524 </x1-m>
      <y1-m>  0.82861 </y1-m>
      <z1-m> -0.34725 </z1-m>
      <x2-m> -1.09524 </x2-m>
      <y2-m>  2.14547 </y2-m>
      <z2-m> -0.26640 </z2-m>
    </axis>
  </animation>

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <property>gear/gear[0]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.28531 </x-m>
      <y-m> -0.78027 </y-m>
      <z-m> -1.29099 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueD</object-name>
    <property>gear/gear[1]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.28531 </x-m>
      <y-m>  0.78027 </y-m>
      <z-m> -1.29099 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueA</object-name>
    <property>gear/gear[2]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m>  2.67643 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m> -0.26588 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Add lights effects -->
  <model>
    <path>lights/beacon.xml</path>
    <offsets>
      <x-m>  2.95893 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  1.28924 </z-m>
    </offsets>
  </model>

  <model>
    <path>lights/RedLight.xml</path>
    <offsets>
      <x-m> -1.80316 </x-m>
      <y-m> -4.23685 </y-m>
      <z-m> -0.07345 </z-m>
    </offsets>
  </model>

  <model>
    <path>lights/StrobeLight.xml</path>
    <offsets>
      <x-m> -1.82316 </x-m>
      <y-m> -4.23685 </y-m>
      <z-m> -0.07345 </z-m>
    </offsets>
  </model>

  <model>
    <path>lights/GreenLight.xml</path>
    <offsets>
      <x-m> -1.80316 </x-m>
      <y-m>  4.23685 </y-m>
      <z-m> -0.07345 </z-m>
    </offsets>
  </model>

  <model>
    <path>lights/StrobeLight.xml</path>
    <offsets>
      <x-m> -1.82316 </x-m>
      <y-m>  4.23685 </y-m>
      <z-m> -0.07345 </z-m>
    </offsets>
  </model>

</PropertyList>
