<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="spreader" 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>RZK 300H</name>
        <specs>
            <workingWidth>14.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"/>
            <combination xmlFilename="$data/vehicles/antonioCarraro/tony10900TTR/tony10900TTR.xml"/>
            <combination xmlFilename="$data/vehicles/antonioCarraro/mach4R/mach4R.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_fertilizer</function>
        </functions>
        <image>$data/vehicles/salek/rzk300H/store_rzk300H.png</image>
        <price>2000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>SALEK</brand>
        <category>fertilizerSpreaders</category>
        <shopHeight>1.5</shopHeight>
        <shopTranslationOffset>0 0 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>186880</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>50176</indexBufferMemoryUsage>
        <textureMemoryUsage>327680</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_fertilizerSpreader</typeDesc>
        <filename>$data/vehicles/salek/rzk300H/rzk300H.i3d</filename>
        <size width="1.15" length="1.15" height="1.22"/>
        <speedLimit value="24" />
        <components>
            <component centerOfMass="0 0.3 0" solverIterationCount="10" mass="120"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerRotLimitScale="0 0 0" lowerTransLimitScale="0 0 0" upperRotationOffset="2" needsLowering="false" >
                <distanceToGround lower="0.35" upper="0.75" />
                <bottomArm categories="0" ballType="1" />
            </inputAttacherJoint>
        </inputAttacherJoints>
    </attachable>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true"/>
    </powerTakeOffs>

    <powerConsumer ptoRpm="400" neededMaxPtoPower="15"/>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydraulicIn01" adapterNode="hydraulicIn01_connector" length="1.4" diameter="0.01" straighteningFactor="0.2">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" adapterNode="hydraulicOut01_connector" length="1.4" diameter="0.01" straighteningFactor="0.2">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <workAreas>
        <workArea type="sprayer" functionName="processSprayerArea" disableBackwards="false" requiresGroundContact="false">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <onlyActiveWhenLowered value="false"/>
        </workArea>
    </workAreas>

    <animations>
        <animation name="turnedOnAnim">
            <part node="openingPlate" startTime="0" endTime="1" startRot="0 0 0" endRot="0 -20 0"/>
            <part node="spreadingPlate" startTime="0" endTime="1" startTrans="0 0.058 0" endTrans="0 0.058 0"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="openingPlate">
                <dependentPart node="hydraulic"/>
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="hydraulic" referencePoint="hydraulicRef" referenceFrame="hydraulicRef">
                <translatingPart node="hydraulicPunch" />
            </movingPart>
        </movingParts>
    </cylindered>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration name="$l10n_configuration_valueDefault" price="0" >
                <fillUnits>
                    <unloading width="11" offset="0 0 0" />
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypes="fertilizer lime" capacity="5000" updateMass="false" >
                        <exactFillRootNode node="exactFillRootNode" />
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" maxDelta="0.5" fillUnitIndex="1" maxAllowedHeapAngle="16" />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>
    </fillVolume>

    <sprayer fillUnitIndex="1">
        <usageScales workAreaIndex="1" scale="1" />
        <animationNodes>
            <animationNode node="spreader" rotSpeed="-2500" turnOnFadeTime="0.6" turnOffFadeTime="2" />
        </animationNodes>

        <effects>
            <effectNode effectClass="FertilizerMotionPathEffect" effectType="FERTILIZER" linkNode="fertilizerEffectLeft">
                <motionPathEffect textureFilename="$data/vehicles/salek/rzk300H/fertilizerEffectLeftArray.dds" numRows="22" rowLength="32" minFade="0.03" isLeft="true"/>
            </effectNode>
            <effectNode effectClass="FertilizerMotionPathEffect" effectType="FERTILIZER" linkNode="fertilizerEffectRight">
                <motionPathEffect textureFilename="$data/vehicles/salek/rzk300H/fertilizerEffectRightArray.dds" numRows="22" rowLength="32" minFade="0.03" isLeft="false"/>
            </effectNode>
        </effects>
    </sprayer>

    <variableWorkWidth>
        <sections>
            <section isLeft="true" maxWidthNode="section01"/>
            <section isLeft="true" maxWidthNode="section02"/>

            <section isLeft="false" maxWidthNode="section03"/>
            <section isLeft="false" maxWidthNode="section04"/>
        </sections>

        <sectionNodes>
            <sectionNode node="workAreaHeight" isLeft="true"  minTrans="3 0 -9"  maxTrans="7 0 -5"/>
            <sectionNode node="workAreaWidth"  isLeft="false" minTrans="-3 0 -9" maxTrans="-7 0 -5"/>

            <sectionNode node="aiMarkerLeft"  isLeft="true"  minTrans="7 0 -9"  maxTrans="7 0 -5"/>
            <sectionNode node="aiMarkerRight" isLeft="false" minTrans="-7 0 -9" maxTrans="-7 0 -5"/>
            <sectionNode node="aiMarkerBack"  isLeft="false" minTrans="0 0 -11" maxTrans="0 0 -7"/>
        </sectionNodes>
    </variableWorkWidth>

    <turnOnVehicle>
        <turnedOnAnimation name="turnedOnAnim" speedScale="1" turnOnFadeTime="1" turnOffFadeTime="1"/>

        <sounds>
            <work template="defaultSpreader" linkNode="rzk100H_main_component1" />
        </sounds>
    </turnOnVehicle>

    <ai>
        <needsLowering value="false" />
        <collisionTrigger node="aiCollisionNode" width="1.15" height="1.2" />
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" width="14" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack" />
        <agentAttachment width="1.15" height="1.2" length="1.15"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.4" maxX="0.4" minZ="-0.1" maxZ="0.5"/>
        <bendingNode minX="-0.4" maxX="0.4" minZ="-0.42" maxZ="-0.1" yOffset="0.25"/>
    </foliageBending>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90"  workMultiplier="4" fieldMultiplier="2" washDuration="1"/>

    <i3dMappings>
        <i3dMapping id="rzk100H_main_component1" node="0>" />
        <i3dMapping id="rzk100H_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="ptoInputNode" node="0>0|0|2" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|3|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|3|0|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|3|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|3|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|3|1|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|3|1|0|0" />
        <i3dMapping id="spreadingPlate" node="0>0|1|0|0" />
        <i3dMapping id="openingPlate" node="0>0|1|1|0" />
        <i3dMapping id="hydraulicRef" node="0>0|1|1|0|0" />
        <i3dMapping id="hydraulic" node="0>0|1|2" />
        <i3dMapping id="hydraulicPunch" node="0>0|1|2|0" />
        <i3dMapping id="spreader" node="0>0|1|3" />
        <i3dMapping id="fillVolume" node="0>0|2|0" />
        <i3dMapping id="exactFillRootNode" node="0>0|2|1" />
        <i3dMapping id="workAreaStart" node="0>0|3|0" />
        <i3dMapping id="workAreaWidth" node="0>0|3|1" />
        <i3dMapping id="workAreaHeight" node="0>0|3|2" />
        <i3dMapping id="section01" node="0>0|3|3|0" />
        <i3dMapping id="section02" node="0>0|3|3|1" />
        <i3dMapping id="section03" node="0>0|3|3|2" />
        <i3dMapping id="section04" node="0>0|3|3|3" />
        <i3dMapping id="fertilizerEffectLeft" node="0>0|4|0" />
        <i3dMapping id="fertilizerEffectRight" node="0>0|4|1" />
        <i3dMapping id="aiMarkerLeft" node="0>0|5|0|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|5|0|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|5|0|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|5|1|0" />
        <i3dMapping id="sizeMarkerRight" node="0>0|5|1|1" />
        <i3dMapping id="sizeMarkerBack" node="0>0|5|1|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|5|2" />
    </i3dMappings>
</vehicle>
