﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="baleGrab" 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_telehandlerBaleGrab</name>
        <specs>
            <combination filterCategory="skidSteerVehicles"/>
        </specs>
        <functions>
            <function>$l10n_function_frontloaderBaleFork</function>
        </functions>
        <image>$data/vehicles/paladin/baleHugger/store_baleHugger.png</image>
        <price>1700</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>PALADIN</brand>
        <category>skidSteerTools</category>
        <shopTranslationOffset>0 0.03 0</shopTranslationOffset>
        <shopRotationOffset>2.778 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>283392</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>54016</indexBufferMemoryUsage>
        <textureMemoryUsage>917504</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>$data/vehicles/paladin/baleHugger/baleHugger.i3d</filename>
        <size width="1.8" length="1.6" lengthOffset="0.4"/>
        <supportsPickUp>false</supportsPickUp>
        <components>
            <component centerOfMass="0 0.2 0" solverIterationCount="20" mass="125" />
            <component solverIterationCount="15" mass="50" />
            <component solverIterationCount="15" mass="50" />
            <joint component1="1" component2="2" node="leftGrabJoint" 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="rightGrabJoint" 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="skidSteer" />
        </inputAttacherJoints>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="0.8" diameter="0.02" straighteningFactor="2">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="0.8" diameter="0.02" straighteningFactor="2">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <baleGrab triggerNode="dynamicMountTrigger" rootNode="0>" jointNode="dynamicMountTrigger" jointType="TYPE_AUTO_ATTACH_XYZ" forceAcceleration="90" grabRefComponentJointIndex1="0" grabRefComponentJointIndex2="1" rotDiffThreshold1="4" rotDiffThreshold2="-4" />

    <cylindered>
        <movingTools>
            <movingTool node="rightGrabJoint" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.2" iconName="TOOL_OPEN_CLOSE" />
                <rotation rotationAxis="2" rotSpeed="60" rotAcceleration="250" rotMax="0" rotMin="-80" />
                <componentJoint index="2" anchorActor="0" />
                <dependentMovingTool node="leftGrabJoint" speedScale="-1" />
            </movingTool>
            <movingTool node="leftGrabJoint" playSound="true">
                <rotation rotationAxis="2" rotSpeed="60" rotAcceleration="250" rotMax="80" rotMin="0" />
                <componentJoint index="1" anchorActor="0" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="leftGrabArm" referencePoint="leftGrabArmRef" referenceFrame="leftGrabArmRef" limitedAxis="2" isActiveDirty="true" maxUpdateDistance="200">
                <dependentPart node="hydraulicPunch" />
            </movingPart>
            <movingPart node="rightGrabArm" referencePoint="rightGrabArmRef" referenceFrame="rightGrabArmRef" limitedAxis="2" isActiveDirty="true" maxUpdateDistance="200">
                <dependentPart node="hydraulicPunch" />
            </movingPart>
            <movingPart node="hydraulic" referencePoint="hydraulicRef" referenceFrame="hydraulicRef" isActiveDirty="true" maxUpdateDistance="75">
                <translatingPart node="hydraulicPunch" />
            </movingPart>
        </movingParts>

        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.6" volumeScale="2"   linkNode="leftGrabJoint"  actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG"     nodes="leftGrabJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="1.4" linkNode="rightGrabJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="rightGrabJoint"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.5" linkNode="rightGrabJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="rightGrabJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.7" linkNode="rightGrabJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="rightGrabJoint"/>
            <actionSound template="sheetImp02"            pitchScale="0.8" volumeScale="2"   linkNode="rightGrabJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="rightGrabJoint"/>
        </sounds>
    </cylindered>

    <ai>
        <agentAttachment width="1.2" height="1.0" length="1.6" lengthOffset="0.4"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.65" maxX="0.65" minZ="-0.3" maxZ="0" yOffset="0.02" />
    </foliageBending>

    <baseMaterial>
        <material name="baleHugger_mat" baseNode="baleHugger_vis">
            <shaderParameter name="colorMat0" value="PALADIN_GREY"/>
        </material>
    </baseMaterial>

    <baseMaterialConfigurations useDefaultColors="false">
        <baseMaterialConfiguration name="$l10n_ui_colorGrey" color="PALADIN_GREY"/>
        <baseMaterialConfiguration name="$l10n_ui_colorRed" color="PALADIN_RED" price="100"/>
        <material name="baleHugger_mat" shaderParameter="colorMat0" />
    </baseMaterialConfigurations>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="2" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="baleHugger_main_component1" node="0>" />
        <i3dMapping id="baleHugger_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="hydraulicIn01" node="0>0|1|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|1|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|1|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|1|1|0" />
        <i3dMapping id="leftGrabJoint" node="0>0|2" />
        <i3dMapping id="rightGrabJoint" node="0>0|3" />
        <i3dMapping id="leftGrabArm" node="0>0|4|0" />
        <i3dMapping id="hydraulicRef" node="0>0|4|0|0" />
        <i3dMapping id="rightGrabArm" node="0>0|5|0" />
        <i3dMapping id="hydraulic" node="0>0|5|0|0" />
        <i3dMapping id="hydraulicPunch" node="0>0|5|0|0|0" />
        <i3dMapping id="dynamicMountTrigger" node="0>0|6" />
        <i3dMapping id="baleHugger_DECAL" node="0>0|7|0" />
        <i3dMapping id="skinning" node="0>1|0" />
        <i3dMapping id="baleHugger_leftGrab_component2" node="1>" />
        <i3dMapping id="leftGrabArmRef" node="1>0" />
        <i3dMapping id="baleHugger_rightGrab_component3" node="2>" />
        <i3dMapping id="rightGrabArmRef" node="2>0" />
    </i3dMappings>
</vehicle>
