<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="transportBarrow">
	<storeData>
        <name>$l10n_shopItem_sackBarrow</name>
		<specs>
            <maxSpeed>10</maxSpeed>
        </specs>
        <functions>
            <function>$l10n_function_sackBarrow</function>
        </functions>
        <image>store/store_sackBarrow.png</image>
        <price>65</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>LSFMINNOVATIONS</brand>
        <category>lsfmFarmEquipmentPackBarrows</category>
		<shopHeight>1.2</shopHeight>
        <shopTranslationOffset>0 -0.004 0</shopTranslationOffset>
        <shopRotationOffset>-0.216 0 0</shopRotationOffset>
    </storeData>
    
	<base>
        <typeDesc>$l10n_typeDesc_sackBarrow</typeDesc>
        <filename>sackBarrow.i3d</filename>
        <size width="0.6" length="1.0" height="1.2" />
		<supportsRadio>false</supportsRadio>
		<canBeReset>true</canBeReset>
		<supportsPickUp>true</supportsPickUp>
        <components>
            <component centerOfMass="0 0.092 0" solverIterationCount="10" mass="25"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <sounds filename="sounds/sackBarrow/sackBarrowSound.xml" volumeFactor="1.8"/>
    </base>

	<wheels>
        <wheelConfigurations>
			<wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels autoRotateBackSpeed="1.6">
					<wheel hasParticles="false" hasTireTracks="false">
                        <physics rotSpeed="1" restLoad="0.6" repr="wheelMiddle"  showSteeringAngle="false" radius="0.05" width="0.02" forcePointRatio="0.5" initialCompression="25" suspTravel="0.09" spring="20" damper="3" frictionScale="2.5" mass="0.01"/>
                        <tire tireTrackAtlasIndex="4" />
                    </wheel>
                    <wheel hasParticles="true" hasTireTracks="true">
                        <physics tipOcclusionAreaGroupId="1" rotSpeed="1" restLoad="0.6" repr="wheelLeft"  showSteeringAngle="false"  radius="0.12" width="0.06" forcePointRatio="0.5" initialCompression="25" suspTravel="0.09" spring="20" damper="3" frictionScale="2.5" mass="0.01"/>
                        <tire tireTrackAtlasIndex="4" />
                    </wheel>
                    <wheel hasParticles="true" hasTireTracks="true">
                        <physics tipOcclusionAreaGroupId="1" rotSpeed="1" restLoad="0.6" repr="wheelRight"  showSteeringAngle="false"  radius="0.12" width="0.06" forcePointRatio="0.5" initialCompression="25" suspTravel="0.09" spring="20" damper="3" frictionScale="2.5" mass="0.01"/>
                        <tire tireTrackAtlasIndex="4" />
                    </wheel>
				</wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="65" rotMax="35" rotCenterWheel1="2" rotCenterWheel2="3" rotCenterNode="wheelMiddle"/>
        </ackermannSteeringConfigurations>
    </wheels>
	
	<enterable isTabbable="false" enterText="$l10n_enterText_sackBarrow">
        <enterReferenceNode node="enterReferenceNode" interactionRadius="2.0"/>
        <exitPoint node="enterReferenceNode"/>
		<nicknameRenderNode node="playerNode" offset="0 2 0"/>
        
		<cameras>
            <camera node="outdoorCamera" rotatable="true" rotateNode="outdoorCameraRot" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="3" transMax="20">
                <raycastNode node="cameraRaycastNode1"/>
                <raycastNode node="cameraRaycastNode2"/>
            </camera>
            <camera node="indoorCamera" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="false" />
        </cameras>

		<characterNode node="skeleton" animationNode="2" cameraMinDistance="1.75" spineRotation="270 0 90" useAnimation="true" />
		<enterAnimation name="enterAnimation"/>
    </enterable>

	<motorized turnOnText="$l10n_action_farmEquipmentOnText" turnOffText="$l10n_action_farmEquipmentOffText" forceSpeedHudDisplay="true">
        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>
                    <differential torqueRatio="0.2" maxSpeedRatio="3.0" wheelIndex1="2" wheelIndex2="3"/>
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>
       	
		<motorConfigurations>
			<motorConfiguration price="0" hp="8.7">
                <motor torqueScale="0.077" minRpm="850" maxRpm="2200" maxForwardSpeed="7" maxBackwardSpeed="5" brakeForce="0.1" lowBrakeForceScale="0.1" accelerationLimit="1.6" dampingRateScale="0.08">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
                </motor>
                <transmission minForwardGearRatio="118" maxForwardGearRatio="320" minBackwardGearRatio="165" maxBackwardGearRatio="320"/>
            </motorConfiguration>
        </motorConfigurations>
    </motorized>

	<pushHandTool>
        <raycast node1="raycast01" node2="raycast02" playerNode="playerNode" positionSmoothnessFactor="0.65" positionSmoothnessFactorSteering="0"/>
        <wheels front="1" back="2 3"/>
		<!-- <spine rotationForward="-10" rotationBackward="-10" rotationIdle="-5" ratio="0.6 0.2 0.2" speed="40"/> -->
        
		<ikChains>
            <target ikChain="rightArm"  targetNode="playerRightHandTarget" poseId="wideFingers" /> 
            <target ikChain="leftArm"   targetNode="playerLeftHandTarget" poseId="wideFingers"/>
        </ikChains>

		<customChainLimits>
            <customChainLimit chainId="leftArm" nodeIndex="1" minRx="-50" maxRx="50" minRy="-80" maxRy="80" minRz="-75" maxRz="10" localLimits="true"/>
            <customChainLimit chainId="leftArm" nodeIndex="2" minRx="-25" maxRx="25" minRy="-144" maxRy="-25" minRz="-10" maxRz="10" localLimits="true"/>

            <customChainLimit chainId="rightArm" nodeIndex="1" minRx="-50" maxRx="50" minRy="-80" maxRy="80" minRz="-75" maxRz="10" localLimits="true"/>
            <customChainLimit chainId="rightArm" nodeIndex="2" minRx="-25" maxRx="25" minRy="-144" maxRy="-25" minRz="-10" maxRz="10" localLimits="true"/>
        </customChainLimits>

        <playerConditionalAnimation>
            <item id="idle" entryTransitionDuration="0.25" exitTransitionDuration="0.25" >
                <clips>
                    <clip clipName="idle1Source" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="absSmoothedForwardVelocity" lower="0.2" />
                    </conditionGroup>
                </conditions>
            </item>
            <item id="walk" entryTransitionDuration="0.25" exitTransitionDuration="0.25" >
                <clips speedScaleType="distance" speedScaleParameter="1.8">
                    <!-- <clip clipName="walkFwd1Source" /> -->
					<clip clipName="NPCWalkMale03Source" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="smoothedForwardVelocity" between="0.3, 4"/>
                    </conditionGroup>
                </conditions>
            </item>
            <item id="walkBack" entryTransitionDuration="0.5" exitTransitionDuration="0.25" >
                <clips speedScaleType="distance" speedScaleParameter="2.25">
                    <clip clipName="walkBwdLoopSource" />
                </clips>
                <conditions>
                    <conditionGroup>
                        <condition parameter="smoothedForwardVelocity" between="-3, -0.3" />
                    </conditionGroup>
                </conditions>
            </item>
        </playerConditionalAnimation>
    </pushHandTool>

	<animations>
        <animation name="enterAnimation">
            <part node="sackBarrow_vis" startTime="0" endTime="0.5" startRot="0 0 0" endRot="-35 0 0"  />
        </animation>
    </animations>

	<lights>
	</lights>

	<ai supportsAIJobs="false">
        <agentAttachment />
    </ai>
    
	<drivable>
        <sounds>
            <waterSplash template="waterSplash01"/>
        </sounds>
        <cruiseControl enabled="false"/>
    </drivable> 
	
	<tensionBeltObject>
        <meshNodes>
            <meshNode node="sackBarrow_vis"/>
        </meshNodes>
    </tensionBeltObject>	

    <tensionBelts>
        <tensionBeltsConfigurations>
            <tensionBeltsConfiguration>
                <tensionBelts linkNode="tensionBelts" rootNode="sackBarrow_main_component1" jointNode="sackBarrow_main_component1" tensionBeltType="small" maxEdgeLength="0.1" geometryBias="0.01" ratchetPosition="0.2" defaultOffset="0" defaultOffsetSide="0.1" defaultHeight="3" interactionRadius="1.75" totalInteractionRadius="3.5" activationTrigger="beltActivationTrigger">
                    <tensionBelt startNode="beltStart1" endNode="beltEnd1" offsetLeft="0.85"/>
                    <tensionBelt startNode="beltStart2" endNode="beltEnd2" offsetRight="0.85"/>
                    <tensionBelt startNode="beltStart3" endNode="beltEnd3" offsetRight="0.85"/>
                    <tensionBelt startNode="beltStart4" endNode="beltEnd4" offsetRight="0.85"/>
					<sounds>
                        <addBelt    template="beltOpen" />
                        <removeBelt template="beltClose" />
                    </sounds>
                </tensionBelts>
            </tensionBeltsConfiguration>
        </tensionBeltsConfigurations>
    </tensionBelts>

	<turnOnVehicle isAlwaysTurnedOn="true"/>
    
	<foliageBending>
        <bendingNode minX="-0.412" maxX="0.412" minZ="-0.733" maxZ="0.681" yOffset="0.5"/>
    </foliageBending>

	<wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>
       
	<i3dMappings>
		<i3dMapping id="sackBarrow_main_component1" node="0>" />
		<i3dMapping id="wheelLeft" node="0>0|0" />
		<i3dMapping id="wheelRight" node="0>0|1" />
		<i3dMapping id="wheelMiddle" node="0>0|2" />
		<i3dMapping id="outdoorCameraRot" node="0>3|0" />
		<i3dMapping id="outdoorCamera" node="0>3|0|0" />
		<i3dMapping id="indoorCamera" node="0>3|1" />
		<i3dMapping id="cameraRaycastNode1" node="0>3|2" />
		<i3dMapping id="cameraRaycastNode2" node="0>3|3" />
		<i3dMapping id="sackBarrow_vis" node="0>1|0" />
		<i3dMapping id="tensionBelts" node="0>1|0|2" />
		<i3dMapping id="beltStart1" node="0>1|0|2|0" />
		<i3dMapping id="beltEnd1" node="0>1|0|2|0|0" />
		<i3dMapping id="beltStart2" node="0>1|0|2|1" />
		<i3dMapping id="beltEnd2" node="0>1|0|2|1|0" />
		<i3dMapping id="beltStart3" node="0>1|0|2|2" />
		<i3dMapping id="beltEnd3" node="0>1|0|2|2|0" />
		<i3dMapping id="beltStart4" node="0>1|0|2|3" />
		<i3dMapping id="beltEnd4" node="0>1|0|2|3|0" />
		<i3dMapping id="beltActivationTrigger" node="0>1|0|2|4" />
		<i3dMapping id="enterReferenceNode" node="0>2" />
		<i3dMapping id="playerRightHandTarget" node="0>1|0|0|0" />
		<i3dMapping id="playerLeftHandTarget" node="0>1|0|0|1|0" />
		<i3dMapping id="playerNode" node="0>4|0" />
		<i3dMapping id="skeleton" node="0>4|0|0" />
		<i3dMapping id="raycast01" node="0>4|1" />
		<i3dMapping id="raycast02" node="0>4|2" />
	</i3dMappings>
</vehicle>