<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="sprayer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>MERCURY 4000L</name>
        <specs>
            <workingWidth>4.0</workingWidth>
            <combination xmlFilename="$data/vehicles/landini/seriesREX4/seriesREX4.xml"/>
            <combination xmlFilename="$data/vehicles/newHolland/tk4/tk4.xml"/>
            <combination xmlFilename="$data/vehicles/fendt/vario200/vario200.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_sprayer</function>
        </functions>
        <storePacks>
            <storePack>STARTER_GRAPE</storePack>
            <storePack>STARTER_OLIVE</storePack>
        </storePacks>
        <image>$data/vehicles/hardi/mercury4000L/store_mercury4000L.png</image>
        <price>28000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>HARDI</brand>
        <category>grapeTools</category>
        <shopTranslationOffset>0 -0.013 0</shopTranslationOffset>
        <shopRotationOffset>-0.206 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1276160</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>236288</indexBufferMemoryUsage>
        <textureMemoryUsage>1835008</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_sprayer</typeDesc>
        <filename>$data/vehicles/hardi/mercury4000L/mercury4000L.i3d</filename>
        <size width="2.5" length="5" lengthOffset="0.1" />
        <components maxMass="5000">
            <component centerOfMass="0 0.22 -0.1" solverIterationCount="10" mass="574" />
            <component centerOfMass="0 0 0" solverIterationCount="10" mass="150" />
            <joint component1="1" component2="2" node="drawbarJoint" rotLimit="0 0 0" transLimit="0 0 0"/>
        </components>
        <speedLimit value="15" />
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL_TRAILED" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T404/400_60R15_5.xml" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics restLoad="0.3" repr="wheelLeft"  forcePointRatio="0.4" initialCompression="7" suspTravel="0.1" spring="40" damper="30" frictionScale="2"/>
                        <wheelChock parkingNode="wheelChock02_01" color="SHARED_BLACK1" isInverted="true"  scale="0.5 0.5 0.5"/>
                        <wheelChock parkingNode="wheelChock02_02" color="SHARED_BLACK1" isInverted="false" scale="0.5 0.5 0.5"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T404/400_60R15_5.xml" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics restLoad="0.3" repr="wheelRight" forcePointRatio="0.4" initialCompression="7" suspTravel="0.1" spring="40" damper="30" frictionScale="2"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0>HARDI_RED</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelLeft"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.15 0.2 0.2" />
            <hub linkNode="wheelRight" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.15 0.2 0.2" />
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" rootNode="mercury4000L_drawbar_component2" jointType="implement" lowerRotLimitScale="0 0 1" upperRotLimitScale="0 0 1" lowerTransLimitScale="0 1 0" allowsLowering="false">
                <distanceToGround lower="0.55" upper="0.55"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport"/>
        <support animationName="lockDrawbarLimit" delayedOnAttach="false" detachAfterAnimation="false"/>
        <brakeForce force="0.15" maxForce="0.7" maxForceMass="4900"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="electric" node="electric" length="1" diameter="0.013" adapterNode="electric_connector">
           <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydraulicIn01" length="1" diameter="0.013" adapterNode="hydraulicIn01_connector">
           <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1" diameter="0.013" adapterNode="hydraulicOut01_connector">
           <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoAttached" detachNode="ptoDetached" color="SHARED_BLACK1" decalColor="WALTERSCHEID_YELLOW1">
            <objectChange node="ptoMount" rotationActive="-204 0 0" rotationInactive="0 0 0"/>
        </input>
    </powerTakeOffs>

    <licensePlates>
        <licensePlate node="licensePlate" position="BACK" preferedType="ELONGATED" placementArea="0.11 0.23 0.06 0.23" />
    </licensePlates>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0"   linkNode="chockSupport01"           filename="$data/shared/assets/wheelChocks/wheelChockSupport01.i3d"/>
        <dynamicallyLoadedPart node="0"   linkNode="chockSupport02"           filename="$data/shared/assets/wheelChocks/wheelChockSupport01.i3d"/>
    </dynamicallyLoadedParts>

    <powerConsumer ptoRpm="470" neededMinPtoPower="7" neededMaxPtoPower="7" />

    <lights>
        <sharedLight linkNode="whiteRound_03_01"      filename="$data/shared/assets/reflectors/lizard/whiteRound_03.xml" />
        <sharedLight linkNode="whiteRound_03_02"      filename="$data/shared/assets/reflectors/lizard/whiteRound_03.xml" />
        <sharedLight linkNode="plateNumberLight02_01" filename="$data/shared/assets/lights/lizard/plateNumberLight02.xml" />
        <sharedLight linkNode="plateNumberLight02_02" filename="$data/shared/assets/lights/lizard/plateNumberLight02.xml" />

        <realLights>
            <high>
                <light          node="backLightsHigh"        lightTypes="0"/>
                <light          node="licensePlateLightHigh" lightTypes="0"/>
                <brakeLight     node="backLightsHigh" />
                <turnLightLeft  node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
            </high>
        </realLights>

        <defaultLights>
            <defaultLight shaderNode="backLight_static" lightTypes="0" />
        </defaultLights>

        <brakeLights>
            <brakeLight shaderNode="brakeLight_static" />
        </brakeLights>

        <turnLights>
            <turnLightLeft  shaderNode="turnLightLeft_static" />
            <turnLightRight shaderNode="turnLightRight_static" />
        </turnLights>
    </lights>

    <workAreas>
        <workArea type="sprayer" functionName="processSprayerArea" disableBackwards="false" requiresGroundContact="false" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <onlyActiveWhenLowered value="false"/>
        </workArea>
    </workAreas>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <unloading width="7" offset="0 0 0" />
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypeCategories="sprayer" capacity="4000">
                        <exactFillRootNode node="exactFillRootNode"/>
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <dischargeable requiresTipOcclusionArea="false">
        <dischargeNode node="dischargeTrigger" emptySpeed="200" fillUnitIndex="1" allowAIDischarge="true">
            <info width="1.0" length="0.5" zOffset="0.4" />
            <trigger node="dischargeTrigger" />
        </dischargeNode>
    </dischargeable>

    <cylindered>
        <movingParts>
            <movingPart node="drawbarYRot" referencePoint="drawbarYRotRef" referenceFrame="drawbarYRotRef" limitedAxis="2" isActiveDirty="true" maxUpdateDistance="300"/>
            <movingPart node="drawbarXRot" referencePoint="drawbarXRotRef" referenceFrame="drawbarXRotRef" limitedAxis="1" isActiveDirty="true" maxUpdateDistance="300"/>
        </movingParts>
    </cylindered>

    <turnOnVehicle turnOffIfNotAllowed="true" >
        <sounds>
            <work template="DEFAULT_SPRAYER" linkNode="mercury4000L_main_component1" />
        </sounds>
        <animationNodes>
            <animationNode node="turbineFan" rotAxis="3" rotSpeed="1400" turnOnFadeTime="2" turnOffFadeTime="4"/>
            <animationNode node="driveShaft" rotAxis="3" rotSpeed="1400" turnOnFadeTime="2" turnOffFadeTime="4"/>
        </animationNodes>
    </turnOnVehicle>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <needsLowering value="false"/>
        <collisionTrigger node="aiCollisionNode" width="2.1" height="2.0"/>
        <allowTurnBackward value="false" />
        <agentAttachment jointNode="attacherJoint" rotCenterWheelIndices="1 2" width="1.9" height="2.0" length="4.3" lengthOffset="0.2"/>
    </ai>

    <sprayer fillUnitIndex="1">
        <usageScales workingWidth="4.0" scale="1"/>
        <effects>
            <effectNode effectNode="effectLeft" delay="0" materialType="sprayer"/>
            <effectNode effectNode="effectRight" delay="0" materialType="sprayer"/>
        </effects>
    </sprayer>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm"       startTime="0.0" endTime="0.5" startTrans="0.142 0.686 1.874" endTrans="0.142 0.430 1.874" />
            <part node="supportArmCrank"  startTime="0.0" endTime="0.5" startRot="0 0 -107" endRot="0 0 -720" />
            <part componentJointIndex="1" startTime="0.0" endTime="0.5" startRotLimit="0 70 45" endRotLimit="0 0 0" />

            <sound template="clackVar6"  startTime="0.49" volumeScale="1.1" pitchScale="0.9" linkNode="attacherJoint"/>
            <sound template="latchSmall" startTime="0.49" volumeScale="0.1" pitchScale="1.6" linkNode="attacherJoint"/>
            <sound template="clackVar1"  startTime="0.2"  volumeScale="1.1" pitchScale="1.1" linkNode="attacherJoint"/>
        </animation>
        <animation name="lockDrawbarLimit">
            <part componentJointIndex="1" startTime="0.0" endTime="0.5" startRotLimit="0 70 45" endRotLimit="0 0 0" />
        </animation>
    </animations>

    <foliageBending>
        <bendingNode minX="-1" maxX="1" minZ="-1.2" maxZ="0.2" yOffset="0.5"/>
        <bendingNode minX="-0.7" maxX="0.7" minZ="0.2" maxZ="2.3" yOffset="0.5"/>
        <bendingNode minX="-0.65" maxX="0.65" minZ="-2.3" maxZ="-1.2" yOffset="0.5"/>
    </foliageBending>

    <baseMaterial>
        <material name="mercury4000L_mat" baseNode="mercury4000L_vis">
            <shaderParameter name="colorMat0" value="HARDI_YELLOW"/>
            <shaderParameter name="colorMat1" value="HARDI_RED"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="mercury4000L_main_component1" node="0>" />
        <i3dMapping id="mercury4000L_vis" node="0>0" />
        <i3dMapping id="ptoAttached" node="0>0|0|0|0" />
        <i3dMapping id="ptoDetached" node="0>0|0|0|1" />
        <i3dMapping id="ptoMount" node="0>0|0|0|2" />
        <i3dMapping id="supportArm" node="0>0|0|1|0" />
        <i3dMapping id="supportArmCrank" node="0>0|0|1|1|0" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|2|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|2|0|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|2|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|2|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|2|1|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|2|1|0|0" />
        <i3dMapping id="electric" node="0>0|0|2|2" />
        <i3dMapping id="electric_detached" node="0>0|0|2|2|0" />
        <i3dMapping id="electric_connector" node="0>0|0|2|2|0|0" />
        <i3dMapping id="drawbarJoint" node="0>0|1" />
        <i3dMapping id="wheelLeft" node="0>0|2|0" />
        <i3dMapping id="wheelRight" node="0>0|2|1" />
        <i3dMapping id="backLight_static" node="0>0|3|0|1" />
        <i3dMapping id="brakeLight_static" node="0>0|3|0|3" />
        <i3dMapping id="turnLightLeft_static" node="0>0|3|0|5" />
        <i3dMapping id="turnLightRight_static" node="0>0|3|0|7" />
        <i3dMapping id="whiteRound_03_01" node="0>0|3|1|0" />
        <i3dMapping id="whiteRound_03_02" node="0>0|3|1|1" />
        <i3dMapping id="plateNumberLight02_01" node="0>0|3|1|2" />
        <i3dMapping id="plateNumberLight02_02" node="0>0|3|1|3" />
        <i3dMapping id="licensePlateLightHigh" node="0>0|3|2|0" />
        <i3dMapping id="backLightsHigh" node="0>0|3|3|0" />
        <i3dMapping id="turnLightLeftBack" node="0>0|3|4|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|3|4|1" />
        <i3dMapping id="licensePlate" node="0>0|4|0" />
        <i3dMapping id="chockSupport01" node="0>0|4|1" />
        <i3dMapping id="wheelChock02_01" node="0>0|4|2" />
        <i3dMapping id="chockSupport02" node="0>0|4|3" />
        <i3dMapping id="wheelChock02_02" node="0>0|4|4" />
        <i3dMapping id="drawbarYRot" node="0>0|5|0" />
        <i3dMapping id="drawbarXRot" node="0>0|5|0|0|0" />
        <i3dMapping id="driveShaft" node="0>0|5|1" />
        <i3dMapping id="turbineFan" node="0>0|5|2" />
        <i3dMapping id="exactFillRootNode" node="0>0|6|0" />
        <i3dMapping id="dischargeTrigger" node="0>0|6|1" />
        <i3dMapping id="effectLeft" node="0>0|7|0" />
        <i3dMapping id="effectRight" node="0>0|7|1" />
        <i3dMapping id="workAreaStart" node="0>0|8|0" />
        <i3dMapping id="workAreaWidth" node="0>0|8|1" />
        <i3dMapping id="workAreaHeight" node="0>0|8|2" />
        <i3dMapping id="aiMarkerLeft" node="0>0|9|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|9|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|9|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|9|3" />
        <i3dMapping id="mercury4000L_drawbar_component2" node="1>" />
        <i3dMapping id="attacherJoint" node="1>0" />
        <i3dMapping id="drawbarYRotRef" node="1>1" />
        <i3dMapping id="drawbarXRotRef" node="1>2" />
    </i3dMappings>
</vehicle>
