﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="dynamicMountAttacherShovel" 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_telehandlerManureFork</name>
        <specs>
            <combination filterCategory="teleLoaderVehicles" />
        </specs>
        <functions>
            <function>$l10n_function_frontloaderShovel</function>
        </functions>
        <image>$data/vehicles/magsi/telehandlerManureFork/store_magsiTelehandlerManureFork.png</image>
        <price>3400</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>MAGSI</brand>
        <category>teleLoaderTools</category>
        <shopTranslationOffset>0 -0.004 0</shopTranslationOffset>
        <shopRotationOffset>0.627 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>150272</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>30208</indexBufferMemoryUsage>
        <textureMemoryUsage>786432</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>$data/vehicles/magsi/telehandlerManureFork/telehandlerManureFork.i3d</filename>
        <size width="3.5" length="2"/>
        <components>
            <component centerOfMass="0 0.1 0" solverIterationCount="10" mass="470" />
            <component solverIterationCount="10" mass="150" />
            <joint component1="1" component2="2" node="grabJoint" rotLimit="0 0 0" transLimit="0 0 0" rotLimitSpring="300 0 0" rotLimitDamping="30 0 0" rotLimitForceLimit="10 -1 -1" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="telehandler" />
        </inputAttacherJoints>
    </attachable>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit shopDisplayUnit="LITER" fillTypeCategories="FORK" capacity="1760" >
                        <exactFillRootNode node="exactFillRootNode" />
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" maxAllowedHeapAngle="30" fillUnitIndex="1" maxSubDivEdgeLength="0.6" />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

        <loadInfos>
            <loadInfo>
                <node node="fillVolumeLoadNode" width="2.5" length="0.1" />
            </loadInfo>
        </loadInfos>

        <unloadInfos>
            <unloadInfo>
                <node node="fillVolumeUnloadNode" width="2.5" length="0.1" />
            </unloadInfo>
        </unloadInfos>
    </fillVolume>

    <cylindered>
        <movingTools>
            <movingTool node="grabJoint" playSound="true" >
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.2" iconName="TOOL_OPEN_CLOSE" />
                <componentJoint index="1" anchorActor="0" />
                <rotation rotSpeed="65" rotAcceleration="450" rotMax="0" rotMin="-80" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="grab" referencePoint="grabRef" referenceFrame="grabRef" limitedAxis="1" isActiveDirty="true" maxUpdateDistance="100">
                <dependentPart node="hydraulic" />
            </movingPart>
            <movingPart node="hydraulic" referencePoint="hydraulicRef" referenceFrame="hydraulicRef" >
                <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.9" volumeScale="1.4" linkNode="grabJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="grabJoint"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.5" linkNode="grabJoint" actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="grabJoint"/>
            <actionSound template="clackVar6"             pitchScale="0.6" volumeScale="1.7" linkNode="grabJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="grabJoint"/>
            <actionSound template="sheetImp02"            pitchScale="0.8" volumeScale="2"   linkNode="grabJoint" actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="grabJoint"/>
        </sounds>
    </cylindered>

    <dischargeable requiresTipOcclusionArea="false">
        <dischargeNode node="dischargeNode" fillUnitIndex="1" emptySpeed="1760" >
            <raycast node="dischargeNode" maxDistance="30" useWorldNegYDirection="true" yOffset="2"/>
            <info width="2.5" length="0.2" zOffset="0.5"/>
            <movingToolActivation node="grabJoint" isInverted="true" openFactor="0.4" />

            <effects>
                <effectNode effectClass="TipEffect">
                    <effectNode effectNode="emitterShape" effectClass="ParticleEffect" materialType="unloadingParticle"/>
                    <effectNode effectNode="grainEffect" materialType="unloading" fadeTime="0.5" alignXAxisToWorldY="true" />
                </effectNode>
                <effectNode effectNode="smokeEffect" materialType="unloadingSmoke" fadeTime="0.5" />
            </effects>
        </dischargeNode>
    </dischargeable>

    <shovel>
        <shovelNode node="pickUpNode" fillUnitIndex="1" loadInfoIndex="1" width="2.5" length="0.2" needsMovement="true" maxPickupAngle="105">
            <movingToolActivation node="grabJoint" isInverted="true" openFactor="0.4" />
        </shovelNode>
        <dischargeInfo node="dischargeNode" minSpeedAngle="105" maxSpeedAngle="130" />
    </shovel>

    <dynamicMountAttacher node="telehandlerManureFork_main_component1">
        <mountCollisionMask node="colPartBalesBack" collisionMask="134225920" />
        <mountCollisionMask node="grabColPart" collisionMask="134225920" />
        <grab openMountType="TYPE_FORK" closedMountType="TYPE_AUTO_ATTACH_XYZ">
            <movingToolActivation node="grabJoint" isInverted="true" openFactor="0.4" />
        </grab>
    </dynamicMountAttacher>

    <ai>
        <agentAttachment width="2.8" height="1.5" length="1.5" lengthOffset="0"/>
    </ai>

    <baseMaterial>
        <material name="telehandlerManureFork_mat" baseNode="telehandlerManureFork_vis">
            <shaderParameter name="colorMat0" value="MAGSI_BLACK1"/>
        </material>
    </baseMaterial>

    <foliageBending>
        <bendingNode minX="-1.35" maxX="1.35" minZ="-0.55" maxZ="0.6" yOffset="0.03" />
    </foliageBending>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="telehandlerManureFork_main_component1" node="0>" />
        <i3dMapping id="telehandlerManureFork_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="grabJoint" node="0>0|1" />
        <i3dMapping id="grab" node="0>0|2" />
        <i3dMapping id="hydraulicRef" node="0>0|2|0" />
        <i3dMapping id="hydraulic" node="0>0|3" />
        <i3dMapping id="hydraulicPunch" node="0>0|3|0" />
        <i3dMapping id="fillVolume" node="0>0|4|0" />
        <i3dMapping id="fillVolumeLoadNode" node="0>0|4|1" />
        <i3dMapping id="fillVolumeUnloadNode" node="0>0|4|2" />
        <i3dMapping id="exactFillRootNode" node="0>0|4|3" />
        <i3dMapping id="dischargeNode" node="0>0|5" />
        <i3dMapping id="emitterShape" node="0>0|6" />
        <i3dMapping id="grainEffect" node="0>0|7|0" />
        <i3dMapping id="smokeEffect" node="0>0|7|1" />
        <i3dMapping id="pickUpNode" node="0>0|8" />
        <i3dMapping id="colPartBales" node="0>1|0" />
        <i3dMapping id="colPartBalesBack" node="0>1|1" />
        <i3dMapping id="grabRef" node="1>0" />
        <i3dMapping id="grabColPart" node="1>1|0" />
    </i3dMappings>
</vehicle>
