﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="implementDynamicMountAttacher" 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>$l10n_shopItem_telehandlerBaleFork</name>
        <specs>
            <combination filterCategory="wheelLoaderVehicles" />
        </specs>
        <functions>
            <function>$l10n_function_frontloaderBaleFork</function>
        </functions>
        <image>$data/vehicles/mcCormack/baleGrab/store_baleGrab.png</image>
        <price>5900</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>MCCORMACK</brand>
        <category>wheelLoaderTools</category>
        <shopHeight>2.8</shopHeight>
        <shopTranslationOffset>0 -0.041 0</shopTranslationOffset>
        <shopRotationOffset>-6.423 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>312832</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>55040</indexBufferMemoryUsage>
        <textureMemoryUsage>655360</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>$data/vehicles/mcCormack/baleGrab/baleGrab.i3d</filename>
        <size width="3" length="2.5"/>
        <components>
            <component centerOfMass="0 0.1 0" solverIterationCount="20" mass="400" />
            <component solverIterationCount="15" mass="100" />
            <component solverIterationCount="15" mass="100" />
            <joint component1="1" component2="2" node="leftArmJoint" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 180 0" rotLimitDamping="0 10 0" rotLimitForceLimit="-1 10 -1" />
            <joint component1="1" component2="3" node="rightArmJoint" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 180 0" rotLimitDamping="0 10 0" rotLimitForceLimit="-1 10 -1" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="wheelLoader" />
        </inputAttacherJoints>
    </attachable>

    <dynamicMountAttacher node="baleGrad_main_component1" mountType="AUTO_ATTACH_XYZ" forceLimitScale="250">
        <mountCollisionMask node="tineCollisionLeft"  triggerNode="dynamicMountTriggerLeft"  collisionMask="134225920" mountType="AUTO_ATTACH_XYZ"/>
        <mountCollisionMask node="tineCollisionRight" triggerNode="dynamicMountTriggerRight" collisionMask="134225920" mountType="AUTO_ATTACH_XYZ"/>
    </dynamicMountAttacher>

    <cylindered>
        <movingTools>
            <movingTool node="extension" playSound="true">
                <controls axis="AXIS_CRANE_TOOL" invertAxis="false" mouseSpeedFactor="0.15" iconName="SPRAYER_ARM_TRANSLATE_Y" />
                <translation transSpeed="0.5" transAcceleration="10" translationAxis="2" transMin="-0.172" transMax="0.153"/>
            </movingTool>
            <movingTool node="rightArmJoint" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.15" iconName="TOOL_OPEN_CLOSE" />
                <rotation rotationAxis="2" rotSpeed="70" rotAcceleration="250" rotMax="120" rotMin="0" />
                <componentJoint index="2" anchorActor="0" />
                <dependentMovingTool node="leftArmJoint" speedScale="-1" />
            </movingTool>
            <movingTool node="leftArmJoint" playSound="true">
                <rotation rotationAxis="2" rotSpeed="70" rotAcceleration="250" rotMax="0" rotMin="-120" />
                <componentJoint index="1" anchorActor="0" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="leftArm" referencePoint="leftArmRef" referenceFrame="leftArmRef" limitedAxis="2" isActiveDirty="true" maxUpdateDistance="100">
                <dependentPart node="leftArmHydraulic" />
            </movingPart>
            <movingPart node="rightArm" referencePoint="rightArmRef" referenceFrame="rightArmRef" limitedAxis="2" isActiveDirty="true" maxUpdateDistance="100">
                <dependentPart node="rightArmHydraulic" />
            </movingPart>
            <movingPart node="leftArmHydraulic" referencePoint="leftArmHydraulicRef" referenceFrame="leftArmHydraulicRef">
              <translatingPart node="leftArmHydraulicPunch" />
            </movingPart>
            <movingPart node="rightArmHydraulic" referencePoint="rightArmHydraulicRef" referenceFrame="rightArmHydraulicRef">
              <translatingPart node="rightArmHydraulicPunch" />
            </movingPart>
        </movingParts>
        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.6" volumeScale="1"   linkNode="extension"     actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="extension"/>
            <actionSound template="defaultHydraulicSound" pitchScale="1.2" volumeScale="1"   linkNode="rightArmJoint" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="rightArmJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.8" volumeScale="1"   linkNode="extension"     actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="extension"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.5" linkNode="extension"     actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="extension"/>
            <actionSound template="clackVar6"             pitchScale="0.8" volumeScale="1"   linkNode="extension"     actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="extension"/>
            <actionSound template="thudVar2"              pitchScale="1.8" volumeScale="2.5" linkNode="extension"     actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="extension"/>
            <actionSound template="clackVar6"             pitchScale="0.8" volumeScale="1"   linkNode="rightArmJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="rightArmJoint"/>
            <actionSound template="clackVar6"             pitchScale="1"   volumeScale="0.8" linkNode="rightArmJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="rightArmJoint"/>
            <actionSound template="sheetImp02"            pitchScale="0.8" volumeScale="2"   linkNode="rightArmJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="rightArmJoint"/>
        </sounds>
    </cylindered>

    <ai>
        <agentAttachment width="1.8" height="2.5" length="1.0" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.9" maxX="0.9" minZ="-0.3" maxZ="0.4" yOffset="0.02" />
    </foliageBending>

    <baseMaterial>
        <material name="baleGrab_mat" baseNode="baleGrab_vis">
            <shaderParameter name="colorMat0" value="MCCORMACK_YELLOW1"/>
            <shaderParameter name="colorMat1" value="MCCORMACK_RED1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="3" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="baleGrad_main_component1" node="0>" />
        <i3dMapping id="baleGrab_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="leftArm" node="0>0|1|0" />
        <i3dMapping id="leftArmHydraulicRef" node="0>0|1|0|0" />
        <i3dMapping id="leftArmHydraulic" node="0>0|1|1" />
        <i3dMapping id="leftArmHydraulicPunch" node="0>0|1|1|0" />
        <i3dMapping id="rightArm" node="0>0|1|2" />
        <i3dMapping id="rightArmHydraulicRef" node="0>0|1|2|0" />
        <i3dMapping id="rightArmHydraulic" node="0>0|1|3" />
        <i3dMapping id="rightArmHydraulicPunch" node="0>0|1|3|0" />
        <i3dMapping id="extension" node="0>0|1|4" />
        <i3dMapping id="leftArmJoint" node="0>0|2" />
        <i3dMapping id="rightArmJoint" node="0>0|3" />
        <i3dMapping id="baleGrad_leftArm_component2" node="1>" />
        <i3dMapping id="leftArmRef" node="1>0" />
        <i3dMapping id="dynamicMountTriggerLeft" node="1>1" />
        <i3dMapping id="tineCollisionLeft" node="1>2" />
        <i3dMapping id="baleGrad_rightArm_component3" node="2>" />
        <i3dMapping id="rightArmRef" node="2>0" />
        <i3dMapping id="dynamicMountTriggerRight" node="2>1" />
        <i3dMapping id="tineCollisionRight" node="2>2" />
    </i3dMappings>
</vehicle>
