<?xml version="1.0"?>

<PropertyList>

    <path>aoa-indexer.ac</path>

    <animation>
        <type>select</type>
        <object-name>aoa-slow</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>
                <and>
                    <greater-than-equals>
                        <property>orientation/alpha-indicated-deg</property>
                        <property>sim/model/f-14b/instrumentation/aoa-indexer/slow-deg-start</property>
                    </greater-than-equals>
                    <equals>
                        <property>gear/gear[0]/position-norm</property>
                        <value>1</value>
                    </equals>
                    <or>
                        <property>sim/model/f-14b/controls/lighting/hook-bypass</property>
                        <and>
                            <less-than>
                                <property>gear/tailhook/position-norm</property>
                                <value>0.4</value>
                            </less-than>
                            <property>sim/model/f-14b/lighting/warn-medium-lights-switch/state</property>
                        </and>
                        <greater-than>
                            <property>gear/tailhook/position-norm</property>
                            <value>0.5</value>
                        </greater-than>
                    </or>
                </and>
            </or>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>aoa-optimum</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>
                <and>

                    <greater-than-equals>
                        <property>orientation/alpha-indicated-deg</property>
                        <property>sim/model/f-14b/instrumentation/aoa-indexer/optimum-deg-start</property>
                    </greater-than-equals>
                    <less-than-equals>
                        <property>orientation/alpha-indicated-deg</property>
                        <property>sim/model/f-14b/instrumentation/aoa-indexer/optimum-deg-end</property>
                    </less-than-equals>

                    <equals>
                        <property>gear/gear[0]/position-norm</property>
                        <value>1</value>
                    </equals>
                    <or>
                        <property>sim/model/f-14b/controls/lighting/hook-bypass</property>
                        <and>
                            <less-than>
                                <property>gear/tailhook/position-norm</property>
                                <value>0.4</value>
                            </less-than>
                            <property>sim/model/f-14b/lighting/warn-medium-lights-switch/state</property>
                        </and>
                        <greater-than>
                            <property>gear/tailhook/position-norm</property>
                            <value>0.5</value>
                        </greater-than>
                    </or>
                </and>
            </or>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>aoa-fast</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>
                <and>
                    <less-than-equals>
                        <property>orientation/alpha-indicated-deg</property>
                        <property>sim/model/f-14b/instrumentation/aoa-indexer/fast-deg-end</property>
                    </less-than-equals>
                    <equals>
                        <property>gear/gear[0]/position-norm</property>
                        <value>1</value>
                    </equals>
                    <or>
                        <property>sim/model/f-14b/controls/lighting/hook-bypass</property>
                        <and>
                            <less-than>
                                <property>gear/tailhook/position-norm</property>
                                <value>0.4</value>
                            </less-than>
                            <property>sim/model/f-14b/lighting/warn-medium-lights-switch/state</property>
                        </and>
                        <greater-than>
                            <property>gear/tailhook/position-norm</property>
                            <value>0.5</value>
                        </greater-than>
                    </or>
                </and>
            </or>
        </condition>
    </animation>


    <!-- Warning Lights -->
    <animation>
        <type>select</type>
        <object-name>wheels-lit</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>-->
                <and>
                    <or>
                        <less-than>
                            <property>gear/gear[0]/position-norm</property>
                            <value>1</value>
                        </less-than>
                        <less-than>
                            <property>gear/gear[1]/position-norm</property>
                            <value>1</value>
                        </less-than>
                        <less-than>
                            <property>gear/gear[2]/position-norm</property>
                            <value>1</value>
                        </less-than>
                    </or>
                    <greater-than>
                        <property>surface-positions/flap-pos-norm</property>
                        <value>0.4285714285714286</value>
                    </greater-than>
                    <less-than>
                        <property>controls/engines/engine[0]/throttle</property>
                        <value>0.85</value>
                    </less-than>
                    <property>sim/model/f-14b/lighting/warn-medium-lights-switch/state</property>
                </and>
            </or>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>acls-lit</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>-->
                <property>sim/model/f-14b/instrumentation/acls/engaged</property>
            </or>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>brakes-lit</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>
                <property>controls/gear/brake-parking</property>
            </or>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>nws-lit</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>
                <property>sim/model/f-14b/instrumentation/gears/nose-wheel-steering-warnlight</property>
            </or>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>throt-lit</object-name>
        <condition>
            <greater-than>
                <property>/fdm/jsbsim/systems/electrics/ac-essential-bus1</property>
                <value>0</value>
            </greater-than>
            <or>
                <property>sim/model/f-14b/lights/master-test-lights</property>-->
                <property>sim/model/f-14b/systems/apc/self-disengaged-light</property>
            </or>
        </condition>
    </animation>

    <!-- lighting -->
    <!-- rembrandt change: keep the legacy emission so we can also keep controls/lighting/index-norm -->
    <animation>
        <object-name>aoa-slow</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>0.8</red>
            <green>0.8</green>
            <blue>0.8</blue>
        </emission>
    </animation>
    <animation>
        <object-name>aoa-optimum</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>0.8</red>
            <green>0.8</green>
            <blue>0.8</blue>
        </emission>
    </animation>
    <animation>
        <object-name>aoa-fast</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>0.8</red>
            <green>0.8</green>
            <blue>0.8</blue>
        </emission>
    </animation>

    <animation>
        <object-name>wheels-lit</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>1</red>
            <green>0.7</green>
            <blue>0.7</blue>
        </emission>
    </animation>
    <animation>
        <object-name>brakes-lit</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>1</red>
            <green>1</green>
            <blue>1</blue>
        </emission>
    </animation>
    <animation>
        <object-name>acls-lit</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>1</red>
            <green>1</green>
            <blue>1</blue>
        </emission>
    </animation>
    <animation>
        <object-name>nws-lit</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>1</red>
            <green>1</green>
            <blue>1</blue>
        </emission>
    </animation>
    <animation>
        <object-name>throt-lit</object-name>
        <type>material</type>
        <emission>
            <factor-prop>sim/model/f-14b/controls/lighting/index-norm</factor-prop>
            <red>1</red>
            <green>1</green>
            <blue>1</blue>
        </emission>
    </animation>
</PropertyList>
