<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="foragePickup" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">


    <storeData>
        <name>$l10n_typeDesc_foragePickup</name>
        <specs>
            <neededPower>90</neededPower>
            <combination xmlFilename="$data/vehicles/rudolphSohn/tdk301RA/tdk301RA.xml"/>
            <combination xmlFilename="$data/vehicles/agco/weight1500/weight1500.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_foragePickup</function>
        </functions>
        <storePacks>
            <storePack>STARTER_GRASS</storePack>
        </storePacks>
        <rotation>0</rotation>
        <image>foragePickup/store_foragePickup.dds</image>
        <price>265000</price>
        <lifetime>600</lifetime>
        <brand>LIZARD</brand>
        <category>belts</category>
        <shopHeight>5</shopHeight>
        <shopTranslationOffset>0 0 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1341952</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>363008</indexBufferMemoryUsage>
        <textureMemoryUsage>4063232</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_foragePickup</typeDesc>
        <filename>foragePickup/foragePickup.i3d</filename>
        <size width="3.5" length="6.4" height="6" lengthOffset="2.3"/>
        <speedLimit value="25" />
        <components>
            <component centerOfMass="0 0.2 0.2" solverIterationCount="10" mass="1900"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT"/>
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerRotLimitScale="0 0 0">
                <distanceToGround lower="0.6" upper="1"/>
                <bottomArm categories="2" ballType="1"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydraulicIn01" length="0.8" diameter="0.015">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="0.8" diameter="0.015">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydraulicIn02" length="0.8" diameter="0.015">
            <objectChange node="hydraulicIn02_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="electric" node="electric" adapterNode="electric_detached" length="0.8" diameter="0.008">
            <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputNode="pto" inputAttacherJointIndices="1" aboveAttacher="true"/>
    </powerTakeOffs>

    <powerConsumer ptoRpm="470" neededMinPtoPower="35" neededMaxPtoPower="35"/>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm" startTime="0" endTime="0.2" startTrans="0 0.241 0" endTrans="0 0 0"/>
            <sound template="metalClose" startTime="0.01" direction="-1" volumeScale="0.7" pitchScale="2.8"/>
            <sound template="metalClose" startTime="0.18" direction="1" volumeScale="0.7" pitchScale="2.8"/>
            <sound template="clackVar1" startTime="0.1" direction="1" volumeScale="1.3" pitchScale="1.8"/>
            <sound template="clackVar1" startTime="0.18" direction="-1" volumeScale="1.3" pitchScale="1.8"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="sf4_arm" playSound="true">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseSpeedFactor="1" iconName="REEL_TRANSLATE_Y" />
                <rotation rotSpeed="12" rotAcceleration="100" rotMax="12" rotMin="-5" startRot="0"/>
                <dependentPart node="feederHydraulic"/>
            </movingTool>
            <movingTool node="sf4_feeder_door" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" mouseSpeedFactor="1" iconName="TOOL_OPEN_CLOSE" />
                <rotation rotSpeed="85" rotAcceleration="300" rotMax="150" rotMin="0" startRot="0"/>
            </movingTool>
            <movingTool node="armRotBase" playSound="true" freezingPipeStates="1">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseSpeedFactor="0.6" iconName="PIPE_ROTATE_Y" />
                <rotation rotationAxis="2" rotSpeed="25" rotAcceleration="100" startRot="0"/>
            </movingTool>
            <movingTool node="pipeEnd01" playSound="true" freezingPipeStates="1">
                <controls axis="AXIS_FRONTLOADER_ARM2" invertAxis="false" mouseSpeedFactor="0.6" iconName="PIPE_END_ROTATE" />
                <rotation rotSpeed="15" rotAcceleration="50" rotMax="45" rotMin="0" startRot="0"/>
                <dependentMovingTool node="pipeEnd02" speedScale="1"/>
            </movingTool>
            <movingTool node="pipeEnd02">
                <rotation rotSpeed="10" rotAcceleration="25" rotationAxis="1" rotMax="30" rotMin="0"/>
            </movingTool>
            <movingTool node="arm" playSound="true">
                <dependentPart node="armHydraulic"/>
                <!-- <dependentPart node="pipeEnd02Arm"/> -->
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="feederHydraulic" referencePoint="feederHydraulicRef" referenceFrame="feederHydraulicRef" alignToWorldY="true">
                <translatingPart node="feederHydraulicPunch"/>
            </movingPart>
            <movingPart node="armHydraulic" referencePoint="armHydraulicRef" referenceFrame="armHydraulicRef">
                <translatingPart node="armHydraulicPunch"/>
            </movingPart>
            <!-- <movingPart node="pipeEnd02Arm" referencePoint="pipeEnd02ArmRef" referenceFrame="pipeEnd02ArmRef" scaleZ="true"/> -->
            <!-- <movingPart node="pipeEnd01Hydraulic" referencePoint="pipeEnd01HydraulicRef" referenceFrame="pipeEnd01HydraulicRef" isActiveDirty="true" maxUpdateDistance="200"> -->
                <!-- <translatingPart node="pipeEnd01HydraulicPunch"/> -->
            <!-- </movingPart> -->
        </movingParts>
        <sounds>
            <hydraulic template="hydraulicClose01"/>
            <actionSound template="cylinderPunch" pitchScale="1.4" volumeScale="0.3" linkNode="armHydraulic" actionNames="TRANSLATING_END_NEG" nodes="armHydraulicPunch"/>
            <actionSound template="cylinderPunch" pitchScale="1.0" volumeScale="0.1" linkNode="armHydraulic" actionNames="TRANSLATING_END_POS" nodes="armHydraulicPunch"/>
            <actionSound template="clackVar1" pitchScale="1.4" volumeScale="1.0" linkNode="armHydraulic" actionNames="TRANSLATING_END_NEG" nodes="armHydraulicPunch"/>
            <actionSound template="clackVar4" pitchScale="0.3" volumeScale="1.1" linkNode="armHydraulic" actionNames="TRANSLATING_START_POS" nodes="armHydraulicPunch"/>
        </sounds>
    </cylindered>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit shopDisplayUnit="LITER" fillTypeCategories="BULK SHOVEL" capacity="10000" showInShop="true" showCapacityInShop="false" showOnHud="false" showOnInfoHud="true" updateMass="false">
                        <exactFillRootNode node="exactFillRootNode"/>
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <dischargeable requiresTipOcclusionArea="false">
		<dischargeNode node="dischargeNode" emptySpeed="10000" fillUnitIndex="1" maxDistance="30" stopDischargeOnEmpty="false" canDischargeToGroundAnywhere="true" effectTurnOffThreshold="0.5">
			<info width="0.4" length="0.4" useRaycastHitPosition="true"/>
			<effects>
				<effectNode effectNode="pipeEffect1" delay="0" materialType="unloading" fadeScale="0"/>
				<effectNode effectNode="pipeEffect2" delay="0.1" materialType="unloading" fadeScale="0"/>
				<effectNode effectClass="PipeEffect" effectNode="pipeEffect3" delay="0.12" materialType="pipe" maxBending="0.15" extraDistance="0.2" shapeScaleSpread="1.03 0.96 1 0"/>
			</effects>
			<dischargeSound template="dischargeForageHarvester" volumeScale="1.0" linkNode="dischargeNode"/>
		</dischargeNode>
    </dischargeable>

    <shovel useSpeedLimit="true">
        <shovelNode node="shovelNode" resetFillLevel="false" fillUnitIndex="1" width="2" length="1" yOffset="-1.5" zOffset="-0.5" needsMovement="false" needsActivation="true" ignoreFarmlandState="true" fillLitersPerSecond="5000" />
    </shovel>

    <pipe dischargeNodeIndex="1" toggleableDischargeToGround="false">
        <unloadingTriggers>
            <unloadingTrigger node="trailerTrigger"/>
        </unloadingTriggers>

        <pipeNodes>
            <pipeNode node="armRotBase" rotationSpeeds="0 35 0" autoAimYRotation="true" autoAimInvertZ="false" foldPriority="1">
                <state rotation="0 0 0"/>
                <state rotation="0 0 0"/>
            </pipeNode>
            <pipeNode node="arm" rotationSpeeds="30 0 0">
                <state rotation="30 0 0"/>
                <state rotation="0 0 0"/>
            </pipeNode>
            <pipeNode node="pipeEnd01" rotationSpeeds="40 0 0" autoAimXRotation="true" subPipeNode="pipeEnd02" minRotationLimits="0 0 0" maxRotationLimits="49 0 0" bendingRegulation="0.15" subPipeNodeRatio="0.5">
                <state rotation="49 0 0"/>
                <state rotation="15 0 0"/>
            </pipeNode>
            <pipeNode node="pipeEnd02" rotationSpeeds="80 0 0" autoAimXRotation="true" minRotationLimits="0 0 0" maxRotationLimits="49 0 0" bendingRegulation="0.15">
                <state rotation="49 0 0"/>
                <state rotation="15 0 0"/>
                <bendingRegulationNode node="dischargeNode" axis="3" direction="3"/>
            </pipeNode>
        </pipeNodes>
        <states num="2" unloading="2" autoAiming="2" turnOnAllowed="2"/>
    </pipe>

    <turnOnVehicle turnOffIfNotAllowed="true">
        <animationNodes>
            <animationNode node="sf4_barrel" rotSpeed="800" rotAxis="1" turnOnFadeTime="3" turnOffFadeTime="5"/>
        </animationNodes>
	</turnOnVehicle>

    <ai>
        <needsLowering value="true" lowerIfAnyIsLowered="true"/>
        <agentAttachment width="2.6" height="1.8" length="1.2" lengthOffset="-0.05"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.35" maxX="1.25" minZ="-0.55" maxZ="0.55" yOffset="0.3"/>
    </foliageBending>

    <baseColorConfigurations price="0" useDefaultColors="true" defaultColorIndex="12">
        <material materialSlotName="body_mat" />
    </baseColorConfigurations>

    <designColorConfigurations title="$l10n_configuration_designColor" price="0" useDefaultColors="true" defaultColorIndex="7">
        <material materialSlotName="door_mat"/>
    </designColorConfigurations>

    <wearable wearDuration="600" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="600" washDuration="1" workMultiplier="2" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="lhII_vis" node="0>0"/>
        <i3dMapping id="trailerTrigger" node="0>0|0|0"/>
        <i3dMapping id="attacherJoint" node="0>0|1|0"/>
        <i3dMapping id="electric" node="0>0|1|1|0"/>
        <i3dMapping id="electric_detached" node="0>0|1|1|1"/>
        <i3dMapping id="hydraulicIn01" node="0>0|1|1|2"/>
        <i3dMapping id="hydraulicIn01_detached" node="0>0|1|1|3"/>
        <i3dMapping id="hydraulicIn02" node="0>0|1|1|4"/>
        <i3dMapping id="hydraulicIn02_detached" node="0>0|1|1|5"/>
        <i3dMapping id="hydraulicOut01" node="0>0|1|1|6"/>
        <i3dMapping id="hydraulicOut01_detached" node="0>0|1|1|7"/>
        <i3dMapping id="pto" node="0>0|1|2"/>
        <i3dMapping id="supportArm" node="0>0|1|3"/>
        <i3dMapping id="topReferenceNode" node="0>0|1|4"/>
        <i3dMapping id="exactFillRootNode" node="0>0|2"/>
        <i3dMapping id="armRotBase" node="0>0|3|0"/>
        <i3dMapping id="arm" node="0>0|3|0|0"/>
        <i3dMapping id="armHydraulic" node="0>0|3|0|0|0"/>
        <i3dMapping id="armHydraulicPunch" node="0>0|3|0|0|0|0"/>
        <i3dMapping id="pipeEnd01" node="0>0|3|0|0|2"/>
        <i3dMapping id="pipeEnd02" node="0>0|3|0|0|2|0"/>
        <i3dMapping id="dischargeNode" node="0>0|3|0|0|2|0|0"/>
        <i3dMapping id="pipeEffect3" node="0>0|3|0|0|2|0|1"/>
        <i3dMapping id="pipeEffect2" node="0>0|3|0|0|2|1"/>
        <i3dMapping id="pipeEffect1" node="0>0|3|0|0|3"/>
        <i3dMapping id="armHydraulicRef" node="0>0|3|0|1"/>
        <i3dMapping id="feederHydraulic" node="0>0|3|1"/>
        <i3dMapping id="feederHydraulicPunch" node="0>0|3|1|0"/>
        <i3dMapping id="sf4_arm" node="0>0|3|2"/>
        <i3dMapping id="feederHydraulicRef" node="0>0|3|2|0|0"/>
        <i3dMapping id="sf4_barrel" node="0>0|3|2|1"/>
        <i3dMapping id="sf4_feeder_door" node="0>0|3|2|2"/>
        <i3dMapping id="shovelNode" node="0>0|3|2|4"/>
        <i3dMapping id="alpha" node="0>0|5|0"/>
    </i3dMappings>
</vehicle>
