﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="logGrab" 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_telehandlerLogFork</name>
        <specs>
            <combination filterCategory="teleLoaderVehicles" />
        </specs>
        <functions>
            <function>$l10n_function_frontloaderLogFork</function>
        </functions>
        <image>$data/vehicles/magsi/telehandlerLogFork/store_magsiTelehandlerLogFork.png</image>
        <price>3300</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>MAGSI</brand>
        <category>teleLoaderTools</category>
        <shopTranslationOffset>0 -0.011 0</shopTranslationOffset>
        <shopRotationOffset>-0.909 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>50944</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>9472</indexBufferMemoryUsage>
        <textureMemoryUsage>720896</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_telehandlerTool</typeDesc>
        <filename>$data/vehicles/magsi/telehandlerLogFork/telehandlerLogFork.i3d</filename>
        <size width="2.5" length="2"/>
        <components>
            <component centerOfMass="0 0.1 0" solverIterationCount="10" mass="140" />
            <component solverIterationCount="10" mass="450" />
            <joint component1="1" component2="2" node="grabJoint" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="300 0 0" rotLimitDamping="30 0 0" rotLimitForceLimit="30 -1 -1" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="telehandler" />
        </inputAttacherJoints>
    </attachable>

    <logGrab jointNode="0>" jointRoot="0>">
        <trigger node="dynamicMountTrigger" />
        <grab componentJoint="1" axis="3" rotationOffsetThreshold="10" rotationOffsetTime="1000"/>
    </logGrab>

    <cylindered>
        <movingTools>
            <movingTool node="grabJoint" playSound="true" >
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.3" iconName="TOOL_OPEN_CLOSE" />
                <rotation rotationAxis="1" rotSpeed="70" rotAcceleration="250" rotMax="25" rotMin="-70" />
                <componentJoint index="1" anchorActor="0" />
                <dependentPart node="grab" />
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="grab" referencePoint="grabRef" referenceFrame="grabJoint" limitedAxis="1" isActiveDirty="true" maxUpdateDistance="50">
                <dependentPart node="hydraulic" />
            </movingPart>
            <movingPart node="hydraulic" referencePoint="hydraulicRef" referenceFrame="hydraulicRefFrame" >
                <translatingPart node="hydraulicPunch" />
            </movingPart>
        </movingParts>
        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.6" volumeScale="2"   linkNode="grabJoint" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="grabJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.8" volumeScale="1"   linkNode="grabJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="grabJoint"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.2" linkNode="grabJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="grabJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1"   linkNode="grabJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="grabJoint"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.3" linkNode="grabJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="grabJoint"/>
        </sounds>
    </cylindered>

    <ai>
        <agentAttachment width="1.8" height="1.5" length="1.5" lengthOffset="0"/>
    </ai>

    <baseMaterial>
        <material name="telehandlerLogFork_mat" baseNode="telehandlerLogFork_vis">
            <shaderParameter name="colorMat0" value="MAGSI_BLACK1"/>
        </material>
    </baseMaterial>

    <foliageBending>
        <bendingNode minX="-0.6" maxX="0.6" minZ="-0.65" maxZ="-0.2" yOffset="0.03" />
    </foliageBending>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="2" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="telehandlerLogFork_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="grabJoint" node="0>0|1" />
        <i3dMapping id="hydraulicRefFrame" node="0>0|2" />
        <i3dMapping id="hydraulic" node="0>0|2|0" />
        <i3dMapping id="hydraulicPunch" node="0>0|2|0|0" />
        <i3dMapping id="grab" node="0>0|3" />
        <i3dMapping id="hydraulicRef" node="0>0|3|0" />
        <i3dMapping id="dynamicMountTrigger" node="0>0|4" />
        <i3dMapping id="grabRef" node="1>0" />
    </i3dMappings>
</vehicle>
