﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="shovelLeveler" 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_skidSteerHighDumpBucket</name>
        <specs>
            <combination filterCategory="skidSteerVehicles"/>
        </specs>
        <functions>
            <function>$l10n_function_frontloaderShovel</function>
        </functions>
        <image>$data/vehicles/paladin/highDumpBucket/store_highDumpBucket.png</image>
        <price>4000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>PALADIN</brand>
        <category>skidSteerTools</category>
        <shopTranslationOffset>0 0.003 0</shopTranslationOffset>
        <shopRotationOffset>-0.044 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>197632</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>37120</indexBufferMemoryUsage>
        <textureMemoryUsage>1769472</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>$data/vehicles/paladin/highDumpBucket/highDumpBucket.i3d</filename>
        <size width="3" length="1.5"/>
        <components>
            <component centerOfMass="0 0.08 -0.03" solverIterationCount="10" mass="612" />
        </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="3" isTwoPointHose="true"/>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="0.8" diameter="0.02" straighteningFactor="3" isTwoPointHose="true"/>
    </connectionHoses>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypeCategories="SHOVEL" capacity="1284"> <!-- width 96" -->
                        <exactFillRootNode node="exactFillRootNode" />
                    </fillUnit>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypeCategories="SHOVEL" capacity="10000" showInShop="false" showOnHud="false"/>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" allSidePlanes="true" maxAllowedHeapAngle="60" fillUnitIndex="1" />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

        <loadInfos>
            <loadInfo>
                <node node="fillVolumeLoadNode" width="1.1" length="0.1" />
            </loadInfo>
        </loadInfos>

        <unloadInfos>
            <unloadInfo>
                <node node="fillVolumeUnloadNode" width="1.1" length="0.1" />
            </unloadInfo>
        </unloadInfos>
    </fillVolume>

    <cylindered>
        <movingTools>
            <movingTool node="shovel" playSound="true" >
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseSpeedFactor="0.3" iconName="TOOL_OPEN_CLOSE" />
                <rotation rotSpeed="100" rotAcceleration="250" rotMax="90" rotMin="0"/>
                <dependentPart node="hydraulic" />
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="hydraulic" referencePoint="hydraulicRef" referenceFrame="hydraulicRef" >
                <translatingPart node="hydraulicPunch" />
            </movingPart>
        </movingParts>
        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.8" volumeScale="1"   linkNode="hydraulic" actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="hydraulic"/>
            <actionSound template="defaultHydraulicSound" pitchScale="1.2" volumeScale="1"   linkNode="shovel"    actionNames="TRANSLATING_POS TRANSLATING_NEG" nodes="shovel"/>
            <actionSound template="clackVar6"             pitchScale="0.8" volumeScale="1"   linkNode="shovel"    actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="shovel"/>
            <actionSound template="cylinderPunch"         pitchScale="1"   volumeScale="0.5" linkNode="shovel"    actionNames="TOOL_MOVE_END_POS_LIMIT"         nodes="shovel"/>
            <actionSound template="clackVar6"             pitchScale="0.8" volumeScale="1"   linkNode="shovel"    actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="shovel"/>
            <actionSound template="sheetImp02"            pitchScale="0.8" volumeScale="2"   linkNode="shovel"    actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="shovel"/>
            <actionSound template="thudVar2"              pitchScale="1.3" volumeScale="2.5" linkNode="shovel"    actionNames="TOOL_MOVE_END_NEG_LIMIT"         nodes="shovel"/>
        </sounds>
    </cylindered>

    <dischargeable requiresTipOcclusionArea="false">
        <dischargeNode node="dischargeNode" fillUnitIndex="1" emptySpeed="1284">
            <raycast node="dischargeNode" maxDistance="30" useWorldNegYDirection="true" yOffset="2"/>
            <info width="2.0" length="1" zOffset="0.5"/>

            <effects>
                <effectNode effectClass="TipEffect">
                    <effectNode effectNode="emitterShape" materialType="unloadingParticle" effectClass="ParticleEffect" lifespan="0.3"/>
                    <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.4" length="0.5" needsMovement="true" maxPickupAngle="100"/>
        <dischargeInfo node="dischargeNode" minSpeedAngle="100" maxSpeedAngle="130" />
    </shovel>

    <leveler fillUnitIndex="2" maxFillLevelPerMS="30">
        <levelerNode node="levelerNode" width="2.4" zOffset="0.9" minDropWidth="1.2" maxDropWidth="2.6" minDropDirOffset="1" maxDropDirOffset="1.5" minFillLevel="0.85">
            <smoothing allowed="true" radius="0.5" overlap="1.7" direction="0"/>
        </levelerNode>

        <pickUpDirection>1</pickUpDirection>
    </leveler>

    <suspensions>
        <suspension node="levelerNode" weight="150" minTranslation="0 -0.5 0.0" maxTranslation="0.0 0.5 0.0" suspensionParametersX="20 4" suspensionParametersY="1 1" suspensionParametersZ="20 4" serverOnly="true"/>
    </suspensions>

    <ai>
        <agentAttachment width="2.5" height="1.0" length="1.2" lengthOffset="0.1"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.23" maxX="1.23" minZ="-0.55" maxZ="0.65" yOffset="0.02" />
    </foliageBending>

    <baseMaterial>
        <material name="highDumpBucket_mat" baseNode="highDumpBucket_vis">
            <shaderParameter name="colorMat0" value="PALADIN_GREY" material="0"/>
        </material>
        <material name="highDumpBucketAlpha_mat" baseNode="alpha1">
            <shaderParameter name="colorMat0" value="PALADIN_GREY" material="0"/>
        </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="highDumpBucket_mat" shaderParameter="colorMat0" />
        <material name="highDumpBucketAlpha_mat" shaderParameter="colorMat0" />
    </baseMaterialConfigurations>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="highDumpBucket_main_component1" node="0>" />
        <i3dMapping id="highDumpBucket_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="shovel" node="0>0|1" />
        <i3dMapping id="hydraulicRef" node="0>0|1|0" />
        <i3dMapping id="dischargeNode" node="0>0|1|1" />
        <i3dMapping id="emitterShape" node="0>0|1|2" />
        <i3dMapping id="effectNodeRot" node="0>0|1|3" />
        <i3dMapping id="grainEffect" node="0>0|1|3|0" />
        <i3dMapping id="smokeEffect" node="0>0|1|3|1" />
        <i3dMapping id="pickUpNode" node="0>0|1|4" />
        <i3dMapping id="levelerNode" node="0>0|1|5" />
        <i3dMapping id="exactFillRootNode" node="0>0|1|6" />
        <i3dMapping id="fillVolume" node="0>0|1|7|0" />
        <i3dMapping id="fillVolumeLoadNode" node="0>0|1|7|1" />
        <i3dMapping id="fillVolumeUnloadNode" node="0>0|1|7|2" />
        <i3dMapping id="alpha1" node="0>0|1|8|0" />
        <i3dMapping id="hydraulic" node="0>0|2" />
        <i3dMapping id="hydraulicPunch" node="0>0|2|0" />
        <i3dMapping id="hydraulicIn01" node="0>0|3|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|3|1" />
    </i3dMappings>
</vehicle>
