﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="cultivator" 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>Maratona MG-300</name>
        <specs>
            <neededPower>120</neededPower>
            <workingWidth>3</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="400" filterSpecMax="600"/>
        </specs>
        <functions>
            <function>$l10n_function_discHarrow</function>
        </functions>
        <image>$data/vehicles/alpego/maratonaMG300/store_maratonaMG300.png</image>
        <price>19500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>ALPEGO</brand>
        <category>discHarrows</category>
        <shopFoldingState>0</shopFoldingState>
        <shopTranslationOffset>0 -0.042 0</shopTranslationOffset>
        <shopRotationOffset>-3.958 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1419776</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>219648</indexBufferMemoryUsage>
        <textureMemoryUsage>1769472</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_discHarrow</typeDesc>
        <filename>$data/vehicles/alpego/maratonaMG300/maratonaMG300.i3d</filename>
        <size width="3.6" length="2.5"/>
        <speedLimit value="18" />
        <components>
            <component centerOfMass="0 0.2 0" solverIterationCount="15" mass="1150" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.3" repr="wheelLeft"   radius="0.26" width="0.1" forcePointRatio="0.7" initialCompression="12" suspTravel="0.35" spring="5" damper="1"/>
                    </wheel>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.3" repr="wheelCenter" radius="0.26" width="0.1" forcePointRatio="0.7" initialCompression="12" suspTravel="0.35" spring="5" damper="1"/>
                    </wheel>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.3" repr="wheelRight"  radius="0.26" width="0.1" forcePointRatio="0.7" initialCompression="12" suspTravel="0.35" spring="5" damper="1"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <speedRotatingParts>
        <speedRotatingPart node="roll"  radius="-0.22" groundReferenceNodeIndex="1" wheelIndex="2"/>
        <speedRotatingPart shaderNode="maratonaMG300Discs" radius="-0.33" groundReferenceNodeIndex="1" wheelIndex="2"/>
    </speedRotatingParts>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerTransLimitScale="0 1 0" lowerRotationOffset="-2" upperRotationOffset="12" lowerRotLimitScale="0 0 0.4" forcedAttachingDirection="-1">
                <distanceToGround lower="0.4" upper="0.9" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <powerConsumer forceNode="maratonaMG300_main_component1" maxForce="12" />

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" forceFactor="1" threshold="0.2" depthNode="depthNode"/>
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cultivator" functionName="processCultivatorArea">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight"/>
            <groundReferenceNode index="1"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>
    </workAreas>

    <cultivator useDeepMode="false">
        <sounds>
            <work template="DEFAULT_CULTIVATOR_WORK" linkNode="0>" />
        </sounds>
        <directionNode node="0>" />
        <onlyActiveWhenLowered value="true"/>
    </cultivator>

    <animations>
        <animation name="moveSupport">
            <part node="supportCol" startTime="0.1" endTime="0.5" startTrans="0 0.4 0" endTrans="0 0 0" />

            <sound template="clackVar6" startTime="0.49" direction="-1" volumeScale="1.2" pitchScale="1" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingParts>
            <movingPart node="rollerArm01" referencePoint="rollerArm01Ref" referenceFrame="rollerArm01RefFrame" isActiveDirty="true" maxUpdateDistance="150">
                <dependentPart node="rollerArm02" />
            </movingPart>
            <movingPart node="rollerArm02" localReferencePoint="rollerArm03" referencePoint="rollerArm03Ref" referenceFrame="rollerArm02RefFrame">
                <dependentPart node="rollerArm03" />
            </movingPart>
            <movingPart node="rollerArm03" referencePoint="rollerArm03Ref" referenceFrame="rollerArm03Ref"/>
        </movingParts>
    </cylindered>

    <workParticles>
        <effect workAreaIndex="1">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="rollerEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/alpego/maratonaMG300/rollerEffect01Array.dds" numRows="20" rowLength="18" minFade="0.07" density="0.5" densityScale="0.5"/>
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="discEffect01LinkNode">
                <motionPathEffect textureFilename="$data/vehicles/alpego/maratonaMG300/discEffect01Array.dds" numRows="50" rowLength="18" minFade="0.07"/>
            </effectNode>
        </effect>

        <particle>
            <node node="smokeEmitter" refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="2.5"/>
        </particle>
    </workParticles>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack"/>
        <collisionTrigger node="aiCollisionNode" width="3.1" height="1.6"/>
        <needsLowering value="true"/>
        <agentAttachment width="3.1" height="1.5" length="2.1" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.55" maxX="1.55" minZ="-1.05" maxZ="0.95" yOffset="0.4" />
    </foliageBending>

    <baseMaterial>
        <material name="maratonaMG300_mat" baseNode="maratonaMG300_vis">
            <shaderParameter name="colorMat0" value="ALPEGO_ORANGE1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="maratonaMG300_main_component1" node="0>" />
        <i3dMapping id="maratonaMG300_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="supportCol" node="0>0|0|2" />
        <i3dMapping id="wheelLeft" node="0>0|1|0" />
        <i3dMapping id="wheelCenter" node="0>0|1|1" />
        <i3dMapping id="rollerArm01Ref" node="0>0|1|1|0" />
        <i3dMapping id="wheelRight" node="0>0|1|2" />
        <i3dMapping id="rollerArm01RefFrame" node="0>0|2|0" />
        <i3dMapping id="rollerArm01" node="0>0|2|0|0" />
        <i3dMapping id="rollerArm03Ref" node="0>0|2|0|0|0" />
        <i3dMapping id="rollerArm02RefFrame" node="0>0|2|1" />
        <i3dMapping id="rollerArm02" node="0>0|2|1|0" />
        <i3dMapping id="rollerArm03" node="0>0|2|1|0|0" />
        <i3dMapping id="roll" node="0>0|2|1|0|0|0" />
        <i3dMapping id="rollerEffect01LinkNode" node="0>0|2|1|0|0|1" />
        <i3dMapping id="maratonaMG300Discs" node="0>0|2|2" />
        <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="groundReferenceNode" node="0>0|3|3" />
        <i3dMapping id="depthNode" node="0>0|3|4" />
        <i3dMapping id="aiMarkerLeft" node="0>0|4|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|4|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|4|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|4|3" />
        <i3dMapping id="sizeMarkerRight" node="0>0|4|4" />
        <i3dMapping id="sizeMarkerBack" node="0>0|4|5" />
        <i3dMapping id="aiCollisionNode" node="0>0|4|6" />
        <i3dMapping id="smokeEmitter" node="0>0|5|0" />
        <i3dMapping id="discEffect01LinkNode" node="0>0|5|1" />
    </i3dMappings>
</vehicle>
