﻿<?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_skidSteerManureFork</name>
        <specs>
            <combination filterCategory="skidSteerVehicles"/>
        </specs>
        <functions>
            <function>$l10n_function_frontloaderShovel</function>
        </functions>
        <image>$data/vehicles/paladin/manureFork/store_manureFork.png</image>
        <price>2100</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>PALADIN</brand>
        <category>skidSteerTools</category>
        <shopRotationOffset>-1.163 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>216064</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>41472</indexBufferMemoryUsage>
        <textureMemoryUsage>917504</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>$data/vehicles/paladin/manureFork/manureFork.i3d</filename>
        <size width="1.8" length="1.2"/>
        <components>
            <component centerOfMass="0 0.3 0" solverIterationCount="10" mass="350" />
            <component solverIterationCount="10" mass="134" />
            <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="skidSteer" />
        </inputAttacherJoints>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="1.0" diameter="0.016" straighteningFactor="2" isTwoPointHose="true" color="0.02 0.02 0.02 1">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1.0" diameter="0.016" straighteningFactor="2" isTwoPointHose="true" color="0.02 0.02 0.02 1">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypeCategories="fork" capacity="710" >
                        <exactFillRootNode node="exactFillRootNode" />
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" fillUnitIndex="1" maxSubDivEdgeLength="0.2" maxAllowedHeapAngle="45"/>
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

        <loadInfos>
            <loadInfo>
                <node node="fillVolumeLoadNode" width="1.5" length="0.1" />
            </loadInfo>
        </loadInfos>

        <unloadInfos>
            <unloadInfo>
                <node node="fillVolumeUnloadNode" width="2" length="2" />
            </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="60" rotAcceleration="350" rotMax="0" rotMin="-80"/>
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="grab" referencePoint="grabRef" referenceFrame="grabRef" limitedAxis="1" isActiveDirty="true" maxUpdateDistance="200">
                <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="1400" >
            <raycast node="dischargeNode" maxDistance="30" useWorldNegYDirection="true" yOffset="2"/>
            <info width="1.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="1.5" length="0.2" needsMovement="true" maxPickupAngle="105">
            <movingToolActivation node="grabJoint" isInverted="true" openFactor="0.4" />
        </shovelNode>
        <dischargeInfo node="dischargeNode" minSpeedAngle="105" maxSpeedAngle="180" />
    </shovel>

    <dynamicMountAttacher node="0>">
        <mountCollisionMask node="backColPart" collisionMask="134225920" />
        <mountCollisionMask node="topColPart" collisionMask="134225920" />
        <grab openMountType="TYPE_FORK" closedMountType="TYPE_AUTO_ATTACH_XYZ">
            <movingToolActivation node="grabJoint" isInverted="true" openFactor="0.4" />
        </grab>
    </dynamicMountAttacher>

    <ai>
        <agentAttachment width="1.5" height="0.7" length="1" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.75" maxX="0.75" minZ="-0.4" maxZ="0.4" yOffset="0.02" />
    </foliageBending>

    <baseMaterial>
        <material name="manureFork_mat" baseNode="manureFork_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="manureFork_mat" shaderParameter="colorMat0" />
    </baseMaterialConfigurations>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="manureFork_main_component1" node="0>" />
        <i3dMapping id="manureFork_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="hydraulicIn01" node="0>0|3|2" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|3|2|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|3|3" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|3|3|0" />
        <i3dMapping id="dischargeNode" node="0>0|4" />
        <i3dMapping id="exactFillRootNode" node="0>0|5" />
        <i3dMapping id="fillVolume" node="0>0|6|0" />
        <i3dMapping id="fillVolumeLoadNode" node="0>0|6|1" />
        <i3dMapping id="fillVolumeUnloadNode" node="0>0|6|2" />
        <i3dMapping id="emitterShape" node="0>0|7" />
        <i3dMapping id="effectNodeRot" node="0>0|8" />
        <i3dMapping id="grainEffect" node="0>0|8|0" />
        <i3dMapping id="smokeEffect" node="0>0|8|1" />
        <i3dMapping id="pickUpNode" node="0>0|9" />
        <i3dMapping id="backColPart" node="0>1" />
        <i3dMapping id="manureFork_grab_component2" node="1>" />
        <i3dMapping id="grabRef" node="1>0" />
        <i3dMapping id="topColPart" node="1>1" />
    </i3dMappings>
</vehicle>
