﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="cultivator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://validation.gdn.giants-software.com/xml/fs22/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>TB-100</name>
        <specs>
            <neededPower>12</neededPower>
            <workingWidth>1</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_discHarrow</function>
        </functions>
        <image>$data/vehicles/salek/tb100/store_tb100.png</image>
        <price>1800</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>SALEK</brand>
        <category>discHarrows</category>
        <shopFoldingState>0</shopFoldingState>
        <shopTranslationOffset>0 -0.004 0</shopTranslationOffset>
        <shopRotationOffset>-0.001 0 0</shopRotationOffset>
        <shopHeight>1.5</shopHeight>
        <vertexBufferMemoryUsage>161536</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>31488</indexBufferMemoryUsage>
        <textureMemoryUsage>1376256</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_discHarrow</typeDesc>
        <filename>$data/vehicles/salek/tb100/tb100.i3d</filename>
        <size width="1.8" height="3" length="1.6" lengthOffset="-0.17"/>
        <speedLimit value="18" />
        <components>
            <component centerOfMass="0 0.15 -0.3" solverIterationCount="15" mass="70" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.11" repr="wheel"  radius="0.15" width="1" forcePointRatio="0.15" initialCompression="10" suspTravel="0.1" spring="2" damper="10"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <powerConsumer forceNode="tb100_main_component1" maxForce="0.2" />

    <speedRotatingParts>
        <speedRotatingPart node="rollerFront" radius="0.14" groundReferenceNodeIndex="1" onlyActiveWhenLowered="true"/>
        <speedRotatingPart node="rollerBack"  radius="0.14" groundReferenceNodeIndex="1" onlyActiveWhenLowered="true"/>
    </speedRotatingParts>

    <attachable>
        <inputAttacherJointConfigurations>
            <inputAttacherJointConfiguration name="$l10n_configuration_valueBig">
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerTransLimitScale="0 1 0" lowerRotationOffset="-2" upperRotationOffset="12" lowerRotLimitScale="0 0 0.3" forcedAttachingDirection="-1">
                <distanceToGround lower="0.35" upper="0.95" />
                </inputAttacherJoint>
                <objectChange node="wideConfiguration"   visibilityActive="true"  visibilityInactive="false"/>
                <objectChange node="narrowConfiguration" visibilityActive="false" visibilityInactive="true"/>
            </inputAttacherJointConfiguration>
            <inputAttacherJointConfiguration name="$l10n_configuration_valueSmall">
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerTransLimitScale="0 1 0" lowerRotationOffset="-2" upperRotationOffset="12" lowerRotLimitScale="0 0 0.3" forcedAttachingDirection="-1">
                <distanceToGround lower="0.35" upper="0.95" />
                </inputAttacherJoint>
                <objectChange node="wideConfiguration"   visibilityActive="false" visibilityInactive="false"/>
                <objectChange node="narrowConfiguration" visibilityActive="true"  visibilityInactive="true"/>
            </inputAttacherJointConfiguration>
        </inputAttacherJointConfigurations>

        <support animationName="moveSupport" />
    </attachable>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" forceFactor="1" threshold="0.2" depthNode="depthNode">
            <folding minLimit="0" maxLimit="0"/>
        </groundReferenceNode>
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cultivator" functionName="processCultivatorArea">
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight"/>
            <groundReferenceNode index="1"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>
    </workAreas>

    <workParticles>
        <effect workAreaIndex="1">
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="discEffectLinkNodeFront">
                <motionPathEffect textureFilename="$data/vehicles/salek/tb100/tb100_01Array.dds" numRows="20" rowLength="18" minFade="0.07"/>
            </effectNode>
            <effectNode effectClass="CultivatorMotionPathEffect" effectType="CULTIVATOR" linkNode="discEffectLinkNodeBack">
                <motionPathEffect textureFilename="$data/vehicles/salek/tb100/tb100_02Array.dds" numRows="20" rowLength="18" minFade="0.07"/>
            </effectNode>
        </effect>

        <particle>
            <node node="effectParticleSmokeEmit" refNodeIndex="1" particleType="SOIL_SMOKE" emitCountScale="2.5"/>
        </particle>
    </workParticles>

    <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="support_col"  startTime="0" endTime="0.5" startTrans="0 0.300 -0.209" endTrans="0 0.124 -0.209" />
            <part node="support_col1" startTime="0" endTime="0.5" startTrans="0 0.300 -0.851" endTrans="0 0.124 -0.851" />

            <sound template="clackVar6" startTime="0.49" direction="-1" volumeScale="1.2" pitchScale="1" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="1.1" height="0.9"/>
        <needsLowering value="true"/>
        <agentAttachment width="1.1" height="0.9" length="1.4" lengthOffset="-0.17"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.55" maxX="0.55" minZ="-0.85" maxZ="0.4" yOffset="0.25" />
    </foliageBending>

    <baseMaterial>
        <material name="tb100_mat" baseNode="tb100_vis">
            <shaderParameter name="colorMat0" value="SALEK_RED2"/>
            <shaderParameter name="colorMat1" value="SALEK_GREY1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90"  washDuration="1"   workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="tb100_main_component1" node="0>" />
        <i3dMapping id="tb100_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="support_col" node="0>0|0|2|0" />
        <i3dMapping id="support_col1" node="0>0|0|2|1" />
        <i3dMapping id="wheel" node="0>0|1|0" />
        <i3dMapping id="rollerFront" node="0>0|2|0|0" />
        <i3dMapping id="rollerBack" node="0>0|2|1|0" />
        <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="discEffectLinkNodeFront" node="0>0|4|0" />
        <i3dMapping id="effectParticleSmokeEmit" node="0>0|4|0|0" />
        <i3dMapping id="discEffectLinkNodeBack" node="0>0|4|1" />
        <i3dMapping id="aiMarkerLeft" node="0>0|5|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|5|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|5|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|5|3" />
        <i3dMapping id="wideConfiguration" node="0>0|6|0" />
        <i3dMapping id="narrowConfiguration" node="0>0|6|1" />
    </i3dMappings>
</vehicle>
