<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="milkShuttle">
	<storeData>
        <name>$l10n_shopItem_milkShuttle</name>
		<specs>
            <maxSpeed>8</maxSpeed>
        </specs>
        <functions>
            <function>$l10n_function_milkShuttle</function>
        </functions>
        <image>store/store_milkShuttle.png</image>
        <price>3500</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_milkShuttle</typeDesc>
        <filename>milkShuttle.i3d</filename>
		<sounds filename="sounds/milkShuttle/milkShuttle.xml"/>
        <size width="1.5" length="2.0" height="1" lengthOffset="0"/>
		<supportsRadio>false</supportsRadio>
		<canBeReset>true</canBeReset>
		<supportsPickUp>false</supportsPickUp>
        <components>
            <component centerOfMass="0 0.242 0" solverIterationCount="10" mass="250"/>
        </components>
		<schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
		<mapHotspot type="TOOL_TRAILED" />
	</base>

	<wheels>
        <wheelConfigurations>
			<wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels autoRotateBackSpeed="60">
					<wheel filename="$data/shared/wheels/tires/mitas/FL02/7_R12.xml" hasTireTracks="true" hasParticles="false" isCareWheel="true">
                        <physics rotSpeed="1" restLoad="0.5" repr="middleWheelPart" driveNode="wheelMiddle" useReprDirection="true" radius="0.18" width="0.15" initialCompression="25" suspTravel="0.05" spring="10" damper="20" mass="0.01"/>
						<tire maxDeformation="0.02"/>
					</wheel>
					
                    <wheel filename="$data/shared/wheels/tires/mitas/FL02/7_R12.xml" hasTireTracks="true" hasParticles="false" isLeft="true" isCareWheel="true">
                        <physics rotSpeed="1" restLoad="0.5" repr="wheelLeft" useReprDirection="true" radius="0.15" width="0.12" initialCompression="25" suspTravel="0.05" spring="10" damper="20" mass="0.01"/>
						<tire maxDeformation="0.02"/>
					</wheel>
                    
					<wheel filename="$data/shared/wheels/tires/mitas/FL02/7_R12.xml" hasTireTracks="true" hasParticles="false" isLeft="false" isCareWheel="true">
                        <physics rotSpeed="1" restLoad="0.5" repr="wheelRight" useReprDirection="true" radius="0.15" width="0.12" initialCompression="25" suspTravel="0.05" spring="10" damper="20" mass="0.01"/>
						<tire maxDeformation="0.02"/>
					</wheel>
				</wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <ackermannSteeringConfigurations>
            <ackermannSteering rotSpeed="65" rotMax="45" rotCenterWheel1="2" rotCenterWheel2="3" />
        </ackermannSteeringConfigurations>
    </wheels>
	
	<enterable isTabbable="false" enterText="$l10n_enterText_milkShuttle">
        <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="2" 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" />
    </enterable>
	
	<attacherJoints>
		<attacherJointConfigurations>
			<attacherJointConfiguration>
				<attacherJoint node="attacherJointCableSystem" jointType="electricChargeSystem" lowerRotLimit="180 180 180" lowerTransLimit="0 0 0" upperRotRotationOffset="0" allowsJointLimitMovement="false">
					<schema position="1 0" rotation="0" invertX="false" />
					<objectChange node="connector" visibilityActive="true"  visibilityInactive="false" />
					<objectChange node="chargingTriggerNode" translationActive="0 0 0" translationInactive="0 -20 0"/>

					<!-- <attachSound template="ATTACH_BigBag" linkNode="connector" />
					<detachSound template="ATTACH_BigBag" linkNode="connector" /> -->
				</attacherJoint>
			</attacherJointConfiguration>
		</attacherJointConfigurations>
		
        <sounds>
            <attach template="fabricCover2" linkNode="0>" />
        </sounds>
    </attacherJoints>
	
	<connectionHoses>
		<target attacherJointIndices="1" type="TOOL_CONNECTOR_TOP_RIGHT" node="electricConnectorNode">
		    <objectChange node="electricSocket_cap" rotationActive="0 -90 0" rotationInactive="0 0 0"/>
        </target>
	</connectionHoses>

	<motorized alwaysTurnedOn="false" forceSpeedHudDisplay="true">
		<consumerConfigurations>
            <consumerConfiguration consumersEmptyWarning="$l10n_warning_motorBatteryEmpty">
                <consumer fillUnitIndex="2" usage="500" fillType="electricCharge" refillLitersPerSecond="1" />
            </consumerConfiguration>
        </consumerConfigurations>

		<differentialConfigurations>
            <differentialConfiguration>
                <differentials>
                    <differential torqueRatio="0.1" maxSpeedRatio="3.0" wheelIndex1="2" wheelIndex2="3"/>
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>
       	
		<motorConfigurations>
            <motorConfiguration name="$l10n_typeDesc_milkShuttle" hp="0">
				<motor torqueScale="0.32" minRpm="850" maxRpm="2200" maxForwardSpeed="8" maxBackwardSpeed="5" brakeForce="0.2" lowBrakeForceScale="2" accelerationLimit="1" dampingRateFullThrottle="0.00005" dampingRateZeroThrottleClutchEngaged="0.00033" dampingRateZeroThrottleClutchDisengaged="0.00033">
                    <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="79" maxForwardGearRatio="300" minBackwardGearRatio="170" maxBackwardGearRatio="250" />
            </motorConfiguration>
        </motorConfigurations>
		
		<motorStartDuration>1000</motorStartDuration>
    </motorized>
		
	<pushHandTool>
        <raycast node1="raycast01" node2="raycast02" playerNode="playerNode" positionSmoothnessFactor="0.65" positionSmoothnessFactorSteering="0"/>
        <wheels front="2 3" back="1"/>
		<!-- <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>
	    
	<drivable>
        <sounds>
            <waterSplash template="waterSplash01"/>
        </sounds>
        <cruiseControl enabled="false"/>
    </drivable> 

	<cover>
        <coverConfigurations>
            <coverConfiguration name="$l10n_configuration_valueDefault" price="0" openOnBuy="false" openCoverWhileTipping="false" >
                <cover openAnimation="toggleCover" fillUnitIndices="1"/>
            </coverConfiguration>
        </coverConfigurations>
    </cover>

	<cylindered>
        <movingTools>
            <movingTool node="cover" playSound="true"/>
        </movingTools>

       	<sounds>
			<hydraulic file="sounds/milkShuttle/cover2.ogg" innerRadius="5.0" outerRadius="45.0" indoor="0.40" outdoor="0.90" linkNode="cover"/>
        </sounds>
    </cylindered>

	<animations>
		<animation name="toggleCover">
			<part node="cover" startTime="0.25" endTime="1" startRot="0 0 0" endRot="-122.934 0 0" />
			<part node="fillTrigger" startTime="0.0" endTime="0.1" startTrans="0 -100 0" endTrans="0 0 0" />
        </animation>		

		<animation name="tipFront">
            <part node="faucet"  startTime="0.0" endTime="1.0" startTrans="0 0.27 0.436" endTrans="0 0.281 0.436" startRot="0 0 0" endRot="0 360 0" />
        </animation>

		<animation name="tipPipe">
            <part node="pipe"  startTime="0.0" endTime="1.0" startRot="0 0 0" endRot="0 -117 0" />
        </animation>

		<animation name="batteryBarAnim">
            <part node="batteryBar" startTime="0" endTime="1" startScale="0 1 1" endScale="1 1 1"/>
        </animation>
	</animations>

	<fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration name="$l10n_configuration_valueDefault" price="0" >
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypes="CALFMILK MILK" showOnHud="true" showInShop="true" capacity="500" updateFillLevelMass="false">
                        <exactFillRootNode node="exactFillRootNode" />
                        <dashboard displayType="TEXT" valueType="fillLevel" node="hudFillLevel" textColor="0.05 0.05 0.05 1" textSize="0.01" textMask="00000" font="DIGIT" textAlignment="LEFT"/>
                    </fillUnit>
					<fillUnit unitTextOverride="$l10n_unit_kw" showOnHud="true" showInShop="true" fillTypes="ELECTRICCHARGE" capacity="120" updateFillLevelMass="false">
						<exactFillRootNode node="chargingTriggerNode" />
						<dashboard displayType="ANIMATION" valueType="fillLevel" animName="batteryBarAnim" groups="MOTOR_ACTIVE"/>
					</fillUnit>
				</fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

	<fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" maxDelta="0" fillUnitIndex="1" />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>
    </fillVolume>

	<fillTriggerVehicle triggerNode="fillTrigger" fillUnitIndex="1" litersPerSecond="20"/>
	
	<mower fruitTypeConverter="MOWER"/>
    	
	<dischargeable>
        <dischargeNode node="dischargeNodeFront" emptySpeed="20" fillUnitIndex="1" >
            <info width="1" length="3"/>
			<effects>
                <effectNode effectClass="PipeEffect" effectNode="dischargeEffectFront" materialType="pipe" materialTypeId="1" maxBending="0.8" delay="0" useDistance="false" canStartDischargeAutomatically="false"/>
            </effects>
        </dischargeNode>

		<dischargeNode node="dischargeNodePipe" emptySpeed="20" fillUnitIndex="1" >
            <info width="1" length="3"/>
			<effects>
                <effectNode effectClass="PipeEffect" effectNode="dischargeEffectPipe" materialType="pipe" materialTypeId="1" maxBending="0.8" delay="0" useDistance="false" canStartDischargeAutomatically="false"/>
            </effects>
        </dischargeNode>
    </dischargeable>
  
  	<trailer>
        <trailerConfigurations>
            <trailerConfiguration name="$l10n_configuration_valueDefault" price="0">
                <trailer>
                    <tipSide name="$l10n_info_tipSideFront" dischargeNodeIndex="1">
                        <animation name="tipFront" speedScale="1.0" startTipTime="1.0"/>
                    </tipSide>
                   
					<tipSide name="$l10n_info_tipSidePipe" dischargeNodeIndex="2">
						<animation name="tipPipe" speedScale="1.0" startTipTime="1.0"/>
					</tipSide>
                </trailer>
            </trailerConfiguration>
        </trailerConfigurations>
    </trailer>
	
	<turnOnVehicle canBeTurnedOn="true" needsSetIsTurnedOn="true" isAlwaysTurnedOn="false">
		<activatableFillUnits>
            <activatableFillUnit index="1" />
        </activatableFillUnits>
		
		<animationNodes>
			<animationNode node="mixer" rotSpeed="-900" rotAxis="2" turnOnFadeTime="1" turnOffFadeTime="3" />
			<animationNode node="fillVolume" rotSpeed="-200" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="5" />
        </animationNodes>
	
		<sounds>
			<start 	file="sounds/milkShuttle/milkRobot_start.ogg"  	pitchOffset="0.98" volume="1.00" indoorVolumeFactor="0.55" indoorLowpassGain="0.75" linkNode="mixer" />
            <work 	file="sounds/milkShuttle/milkRobot_idle.ogg"  	pitchOffset="0.98" volume="2.00" indoorVolumeFactor="0.55" indoorLowpassGain="0.75" linkNode="mixer" />
			<stop 	file="sounds/milkShuttle/milkRobot_start.ogg"  	pitchOffset="0.98" volume="1.00" indoorVolumeFactor="0.55" indoorLowpassGain="0.75" linkNode="mixer" />
        </sounds>
    </turnOnVehicle>
	
	<tensionBeltObject>
        <meshNodes>
            <meshNode node="milkShuttle_vis"/>
        </meshNodes>
    </tensionBeltObject>	
    
	<foliageBending>
        <bendingNode minX="-0.424" maxX="0.424" minZ="-0.651" maxZ="0.396" yOffset="0.5"/>
    </foliageBending>
    
	<ai supportsAIJobs="false">
		<collisionTrigger node="aiCollisionNode" width="1.0" height="1.9"/>
		<agent />
		<agentAttachment />
    </ai>

	<!--<baseMaterial>
        <material name="milkShuttle_mat" baseNode="milkShuttle_vis">
			<shaderParameter name="colorMat5" value="FENDT_RED1"/>
			<shaderParameter name="colorMat6" value="FENDT_RED1"/>
			<shaderParameter name="colorMat7" value="FENDT_RED1"/>
		</material>

		<material name="cover_mat" baseNode="cover">
			<shaderParameter name="colorMat5" value="FENDT_RED1"/>
			<shaderParameter name="colorMat6" value="FENDT_RED1"/>
			<shaderParameter name="colorMat7" value="FENDT_RED1"/>
		</material>
	</baseMaterial>

	 <designMaterialConfigurations useDefaultColors="true" defaultColorIndex="0">
		<designMaterialConfiguration color="FENDT_RED1"/>
		<material name="milkShuttle_mat" shaderParameter="colorMat5" />
		<material name="milkShuttle_mat" shaderParameter="colorMat6" />
		<material name="milkShuttle_mat" shaderParameter="colorMat7" />
		<material name="cover_mat" shaderParameter="colorMat5" />
		<material name="cover_mat" shaderParameter="colorMat6" />
		<material name="cover_mat" shaderParameter="colorMat7" />
    </designMaterialConfigurations> -->

	<rimColorConfigurations useDefaultColors="true" >
        <rimColorConfiguration color="FENDT_RED1"/>
		<rimColorConfiguration materialTemplateName="RIM_DEFAULT"/>
		<rimColorConfiguration materialTemplateName="RIM_CONFIGURATION_CHROME"/>
    </rimColorConfigurations>

	<wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

	<dashboard>
        <groups>
            <group name="MOTOR_STARTING" isMotorStarting="true"/>
            <group name="MOTOR_ACTIVE"   isMotorStarting="false" isMotorRunning="true"/>
		</groups>
		
		<default>
			<dashboard displayType="EMITTER" node="display" idleValue="-1" intensity="1" groups="MOTOR_ACTIVE" />
			<dashboard displayType="EMITTER" node="button_green" idleValue="0" intensity="1" groups="MOTOR_ACTIVE" />
			<dashboard displayType="EMITTER" node="button_red" idleValue="0" intensity="1" groups="MOTOR_STARTING" />

			<dashboard displayType="VISIBILITY" node="lightGreen"  groups="MOTOR_ACTIVE" />
			<dashboard displayType="VISIBILITY" node="lightRed"  groups="MOTOR_STARTING" />
        </default>
	</dashboard>
       
	<i3dMappings>
		<i3dMapping id="milkShuttle_main_component1" node="0>" />
		<i3dMapping id="wheelMiddleFront" node="0>0" />
		<i3dMapping id="middleWheelPart" node="0>0|0" />
		<i3dMapping id="wheelMiddle" node="0>0|0|0" />
		<i3dMapping id="wheelLeft" node="0>1" />
		<i3dMapping id="wheelRight" node="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="milkShuttle_vis" node="0>5" />
		<i3dMapping id="faucet" node="0>5|0" />
		<i3dMapping id="milkPipe" node="0>5|0" />
		<i3dMapping id="cover" node="0>5|1" />
		<i3dMapping id="mixer" node="0>5|2" />
		<i3dMapping id="display" node="0>5|5" />
		<i3dMapping id="button_green" node="0>5|6" />
		<i3dMapping id="button_red" node="0>5|7" />
		<i3dMapping id="aiCollisionNode" node="0>6" />
		<i3dMapping id="enterReferenceNode" node="0>7" />
		<i3dMapping id="steeringBase" node="0>8" />
		<i3dMapping id="steeringWheel" node="0>8|0" />
		<i3dMapping id="playerRightHandTarget" node="0>8|0|0" />
		<i3dMapping id="playerLeftHandRotateNode" node="0>8|0|1" />
		<i3dMapping id="playerLeftHandTarget" node="0>8|0|1|0" />
		<i3dMapping id="playerNode" node="0>9|0" />
		<i3dMapping id="skeleton" node="0>9|0|0" />
		<i3dMapping id="raycast01" node="0>9|1" />
		<i3dMapping id="raycast02" node="0>9|2" />
		<i3dMapping id="dischargeNodeFront" node="0>11|0|0" />
		<i3dMapping id="dischargeEffectFront" node="0>11|0|1|0" />
		<i3dMapping id="pipe" node="0>11|1" />
		<i3dMapping id="dischargeEffectPipe" node="0>11|1|0|0" />
		<i3dMapping id="dischargeNodePipe" node="0>11|2" />
		<i3dMapping id="exactFillRootNode" node="0>10|0" />
		<i3dMapping id="exactFillRootNodeCharge" node="0>10|4" />
		<i3dMapping id="fillVolume" node="0>10|5" />
		<i3dMapping id="fillTrigger" node="0>10|3" />
		<i3dMapping id="hudFillLevel" node="0>10|2" />
		<i3dMapping id="attacherJointCableSystem" node="0>13|0" />
		<i3dMapping id="connector" node="0>13|2" />
		<i3dMapping id="electricConnectorNode" node="0>13|2|0" />
		<i3dMapping id="chargingTriggerNode" node="0>13|3" />
		<i3dMapping id="lightGreen" node="0>14|0" />
		<i3dMapping id="lightRed" node="0>14|1" />
		<i3dMapping id="batteryBar" node="0>5|10|0|0" />
		<i3dMapping id="electricSocket_cap" node="0>13|4|1" />
	</i3dMappings>
</vehicle>