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

<PropertyList include="SPAD-VII-bombableinclude.xml">

  <path>spadvii.ac</path>

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

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

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>ailesH</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>ailesB</object-name>
    <object-name>derive</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>jambes</object-name>
    <object-name>axes</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>helice</object-name>
    <object-name>bol</object-name>
    <object-name>bequille</object-name>
    <object-name>guns</object-name>
    <object-name>structure</object-name>
    <object-name>divers</object-name>
    <object-name>tourvitres</object-name>
    <object-name>trous</object-name>
    <object-name>echappes</object-name>

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

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>ailesH</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>ailesB</object-name>
    <object-name>derive</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>jambes</object-name>
    <object-name>axes</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>helice</object-name>
    <object-name>bol</object-name>
    <object-name>bequille</object-name>
    <object-name>guns</object-name>
    <object-name>structure</object-name>
    <object-name>divers</object-name>
    <object-name>tourvitres</object-name>
    <object-name>trous</object-name>
    <object-name>echappes</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/SPAD-VII/Models/Effects/Bump/bumpspec</inherits-from>
    <object-name>fuselage</object-name>
    <object-name>ailesH</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>ailesB</object-name>
    <object-name>derive</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>guns</object-name>
    <object-name>echappes</object-name>
  </effect>

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

  <effect>
    <inherits-from>Effects/Glass/glass</inherits-from>
    <object-name>HDRvitres</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>HDRvitres</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>vitres</object-name>
  </animation>

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

  <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-fires.xml</path>
  </model>

  <!-- L'hélice -->
  <animation>
    <name>HeliceComplete</name>
    <object-name>helice</object-name>
    <object-name>bol</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</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>900</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>300.000</value>
        </greater-than>
        <less-than>
          <property>/engines/engine[0]/rpm</property>
          <value>900.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>900</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> -2.941 </x-m>
      <y-m>  0.000 </y-m>
      <z-m>  0.127 </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> -->
    <property>surface-positions/rudder-pos-norm</property>
    <factor> -15 </factor>
    <center>
      <x-m> 2.433 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 0.629 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Gouverne de profondeur -->
  <animation>
    <type>rotate</type>
    <object-name>profondeur</object-name>
    <!-- <property>controls/flight/elevator</property> -->
    <property>surface-positions/elevator-pos-norm</property>
    <factor> 15 </factor>
    <center>
      <x-m> 2.328 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 0.501 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <property>/surface-positions/left-aileron-pos-norm</property>
    <interpolation>
      <entry><ind> -0.75 </ind><dep> -15 </dep></entry>
      <entry><ind>  0.00 </ind><dep>   0 </dep></entry>
      <entry><ind>  0.75 </ind><dep>  15 </dep></entry>
    </interpolation>
    <center>
      <x-m> -1.292 </x-m>
      <y-m> -2.965 </y-m>
      <z-m>  0.907 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <property>/surface-positions/right-aileron-pos-norm</property>
    <interpolation>
      <entry><ind> -0.75 </ind><dep> -15 </dep></entry>
      <entry><ind>  0.00 </ind><dep>   0 </dep></entry>
      <entry><ind>  0.75 </ind><dep>  15 </dep></entry>
    </interpolation>
    <center>
      <x-m> -1.292 </x-m>
      <y-m>  2.965 </y-m>
      <z-m>  0.907 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <!-- <property>gear/gear[0]/rollspeed-ms</property> -->
    <property>sim/multiplay/generic/float[5]</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.292 </x-m>
      <y-m> -0.751 </y-m>
      <z-m> -0.997 </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> -->
    <property>sim/multiplay/generic/float[6]</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.292 </x-m>
      <y-m>  0.751 </y-m>
      <z-m> -0.997 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

</PropertyList>
