<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="wheelBarrow">
    <storeData>
        <name>$l10n_shopItem_wheelBarrowOld</name>
        <specs>
            <maxSpeed>10</maxSpeed>
            <capacity>500</capacity>
			<fillTypeCategories>BULK</fillTypeCategories>
        </specs>
        <functions>
            <function>$l10n_function_wheelBarrow</function>
        </functions>
        <image>store/store_wheelBarrowOld.png</image>
        <price>35</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
		<brand>LSFMINNOVATIONS</brand>
        <category>lsfmFarmEquipmentPackWheelBarrows</category>
		<shopHeight>1.2</shopHeight>
        <shopTranslationOffset>0 -0.004 0</shopTranslationOffset>
        <shopRotationOffset>-0.216 0 0</shopRotationOffset>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_wheelBarrow</typeDesc>
        <filename>wheelBarrowOld.i3d</filename>
		<supportsRadio>false</supportsRadio>
		<canBeReset>true</canBeReset>
		<supportsPickUp>true</supportsPickUp>
        <size width="0.8" length="1.5" height="0.8" />
        <components maxMass="350">
			<component centerOfMass="0 -0.2 -0.183" solverIterationCount="10" mass="50" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="VEHICLE_WHEELBARROW" />
		<sounds filename="sounds/wheelBarrow/wheelBarrowOldSound.xml" volumeFactor="1.5"/>
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels autoRotateBackSpeed="10.0" speedDependentRotateBack="false">
                    <wheel hasParticles="true" hasTireTracks="true">
                        <physics rotSpeed="1" restLoad="0.6" repr="wheelMiddle"  showSteeringAngle="false" radius="0.23" width="0.1" forcePointRatio="0.5" initialCompression="25" suspTravel="0.09" spring="20" damper="3" frictionScale="2.5" mass="0.01"/>
                        <tire tireTrackAtlasIndex="4" />
                    </wheel>
                    <wheel hasParticles="false" hasTireTracks="false">
                        <physics tipOcclusionAreaGroupId="1" rotSpeed="1" restLoad="0.6" repr="wheelLeft"  showSteeringAngle="false"  radius="0.23" width="0.27" forcePointRatio="0.5" initialCompression="25" suspTravel="0.09" spring="20" damper="3" frictionScale="2.5" mass="0.01"/>
                        <tire tireTrackAtlasIndex="4" />
                    </wheel>
                    <wheel hasParticles="false" hasTireTracks="false">
                        <physics tipOcclusionAreaGroupId="1" rotSpeed="1" restLoad="0.6" repr="wheelRight"  showSteeringAngle="false"  radius="0.23" width="0.27" 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="70" rotMax="20" rotCenter="0 0"/>
        </ackermannSteeringConfigurations>
    </wheels>

	<enterable isTabbable="false" enterText="$l10n_enterText_wheelBarrow">
        <enterReferenceNode node="enterReferenceNode" interactionRadius="2.0"/>
        <exitPoint node="enterReferenceNode"/>
		<nicknameRenderNode node="playerNode" offset="0 2 0"/>
        
		<cameras>
            <camera node="outdoorCamera" rotatable="true" rotateNode="outdoorCameraTarget" 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"/>
		
		<enterablePassengerConfigurations>
            <enterablePassengerConfiguration>
                <passengerSeat node="passengerSeat01" exitPoint="passengerSeat01ExitPoint" outdoorCameraIndex="1">
                    <camera node="passengerSeat01Camera" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" useMirror="true" isInside="true" useOutdoorSounds="true" positionSmoothingParameter="0" />
                    <characterNode node="passengerSeat01PlayerSkin" cameraMinDistance="0.5" spineRotation="-90 0 90">
                        <target ikChain="rightFoot" targetNode="passengerSeat01PlayerRightFoot" />
                        <target ikChain="leftFoot"  targetNode="passengerSeat01PlayerLeftFoot" />
                        <target ikChain="rightArm"  targetNode="passengerSeat01PlayerRightHand" poseId="narrowFingers"/>
                        <target ikChain="leftArm"   targetNode="passengerSeat01PlayerLeftHand" poseId="narrowFingers"/>
                    </characterNode>
                </passengerSeat>
			</enterablePassengerConfiguration>
        </enterablePassengerConfigurations>
    </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="2.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.9">
                    <!-- <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>

	<lights>
	</lights>
    
	<ai supportsAIJobs="false" />

	<drivable>
        <sounds>
            <waterSplash template="waterSplash01"/>
        </sounds>
        <cruiseControl enabled="false"/>
    </drivable>

	<shovel>
		<shovelNode node="pickUpNode" fillUnitIndex="1" width="1" length="3" yOffset="-0.5" zOffset="0" needsMovement="false" needsActivation="true" fillLitersPerSecond="500" needsAttacherVehicle="false"/>        
		<dischargeInfo node="dischargeNode" minSpeedAngle="125" maxSpeedAngle="180" />
    </shovel>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit shopDisplayUnit="CUBICMETER" fillTypeCategories="bulk" capacity="500" updateFillLevelMass="true" showOnHud="true" uiDisplayType="BAR">
                        <exactFillRootNode node="exactFillRootNode"/>
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" maxDelta="1.2" maxAllowedHeapAngle="45" maxSubDivEdgeLength="0.9" fillUnitIndex="1"  />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

		<loadInfos>
            <loadInfo>
                <node node="fillVolumeLoadNode" width="0.5" length="0.5" />
            </loadInfo>
        </loadInfos>

        <unloadInfos>
            <unloadInfo>
                <node node="fillVolumeUnloadNode" width="0.2" length="0.2" />
            </unloadInfo>
        </unloadInfos>
    </fillVolume>

	<cylindered>
        <movingTools>
            <movingTool node="wheelBarrow_vis" playSound="false" isActiveDirty="true">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseSpeedFactor="0.6" iconName="WHEELBARROW_UNLOAD_ROTATION" />
				<animation animName="dischargeAnimation" animSpeed="1" allowSaving="false"/>
            </movingTool>
        </movingTools>
    </cylindered>

	<dischargeable requiresTipOcclusionArea="false">
        <dischargeNode node="dischargeNode" fillUnitIndex="1" emptySpeed="800" unloadInfoIndex="1" loadInfoIndex="1" canStartDischargeAutomatically="false">
            <raycast node="dischargeNode" maxDistance="6" useWorldNegYDirection="true" yOffset="0"/>
            <info width="1.0" length="0.5" zOffset="0.5"/>

            <effects>
				<effectNode effectNode="emitterShape" effectClass="ParticleEffect" materialType="unloadingParticle" lifespan="0.2"/>
                <effectNode effectNode="effectSmoke" materialType="unloadingSmoke" fadeTime="0.5" />
            </effects>
        </dischargeNode>
    </dischargeable>

    <animations>
        <animation name="enterAnimation">
            <part node="wheelBarrow_vis" startTime="0" endTime="0.5" startRot="0 0 0" endRot="10.5 0 0"  /> <!-- Changed -->
        </animation>
        <animation name="dischargeAnimation" resetOnStart="false">
            <part node="wheelBarrow_vis" startTime="0" endTime="0.8" startRot="10.5 0 0" endRot="50 0 0"   />
			<part node="playerRightHandTarget" startTime="0" endTime="0.5" startRot="3.021 -6.177 90.50"  endRot="0 180 90" />
			<part node="playerLeftHandTarget"  startTime="0" endTime="0.5" startRot="0 0 0" endRot="0 -180 0"  />
			<part node="skeleton"  startTime="0" endTime="0.8" startTrans="0 0 0" endTrans="0 0 0.74"  /> <!-- Changed -->
        </animation>

		<animation name="turnedAnimation">
			<part node="pickupShovelVisual"  startTime="0.0" endTime="0.05" visibility="false"  />
			<part node="pickupShovelVisual"  startTime="0.05" endTime="0.10" visibility="true"  />
        </animation>

		<animation name="turnedOnAnimation" looping="true">
			<part node="pickupShovelVisual"  startTime="0.0" endTime="0.2" startTrans="0 0 0" endTrans="0 -0.477 -0.122"  />
			<part node="pickupShovelVisual"  startTime="0.0" endTime="0.5" startRot="0 0 0" endRot="-27.302 0 0"  />
			<part node="pickupShovelVisual"  startTime="0.2" endTime="1.0" startTrans="0 -0.477 -0.122" endTrans="0 -0.368 0.25"  />
			<part node="pickupShovelVisual"  startTime="1.0" endTime="1.5" startTrans="0 -0.368 0.25" endTrans="0 0.383 0.819"  />
			<part node="pickupShovelVisual"  startTime="1.0" endTime="1.5" startRot="-27.302 0 0" endRot="-56.629 0 0"  />
			<part node="pickupShovelVisual"  startTime="1.5" endTime="2.0" startTrans="0 0.383 0.819" endTrans="0 0.045 1.478"  />
			<part node="pickupShovelVisual"  startTime="1.5" endTime="2.0" startRot="-56.629 0 0" endRot="-111.014 -0.4 179.22"  />
			<part node="pickupShovelVisual"  startTime="2.0" endTime="2.5" startRot="-111.014 -0.4 179.22" endRot="0 0 0"  />
			<part node="pickupShovelVisual"  startTime="2.0" endTime="2.5" startTrans="0 0.045 1.478" endTrans="0 0.512 0.569"  />
        </animation>
		
		<animation name="greaseAnimation">
            <part node="squeakSoundNode" startTime="0" endTime="0.001" startTrans="0 0 0" endTrans="0 -500 0"  />
        </animation>
    </animations>

	<turnOnVehicle requiresMotorTurnOn="false" turnedOnByAttacherVehicle="false" turnOffOnDeactivate="false" motorNotStartedWarning="workModeNotStarted_warning" toggleButton="TOGGLE_WORKMODE" turnOnText="$l10n_turnOn_barrowPickup" turnOffText="$l10n_turnOff_barrowPickup">
		<turnedAnimation name="turnedAnimation"/>
		<turnedOnAnimation name="turnedOnAnimation"/>
		<sounds>
            <work file="sounds/shovelPickup.wav" innerRadius="15.0" outerRadius="45.0"  linkNode="pickupShovelVisual" >
				<volume indoor="1.00" outdoor="1.00" />
			</work>	
        </sounds>
	</turnOnVehicle>

	<tensionBeltObject>
        <meshNodes>
            <meshNode node="wheelBarrow_vis"/>
        </meshNodes>
    </tensionBeltObject>	

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="3" fieldMultiplier="2"/>
	
	<realDirtColor disable="true" />

	<i3dMappings>
		<i3dMapping id="wheelBarrow_main_component1" node="0>" />
		<i3dMapping id="wheelMiddle" node="0>0|0" />
		<i3dMapping id="wheelLeft" node="0>0|1" />
		<i3dMapping id="wheelRight" node="0>0|2" />
		<i3dMapping id="wheelBarrowRotationNode" node="0>1" />
		<i3dMapping id="wheelBarrow_vis" node="0>1|0" />
		<i3dMapping id="passengerSeat01" node="0>1|0|7|0" />
		<i3dMapping id="passengerSeat01Camera" node="0>1|0|7|0|0" />
		<i3dMapping id="passengerSeat01PlayerSkin" node="0>1|0|7|0|1" />
		<i3dMapping id="passengerSeat01PlayerLeftFoot" node="0>1|0|7|0|2" />
		<i3dMapping id="passengerSeat01PlayerRightFoot" node="0>1|0|7|0|3" />
		<i3dMapping id="passengerSeat01PlayerLeftHand" node="0>1|0|7|0|4" />
		<i3dMapping id="passengerSeat01PlayerRightHand" node="0>1|0|7|0|5" />
		<i3dMapping id="passengerSeat01ExitPoint" node="0>1|0|7|0|6" />
		<i3dMapping id="exactFillRootNode" node="0>1|0|0" />
		<i3dMapping id="dischargeNode" node="0>1|0|1" />
		<i3dMapping id="fillVolume" node="0>1|0|2|0" />
		<i3dMapping id="fillVolumeUnloadNode" node="0>1|0|3" />
		<i3dMapping id="fillVolumeLoadNode" node="0>1|0|3" />
		<i3dMapping id="effects" node="0>1|0|4" />
		<i3dMapping id="effectSmoke" node="0>1|0|4|1" />
		<i3dMapping id="emitterShape" node="0>1|0|4|2" />
		<i3dMapping id="enterReferenceNode" node="0>2" />
		<i3dMapping id="outdoorCameraTarget" 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="aiCollisionTrigger" node="0>4" />
		<i3dMapping id="steeringBase" node="0>5" />
		<i3dMapping id="steeringWheel" node="0>5|0" />
		<i3dMapping id="playerRightHandTarget" node="0>1|0|5|0" />
		<i3dMapping id="playerLeftHandTarget" node="0>1|0|5|1|0" />
		<i3dMapping id="player" node="0>6" />
		<i3dMapping id="playerNode" node="0>5|0" />
		<i3dMapping id="skeleton" node="0>5|0|0" />
		<i3dMapping id="raycast01" node="0>5|1" />
		<i3dMapping id="raycast02" node="0>5|2" />
		<i3dMapping id="pickupShovelVisual" node="0>6|0" />
		<i3dMapping id="pickUpNode" node="0>7" />
		<i3dMapping id="squeakSoundNode" node="0>8" />
	</i3dMappings>
</vehicle>
