﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="mower" 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>F 240</name>
        <specs>
            <neededPower>40</neededPower>
            <workingWidth>2.4</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_mower</function>
        </functions>
        <storePacks>
            <storePack>STARTER_GRASS</storePack>
        </storePacks>
        <image>$data/vehicles/seppKnusel/f240/store_f240.png</image>
        <price>12000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>SEPPKNUSEL</brand>
        <category>mowers</category>
        <shopFoldingState>1</shopFoldingState>
        <shopTranslationOffset>0 0 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>673792</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>114432</indexBufferMemoryUsage>
        <textureMemoryUsage>1245184</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_mower</typeDesc>
        <filename>$data/vehicles/seppKnusel/f240/f240.i3d</filename>
        <size width="3.2" length="1.5" lengthOffset="0.1" />
        <speedLimit value="20" />
        <components>
            <component centerOfMass="0 0.2 0" solverIterationCount="10" mass="440" />
            <component centerOfMass="0 0 0.2" solverIterationCount="10" mass="200" />
            <joint component1="1" component2="2" node="componentJointAttacher" rotLimit="0 0 0" rotLimitSpring="0 0 4000" rotLimitDamping="0 0 2" maxRotDriveForce="0 0 2" rotDriveRotation="0 0 0" rotDriveSpring="0 0 2" rotDriveDamping="0 0 2" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <powerConsumer ptoRpm="470" neededMinPtoPower="10" neededMaxPtoPower="15"/>

    <groundReferenceNodes>
        <groundReferenceNode node="groundRefNode" threshold="0.2" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="mower" functionName="processMowerArea" disableBackwards="false" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
            <mower dropWindrow="true" dropAreaIndex="2" />
            <onlyActiveWhenLowered value="true"/>
        </workArea>

        <workArea type="auxiliary" >
            <area startNode="dropAreaStart" widthNode="dropAreaWidth" heightNode="dropAreaHeight" />
        </workArea>
    </workAreas>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" rootNode="f240_attacher_component2" jointType="implement" topReferenceNode="topReferenceNode" upperRotationOffset="10" lowerRotLimitScale="0 0 0" lowerTransLimitScale="0 1 0">
                <distanceToGround lower="0.35" upper="1.0" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <lowerAnimation name="lowerAnimation"/>
    </attachable>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" />
    </powerTakeOffs>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="1" turnOnFoldMaxLimit="0.1" turnOnFoldMinLimit="0" >
                    <foldingPart animationName="folding" speedScale="1" />
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <cylindered>
        <movingTools>
            <movingTool node="flapLeft" playSound="false">
              <dependentPart node="flapLeftDamper" />
            </movingTool>
            <movingTool node="flapRight" playSound="false">
              <dependentPart node="flapRightDamper" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="flapLeftDamper" referencePoint="flapLeftDamperRef" referenceFrame="flapLeftDamperRef">
              <translatingPart node="flapLeftDamperPunch" />
            </movingPart>
            <movingPart node="flapRightDamper" referencePoint="flapRightDamperRef" referenceFrame="flapRightDamperRef">
              <translatingPart node="flapRightDamperPunch" />
            </movingPart>
            <movingPart node="attacherBlock" referencePoint="attacherBlockRef" referenceFrame="attacherBlockRefFrame" isActiveDirty="true" maxUpdateDistance="50" limitedAxis="1"/>
        </movingParts>

        <sounds>
            <hydraulic template="MOVING_PART_SOUND" linkNode="f240_main_component1"/>
        </sounds>
    </cylindered>

    <animations>
        <animation name="folding">
            <part node="flapLeft" startTime="0" endTime="1.2" startRot="0 0 0" endRot="0 0 138"/>
            <part node="flapLeftSupportJoint" startTime="0.0" endTime="1.2"  startTrans="0.0 -0.562 0.0" endTrans="-0.173 -0.221 0.0" startRot="0.0 0.0 0.0" endRot="0.0 0.0 -29.852" />
            <part node="flapRight" startTime="1.2" endTime="2.5" startRot="0 0 0" endRot="0 0 -138"/>
            <part node="flapRightSupportJoint" startTime="1.2" endTime="2.5"  startTrans="0.0 -0.562 0.0" endTrans="0.189 -0.221 0.0" startRot="0.0 0.0 0.0" endRot="0.0 0.0 30.698" />

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="1.24" volumeScale="1.3" pitchScale="1.5" />
            <sound template="defaultHydraulicSound" startTime="1.25" endTime="2.44" volumeScale="1.3" pitchScale="1.5" />
            <sound template="clackVar6"             startTime="0.01"                volumeScale="0.9" pitchScale="0.9" />
            <sound template="sheetImp02"            startTime="0.01"                volumeScale="1.2" pitchScale="1.3" />
            <sound template="clackVar6"             startTime="1.24"                volumeScale="0.9" pitchScale="0.9" />
            <sound template="sheetImp02"            startTime="1.24"                volumeScale="1.3" pitchScale="1.4" />
            <sound template="clackVar6"             startTime="2.44" direction="1"  volumeScale="1.3" pitchScale="1.2" />
            <sound template="sheetImp02"            startTime="2.44" direction="1"  volumeScale="1.5" pitchScale="1.2" />
        </animation>
        <animation name="moveSupport">
            <part componentJointIndex="1" requiredAnimation="lowerAnimation" requiredAnimationRange="0.99 1" startTime="0" endTime="0.5" startRotLimit="0 0 10" endRotLimit="0 0 0" />

            <sound template="clackVar5" startTime="0.09" direction="-1" volumeScale="0.7" pitchScale="1.9" linkNode="attacherJoint"/>
        </animation>
        <animation name="lowerAnimation">
            <part componentJointIndex="1" startTime="0.5" endTime="1" startRotLimit="0 0 0" endRotLimit="0 0 10" />
        </animation>
    </animations>

    <mower fruitTypeConverter="MOWER">
        <animationNodes>
            <animationNode node="drum01" rotSpeed="2000"  rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum02" rotSpeed="-2000" rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum03" rotSpeed="2000"  rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
            <animationNode node="drum04" rotSpeed="-2000" rotAxis="2" turnOnFadeTime="3" turnOffFadeTime="5"/>
        </animationNodes>

        <dropEffects>
            <dropEffect workAreaIndex="1" dropAreaIndex="2">
                <effectNode effectClass="TypedMotionPathEffect" effectType="MOWER" linkNode="mowerEffectNode">
                    <motionPathEffect textureFilename="$data/vehicles/seppKnusel/f240/mowerEffectArray.dds" numRows="6" rowLength="11" minFade="0.15" shapeScale="1" maxShapeScale="1.3"/>
                </effectNode>
                <effectNode effectNode="smokeEmitter" effectClass="ParticleEffect" particleType="smoke" materialType="smokeParticle" worldSpace="false" emitCountScale="0.25"/>
            </dropEffect>
        </dropEffects>
        <sounds>
            <cut template="grassCut" linkNode="f240_main_component1" volumeScale="0.7"/>
        </sounds>
    </mower>

    <windBending>
        <windBendingNodes>
            <windBendingNode node="coversCenter"  maxBending="0.10" maxBendingSpeed="20"/>
            <windBendingNode node="coversSkinned" maxBending="0.10" maxBendingSpeed="20"/>
        </windBendingNodes>
    </windBending>

    <turnOnVehicle turnOffIfNotAllowed="true">
        <sounds>
            <start template="DEFAULT_MOWER_START_SHORT" linkNode="f240_main_component1" />
            <stop template="DEFAULT_MOWER_STOP"         linkNode="f240_main_component1" />
            <work template="DEFAULT_MOWER_WORK"         linkNode="f240_main_component1" />
        </sounds>
    </turnOnVehicle>

    <ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="2.9" height="1.2"/>
        <agentAttachment width="2.3" height="1.2" length="1.2" lengthOffset="0.15"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.4" maxX="1.4" minZ="-0.373" maxZ="0.7" yOffset="0.2"/>
    </foliageBending>

    <baseMaterial>
        <material name="f240_mat" baseNode="f240_vis">
            <shaderParameter name="colorMat0" value="SEPPKNUSEL_YELLOW1"/>
            <shaderParameter name="colorMat1" value="SEPPKNUSEL_RED1"/>
            <shaderParameter name="colorMat2" value="SEPPKNUSEL_GREY1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="f240_main_component1" node="0>" />
        <i3dMapping id="f240_vis" node="0>0" />
        <i3dMapping id="componentJointAttacher" node="0>0|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|0|1" />
        <i3dMapping id="drum01" node="0>0|1|0|0|0" />
        <i3dMapping id="drum02" node="0>0|1|0|1|0" />
        <i3dMapping id="drum03" node="0>0|1|0|2|0" />
        <i3dMapping id="drum04" node="0>0|1|0|3|0" />
        <i3dMapping id="flapLeft" node="0>0|1|1" />
        <i3dMapping id="flapLeftDamperRef" node="0>0|1|1|0" />
        <i3dMapping id="flapLeftSupportJoint" node="0>0|1|1|4" />
        <i3dMapping id="flapRight" node="0>0|1|2" />
        <i3dMapping id="flapRightDamperRef" node="0>0|1|2|0" />
        <i3dMapping id="flapRightSupportJoint" node="0>0|1|2|4" />
        <i3dMapping id="flapLeftDamper" node="0>0|1|3" />
        <i3dMapping id="flapLeftDamperPunch" node="0>0|1|3|0" />
        <i3dMapping id="flapRightDamper" node="0>0|1|4" />
        <i3dMapping id="flapRightDamperPunch" node="0>0|1|4|0" />
        <i3dMapping id="attacherBlockRefFrame" node="0>0|1|5" />
        <i3dMapping id="attacherBlock" node="0>0|1|5|0" />
        <i3dMapping id="workAreaStart" node="0>0|2|0" />
        <i3dMapping id="workAreaWidth" node="0>0|2|1" />
        <i3dMapping id="workAreaHeight" node="0>0|2|2" />
        <i3dMapping id="dropAreaStart" node="0>0|2|3" />
        <i3dMapping id="dropAreaWidth" node="0>0|2|4" />
        <i3dMapping id="dropAreaHeight" node="0>0|2|5" />
        <i3dMapping id="groundRefNode" node="0>0|2|6" />
        <i3dMapping id="mowerEffectNode" node="0>0|3|0" />
        <i3dMapping id="smokeEmitter" node="0>0|3|1" />
        <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="aiCollisionNode" node="0>0|4|3" />
        <i3dMapping id="coversCenter" node="0>0|5|0" />
        <i3dMapping id="coversSkinned" node="0>1|0" />
        <i3dMapping id="f240_attacher_component2" node="1>" />
        <i3dMapping id="attacherJoint" node="1>0" />
        <i3dMapping id="topReferenceNode" node="1>1" />
        <i3dMapping id="attacherBlockRef" node="1>2" />
    </i3dMappings>
</vehicle>
