﻿<?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>Cotton Wheelie Grab</name>
        <specs>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="1100" filterSpecMax="1100"/>
            <combination filterCategory="tractorsL" />
            <capacity unitTextOverride="$l10n_unit_bale">1</capacity>
        </specs>
        <functions>
            <function>$l10n_function_frontloaderBaleFork</function>
        </functions>
        <image>$data/vehicles/mcCormack/wheelieGrab/store_wheelieGrab.png</image>
        <price>12500</price>
        <rotation>180</rotation>
        <lifetime>600</lifetime>
        <brand>MCCORMACK</brand>
        <category>cottonHarvesting</category>
        <shopHeight>3.5</shopHeight>
        <shopTranslationOffset>0 0.027 -1</shopTranslationOffset>
        <shopRotationOffset>0 180 0</shopRotationOffset>
        <vertexBufferMemoryUsage>333056</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>62208</indexBufferMemoryUsage>
        <textureMemoryUsage>2293760</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>Cotton Wheelie Grab</typeDesc>
        <filename>$data/vehicles/mcCormack/wheelieGrab/wheelieGrab.i3d</filename>
        <size width="2.5" length="3" lengthOffset="0.7"/>
        <components>
            <component centerOfMass="0 0.2 0.5" solverIterationCount="10" mass="500" />
            <component solverIterationCount="10" mass="200" />
            <joint component1="1" component2="2" node="componentJoint" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="0 300 0" rotLimitDamping="0 30 0" rotLimitForceLimit="-1 20 -1" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <dynamicallyLoadedWheels>
            <dynamicallyLoadedWheel linkNode="wheel01Vis" filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="false" color="0.294 0.294 0.294" />
            <dynamicallyLoadedWheel linkNode="wheel02Vis" filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="true"  color="0.294 0.294 0.294" />
            <dynamicallyLoadedWheel linkNode="wheel03Vis" filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="false" color="0.294 0.294 0.294" />
            <dynamicallyLoadedWheel linkNode="wheel04Vis" filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="true"  color="0.294 0.294 0.294" />
        </dynamicallyLoadedWheels>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0 material="18">SHARED_WHITE1</color0>
            <hub linkNode="wheel01Vis" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.1 0.125 0.125" offset="-0.019"/>
            <hub linkNode="wheel02Vis" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true"  scale="0.1 0.125 0.125" offset="-0.019"/>
            <hub linkNode="wheel03Vis" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true"  scale="0.1 0.125 0.125" offset="-0.019"/>
            <hub linkNode="wheel04Vis" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.1 0.125 0.125" offset="-0.019"/>
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" isControllable="true" lowerRotLimitScale="0 0 0" upperRotLimitScale="0 0 0" lowerTransLimitScale="0 0 0" upperTransLimitScale="0 0 0" upperRotationOffset="0" jointType="implement" topReferenceNode="topReferenceNode">
                <distanceToGround lower="0.33" upper="1.2" />
            </inputAttacherJoint>
        </inputAttacherJoints>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="1" diameter="0.015" straighteningFactor="1.5">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1" diameter="0.015" straighteningFactor="1.5">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn01_connector"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut01_connector" filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <baleGrab triggerNode="dynamicMountTrigger" rootNode="0>" jointNode="dynamicMountTrigger" jointType="TYPE_AUTO_ATTACH_XYZ" forceAcceleration="90" grabRefComponentJointIndex1="0" rotDiffThreshold1="4"/>

    <cylindered>
        <movingTools>
            <movingTool node="componentJoint" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" mouseSpeedFactor="0.2" iconName="TOOL_OPEN_CLOSE" />
                <rotation rotationAxis="2" rotSpeed="35" rotAcceleration="350" rotMax="100" rotMin="0" />
                <dependentPart node="armHydraulic"/>
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="arm" referencePoint="armRef" referenceFrame="armRef" isActiveDirty="true" maxUpdateDistance="150">
                <componentJoint index="1" anchorActor="0" />
            </movingPart>
            <movingPart node="armHydraulic" referencePoint="armHydraulicRef" referenceFrame="armHydraulicRef" isActiveDirty="true" maxUpdateDistance="150">
                <translatingPart node="armHydraulicPunch" />
            </movingPart>
        </movingParts>

        <sounds>
            <actionSound template="hydraulicLayerTone" pitchScale="1.2" volumeScale="1"   linkNode="componentJoint" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="componentJoint"/>
            <actionSound template="clackVar6"          pitchScale="0.7" volumeScale="1.5" linkNode="componentJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="componentJoint"/>
            <actionSound template="cylinderPunch"      pitchScale="2"   volumeScale="0.3" linkNode="componentJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="componentJoint"/>
            <actionSound template="clackVar6"          pitchScale="0.8" volumeScale="1.5" linkNode="componentJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="componentJoint"/>
            <actionSound template="sheetImp02"         pitchScale="0.8" volumeScale="2"   linkNode="componentJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="componentJoint"/>
        </sounds>
    </cylindered>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="2" fieldMultiplier="2"/>

    <ai>
        <agentAttachment width="2.2" height="3" length="2.5" lengthOffset="0.85"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.05" maxX="1.05" minZ="-0.2" maxZ="1.15" yOffset="0.05"/>
        <bendingNode minX="-0.1" maxX="0.6" minZ="-0.3" maxZ="0.3" yOffset="-0.1" node="wheel01" />
        <bendingNode minX="-0.1" maxX="0.6" minZ="-0.3" maxZ="0.3" yOffset="-0.1" node="wheel04" />
    </foliageBending>

    <i3dMappings>
        <i3dMapping id="wheelieGrab_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|2|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|2|0|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|2|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|2|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|2|1|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|2|1|0|0" />
        <i3dMapping id="componentJoint" node="0>0|1|0" />
        <i3dMapping id="arm" node="0>0|2|0|0" />
        <i3dMapping id="armHydraulicRef" node="0>0|2|0|0|2" />
        <i3dMapping id="wheel01Vis" node="0>0|2|0|0|3" />
        <i3dMapping id="wheel02Vis" node="0>0|2|0|0|4" />
        <i3dMapping id="wheel03Vis" node="0>0|2|0|0|5" />
        <i3dMapping id="wheel04Vis" node="0>0|2|0|0|6" />
        <i3dMapping id="armHydraulic" node="0>0|2|1" />
        <i3dMapping id="armHydraulicPunch" node="0>0|2|1|0" />
        <i3dMapping id="dynamicMountTrigger" node="0>0|3" />
        <i3dMapping id="wheelieGrab_grab_component2" node="1>" />
        <i3dMapping id="armRef" node="1>0" />
        <i3dMapping id="wheel01" node="1>1|0" />
        <i3dMapping id="wheel02" node="1>1|1" />
        <i3dMapping id="wheel03" node="1>1|2" />
        <i3dMapping id="wheel04" node="1>1|3" />
    </i3dMappings>
</vehicle>
