﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="fertilizingSowingMachine" 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>FALCON3</name>
        <specs>
            <neededPower>100</neededPower>
            <workingWidth>3</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="600" filterSpecMax="650"/>
        </specs>
        <functions>
            <function>$l10n_function_planter</function>
        </functions>
        <image>$data/vehicles/agromasz/falcon/store_falcon.png</image>
        <price>15000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>AGROMASZ</brand>
        <category>planters</category>
        <shopHeight>3</shopHeight>
        <shopTranslationOffset>0 -0.083 0</shopTranslationOffset>
        <shopRotationOffset>-1.605 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>3691776</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>1094656</indexBufferMemoryUsage>
        <textureMemoryUsage>2752512</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_sowingMachine</typeDesc>
        <filename>$data/vehicles/agromasz/falcon/falcon.i3d</filename>
        <size width="3.5" length="2.8" lengthOffset="-0.3"/>
        <speedLimit value="10" />
        <components>
            <component centerOfMass="0 0.52 0" solverIterationCount="20" mass="1380" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0" brand="LIZARD" saveId="LIZARD_DEFAULT">
                <wheels>
                    <wheel>
                        <physics restLoad="0.4" repr="wheel01" radius="0.2" width="0.1" mass="0.06" initialCompression="10" suspTravel="0.15" spring="24" damper="10" brakeFactor="0" />
                    </wheel>
                    <wheel>
                        <physics restLoad="0.4" repr="wheel02" radius="0.2" width="0.1" mass="0.06" initialCompression="10" suspTravel="0.15" spring="24" damper="10" brakeFactor="0" />
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" topReferenceNode="topReferenceNode" jointType="implement" upperRotationOffset="15" lowerRotationOffset="-5" lowerRotLimitScale="0 0 0.1" lowerTransLimitScale="0 1 0" >
                <distanceToGround lower="0.5" upper="0.9" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01" adapterNode="hydraulicIn01_detached"  length="1.1" diameter="0.015" straighteningFactor="0.5">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" adapterNode="hydraulicOut01_detached" length="1.3" diameter="0.015" straighteningFactor="0.5">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" detachNode="ptoDetachedNode" inputNode="ptoInputNode" aboveAttacher="true"/>
    </powerTakeOffs>

    <powerConsumer forceNode="falcon_main_component1" maxForce="15" ptoRpm="400" neededMaxPtoPower="10" />

    <speedRotatingParts>
        <speedRotatingPart shaderNode="falconWheels" radius="0.17" groundReferenceNodeIndex="1"/>
        <speedRotatingPart shaderNode="discs" radius="0.17" groundReferenceNodeIndex="1"/>
        <speedRotatingPart node="ridgeMarkerLeftDisc" radius="-0.17" groundReferenceNodeIndex="2" ridgeMarkerAnim="ridgeMarkerLeft"/>
        <speedRotatingPart node="ridgeMarkerRightDisc" radius="-0.17" groundReferenceNodeIndex="3" ridgeMarkerAnim="ridgeMarkerRight"/>
    </speedRotatingParts>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode"  forceFactor="1" threshold="0.05" depthNode="groundReferenceNode" chargeValue="0.5"/>
        <groundReferenceNode node="ridgeMarkerLeftNode"  forceFactor="0" threshold="0.05" depthNode="ridgeMarkerLeftNode"  chargeValue="0.25"/>
        <groundReferenceNode node="ridgeMarkerRightNode" forceFactor="0" threshold="0.05" depthNode="ridgeMarkerRightNode" chargeValue="0.25"/>
    </groundReferenceNodes>

    <workAreas>
        <workArea type="sowingMachine" functionName="processSowingMachineArea">
            <area startNode="areaStart" widthNode="areaWidth" heightNode="areaHeight" />
            <groundReferenceNode index="1" />
            <onlyActiveWhenLowered value="true"/>
        </workArea>
        <workArea type="ridgemarker" functionName="processRidgeMarkerArea" disableBackwards="false" needsSetIsTurnedOn="false">
            <ridgeMarkerArea node="ridgeMarkerLeftNode" size="0.1" testAreaOffset="0.75"/>
            <groundReferenceNode index="2" />
            <onlyActiveWhenLowered value="false"/>
        </workArea>
        <workArea type="ridgemarker" functionName="processRidgeMarkerArea" disableBackwards="false" needsSetIsTurnedOn="false">
            <ridgeMarkerArea node="ridgeMarkerRightNode" size="0.1" testAreaOffset="0.75"/>
            <groundReferenceNode index="3" />
            <onlyActiveWhenLowered value="false"/>
        </workArea>
    </workAreas>

    <workParticles>
        <effect workAreaIndex="2">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="ridgeMarkerLeftDiscEffect">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedRidgeMarkerLeftArray.dds" numRows="3" rowLength="18" minFade="0.07" />
            </effectNode>
        </effect>
        <effect workAreaIndex="3">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="ridgeMarkerRightDiscEffect">
                <motionPathEffect textureFilename="$data/effects/cultivator/arrays/sharedRidgeMarkerRightArray.dds" numRows="3" rowLength="18" minFade="0.07" />
            </effectNode>
        </effect>

        <effect workAreaIndex="1">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="seederEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/agromasz/falcon/seederEffect01Array.dds" numRows="10" rowLength="18" minFade="0.07" density="1" shapeScale="0.5" maxShapeScale="1"/>
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="seederEffect02LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/agromasz/falcon/seederEffect01Array.dds" numRows="10" rowLength="18" minFade="0.07" density="1" shapeScale="0.5" maxShapeScale="1"/>
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="seederEffect03LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/agromasz/falcon/seederEffect03Array.dds" numRows="10" rowLength="18" minFade="0.07" density="1" shapeScale="0.5" maxShapeScale="1"/>
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="seederEffect04LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/agromasz/falcon/seederEffect03Array.dds" numRows="10" rowLength="18" minFade="0.07" density="1" shapeScale="0.5" maxShapeScale="1"/>
            </effectNode>
        </effect>

        <particle>
            <node node="smokeEmitter01" refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="2.5"/>
        </particle>
    </workParticles>

    <animations>
        <animation name="moveSupport">
            <part node="supportCol" startTime="0" endTime="0.4" startTrans="0 0.4 0" endTrans="0 0 0" />
            <part node="supportArm" startTime="0" endTime="0.4" startTrans="0 0 -0.334" endTrans="0 0 0" />
        </animation>
        <animation name="ridgeMarkerLeft">
            <part node="ridgeMarkerLeft" startTime="0" endTime="1.6" startRot="0 0 -105.218" endRot="0 0 0" tangentType="spline"/>

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="1.59" volumeScale="0.9" pitchScale="1.5" />
            <sound template="clackVar6"             startTime="1.5"  direction="1"  volumeScale="0.9" pitchScale="1"/>
            <sound template="sheetImp02"            startTime="1.5"  direction="1"  volumeScale="1.4" pitchScale="1.4"/>
            <sound template="clackVar5"             startTime="1.5"  direction="-1" volumeScale="0.5" pitchScale="1.7"/>
            <sound template="metalClose"            startTime="0.05" direction="-1" volumeScale="0.5" pitchScale="2"/>
            <sound template="clackVar6"             startTime="0.05" direction="-1" volumeScale="1"   pitchScale="1.3"/>
        </animation>
        <animation name="ridgeMarkerRight">
            <part node="ridgeMarkerRight" startTime="0" endTime="1.6" startRot="0 0 105.218" endRot="0 0 0" tangentType="spline"/>

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="1.59" volumeScale="0.9" pitchScale="1.3" />
            <sound template="clackVar6"             startTime="1.5"  direction="1"  volumeScale="0.9" pitchScale="1"/>
            <sound template="sheetImp02"            startTime="1.5"  direction="1"  volumeScale="1.4" pitchScale="1.4"/>
            <sound template="clackVar5"             startTime="1.5"  direction="-1" volumeScale="0.5" pitchScale="1.7"/>
            <sound template="metalClose"            startTime="0.05" direction="-1" volumeScale="0.5" pitchScale="2"/>
            <sound template="clackVar6"             startTime="0.05" direction="-1" volumeScale="1"   pitchScale="1.3"/>
        </animation>
        <animation name="toggleCover">
            <part node="cover_closed" startTime="0.00" endTime="0.05" visibility="false" />
            <part node="cover_open"   startTime="0.00" endTime="0.05" visibility="true" />
            <part node="cover_closed" startTime="0.05" endTime="0.10" visibility="true" />
            <part node="cover_open"   startTime="0.05" endTime="0.10" visibility="false" />

            <sound template="fabricCover2" startTime="0.01" direction="1"  volumeScale="1.4" pitchScale="1.5"/>
            <sound template="fabricCover1" startTime="0.05" direction="-1" volumeScale="1.4" pitchScale="1.8"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="ridgeMarkerLeft" playSound="true">
                <dependentPart node="ridgeMarkerLeftHydraulic" />
            </movingTool>
            <movingTool node="ridgeMarkerRight" playSound="true">
                <dependentPart node="ridgeMarkerRightHydraulic" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="ridgeMarkerLeftHydraulic" referencePoint="ridgeMarkerLeftHydraulicRef" referenceFrame="ridgeMarkerLeftHydraulicRef">
                <translatingPart node="ridgeMarkerLeftHydraulicPunch" />
            </movingPart>
            <movingPart node="ridgeMarkerRightHydraulic" referencePoint="ridgeMarkerRightHydraulicRef" referenceFrame="ridgeMarkerRightHydraulicRef">
                <translatingPart node="ridgeMarkerRightHydraulicPunch" />
            </movingPart>
        </movingParts>
    </cylindered>

    <ridgeMarker onlyActiveWhenLowered="false">
        <marker animName="ridgeMarkerLeft" workAreaIndex="2"/>
        <marker animName="ridgeMarkerRight" workAreaIndex="3"/>
    </ridgeMarker>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <unloading width="12" offset="0 0 0" />
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypes="seeds" capacity="200" >
                        <exactFillRootNode node="exactFillRootNodeSeeds"/>
                    </fillUnit>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypes="fertilizer" capacity="1200">
                        <exactFillRootNode node="exactFillRootNodeFertilizer"/>
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolumeFertilizer01" fillUnitIndex="2" maxDelta="0.1"/>
                    <volume node="fillVolumeFertilizer02" fillUnitIndex="2" maxDelta="0.1"/>
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>
    </fillVolume>

    <sowingMachine fillUnitIndex="1">
        <seedFruitTypeCategories>planter</seedFruitTypeCategories>
        <needsActivation value="true" />
        <fieldGroundType value="PLANTED" />

        <sounds>
            <work template="DEFAULT_SOWING_WORK" linkNode="0>" />
            <airBlower template="DEFAULT_SOWING_AIR_BLOWER" linkNode="0>" />
        </sounds>
    </sowingMachine>

    <cover>
        <coverConfigurations>
            <coverConfiguration>
                <cover openAnimation="toggleCover" openAnimationStopTime="0" closeAnimation="toggleCover" closeAnimationStopTime="1" fillUnitIndices="1 2" openOnBuy="false" autoReactToTrigger="true"/>
            </coverConfiguration>
        </coverConfigurations>
    </cover>

    <sprayer fillUnitIndex="2" unloadInfoIndex="2">
        <usageScales workingWidth="3" scale="1" />
    </sprayer>

    <turnOnVehicle turnOffIfNotAllowed="true"/>

    <ai>
        <needsLowering value="true" />
        <allowTurnBackward value="true"/>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack"/>
        <collisionTrigger node="aiCollisionNode" width="3" height="2"/>
        <agentAttachment width="3.0" height="2.0" length="2.2" lengthOffset="-0.4"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.4" maxX="1.4" minZ="-1.5" maxZ="0.65" yOffset="0.4" />
    </foliageBending>

    <baseMaterial>
        <material name="falcon_mat" baseNode="falcon_vis">
            <shaderParameter name="colorMat0" value="AGROMASZ_REDPAINT"/>
            <shaderParameter name="colorMat1" value="AGROMASZ_GREENPAINT"/>
            <shaderParameter name="colorMat2" value="AGROMASZ_GREENPAINT"/>
            <shaderParameter name="colorMat4" value="AGROMASZ_WHITEPAINT"/>
        </material>
        <material name="falcon_mat" baseNode="falcon_vis">
            <shaderParameter name="colorMat0" value="AGROMASZ_REDPAINT"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="falcon_main_component1" node="0>" />
        <i3dMapping id="falcon_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|2|0" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|2|1" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|2|2" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|2|3" />
        <i3dMapping id="supportArm" node="0>0|0|3|0|0" />
        <i3dMapping id="supportCol" node="0>0|0|3|1" />
        <i3dMapping id="ptoInputNode" node="0>0|0|4|0" />
        <i3dMapping id="ptoDetachedNode" node="0>0|0|4|1" />
        <i3dMapping id="wheel01" node="0>0|1|0" />
        <i3dMapping id="wheel02" node="0>0|1|1" />
        <i3dMapping id="falconWheels" node="0>0|2|0" />
        <i3dMapping id="discs" node="0>0|2|1" />
        <i3dMapping id="ridgeMarkerLeft" node="0>0|2|2|0|0" />
        <i3dMapping id="ridgeMarkerLeftHydraulicRef" node="0>0|2|2|0|0|0" />
        <i3dMapping id="ridgeMarkerLeftDisc" node="0>0|2|2|0|0|2|0" />
        <i3dMapping id="ridgeMarkerLeftNode" node="0>0|2|2|0|0|3" />
        <i3dMapping id="ridgeMarkerLeftDiscEffect" node="0>0|2|2|0|0|4" />
        <i3dMapping id="ridgeMarkerRight" node="0>0|2|2|1|0" />
        <i3dMapping id="ridgeMarkerRightHydraulicRef" node="0>0|2|2|1|0|0" />
        <i3dMapping id="ridgeMarkerRightDisc" node="0>0|2|2|1|0|2|0" />
        <i3dMapping id="ridgeMarkerRightNode" node="0>0|2|2|1|0|3" />
        <i3dMapping id="ridgeMarkerRightDiscEffect" node="0>0|2|2|1|0|4" />
        <i3dMapping id="ridgeMarkerLeftHydraulic" node="0>0|2|2|2" />
        <i3dMapping id="ridgeMarkerLeftHydraulicPunch" node="0>0|2|2|2|0" />
        <i3dMapping id="ridgeMarkerRightHydraulic" node="0>0|2|2|3" />
        <i3dMapping id="ridgeMarkerRightHydraulicPunch" node="0>0|2|2|3|0" />
        <i3dMapping id="cover_closed" node="0>0|3|0" />
        <i3dMapping id="cover_open" node="0>0|3|1" />
        <i3dMapping id="exactFillRootNodeFertilizer" node="0>0|4|0" />
        <i3dMapping id="exactFillRootNodeSeeds" node="0>0|4|1" />
        <i3dMapping id="fillVolumeFertilizer01" node="0>0|4|2" />
        <i3dMapping id="fillVolumeFertilizer02" node="0>0|4|3" />
        <i3dMapping id="groundReferenceNode" node="0>0|5|0" />
        <i3dMapping id="areaStart" node="0>0|5|1" />
        <i3dMapping id="areaWidth" node="0>0|5|2" />
        <i3dMapping id="areaHeight" node="0>0|5|3" />
        <i3dMapping id="aiMarkerLeft" node="0>0|6|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|6|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|6|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|6|3" />
        <i3dMapping id="sizeMarkerRight" node="0>0|6|4" />
        <i3dMapping id="sizeMarkerBack" node="0>0|6|5" />
        <i3dMapping id="aiCollisionNode" node="0>0|6|6" />
        <i3dMapping id="seederEffect01LinkNode" node="0>0|7|0" />
        <i3dMapping id="seederEffect02LinkNode" node="0>0|7|1" />
        <i3dMapping id="seederEffect03LinkNode" node="0>0|7|2" />
        <i3dMapping id="seederEffect04LinkNode" node="0>0|7|3" />
        <i3dMapping id="smokeEmitter01" node="0>0|7|4" />
    </i3dMappings>
</vehicle>
