<?xml version="1.0" encoding="utf-8" standalone="no"?>
<vehicle type="RMCPUMP" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) Roughneck Modding Crew, All Rights Reserved.</annotation>
    <storeData>
        <name>            
            <en>RMC_Trash Pump</en>
        </name>
        <functions>
            <function>$l10n_function_slurrySpreader</function>
        </functions>
        <image>store_trashPump.dds</image>
        <price>58900</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>RMCENERGY</brand>
        <category>barrels</category>
        <shopTranslationOffset>0 0.016 0</shopTranslationOffset>
        <shopRotationOffset>0.399 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1063424</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>325120</indexBufferMemoryUsage>
        <textureMemoryUsage>786432</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>		
    </storeData>
    <base>
        <typeDesc>$l10n_typeDesc_manureBarrel</typeDesc>
        <filename>trashPump.i3d</filename>
        <sounds filename="sounds/pump.xml" volumeFactor="0.3"/>		
        <size width="3" length="1.5"/>
		<supportsPickUp>true</supportsPickUp>			
        <components>
            <component centerOfMass="0 0.33 -1.2" solverIterationCount="14" mass="5000"/>
            <component centerOfMass="0 0 0" solverIterationCount="14" mass="50"/>
            <joint component1="1" component2="2" node="0>7|0" rotLimit="0 0 0" transLimit="0 0 0"/>	
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TRAILER" />
    </base>


    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels>
                    <wheel filename="wheels/trailerWheel.xml" isLeft="true" hasTireTracks="true" >
                        <physics restLoad="0.35" repr="0>0|0" forcePointRatio="0.3" initialCompression="5" suspTravel="0.1" spring="40" damper="15" frictionScale="1"/>
                    </wheel>
                    <wheel filename="wheels/trailerWheel.xml" isLeft="false" hasTireTracks="true" >
                        <physics restLoad="0.35" repr="0>0|1" forcePointRatio="0.3" initialCompression="5" suspTravel="0.1" spring="40" damper="15" frictionScale="1"/>
                    </wheel>
                    <wheel filename="wheels/trailerWheel.xml" isLeft="true" hasTireTracks="true" >
                        <physics restLoad="0.35" repr="0>0|2" forcePointRatio="0.3" initialCompression="5" suspTravel="0.1" spring="40" damper="15" frictionScale="1"/>
                    </wheel>
                    <wheel filename="wheels/trailerWheel.xml" isLeft="false" hasTireTracks="true" >
                        <physics restLoad="0.35" repr="0>0|3" forcePointRatio="0.3" initialCompression="5" suspTravel="0.1" spring="40" damper="15" frictionScale="1"/>
                    </wheel>	
			
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <rimColorConfigurations>
        <rimColorConfiguration materialTemplateName="RIM_CONFIGURATION_WHITE" isDefault="true" />	
        <rimColorConfiguration materialTemplateName="RIM_CONFIGURATION_CHROME" price="1000" />
        <rimColorConfiguration materialTemplateName="RIM_DEFAULT" />
        <rimColorConfiguration materialTemplateName="RIM_CONFIGURATION_BLACK" />
    </rimColorConfigurations>
	
    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="0>3|0|1" jointType="trailer" attacherHeight="0.58" />		
            <inputAttacherJoint node="0>3|0|1" jointType="trailerLow" attacherHeight="0.58" />
            <inputAttacherJoint node="0>3|0|1" jointType="trailerCar" attacherHeight="0.58" />
            <inputAttacherJoint node="0>3|2" jointType="trailer" attacherHeight="0.58" />				
        </inputAttacherJoints>
        <brakeForce force="1"/>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
        <localHose>
            <hose type="TOOL_CONNECTOR_TOP_RIGHT" node="0>4|4|0" length="3" diameter="0.2" isWorldSpaceHose="true" isTwoPointHose="true" straighteningFactor="3.8"/>
            <target type="TOOL_CONNECTOR_TOP_RIGHT" node="1>0|0" straighteningFactor="3"/>
        </localHose>
		
    </connectionHoses>

    <enterable isTabbable="false">
        <enterReferenceNode node="0>" />
        <exitPoint node="0>10" />
        <cameras>
            <camera node="0>8|0|0" rotatable="true" rotateNode="0>8|0" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="6" transMax="80" translation="0 0 11" rotation="-19 180 0">
            </camera>
        </cameras>
    </enterable>	

	<motorized>
        <consumerConfigurations>
            <consumerConfiguration>
                <consumer fillUnitIndex="2" usage="50" fillType="diesel" />
            </consumerConfiguration>
        </consumerConfigurations>	
        <differentialConfigurations>
            <differentialConfiguration>
                <differentials>
                    <differential torqueRatio="0" maxSpeedRatio="0" wheelIndex1="1" wheelIndex2="2" />				
                </differentials>
            </differentialConfiguration>
        </differentialConfigurations>			
        <motorConfigurations>
            <motorConfiguration name="Pump" hp="85" price="0">
                <motor torqueScale="1.4" minRpm="1000" maxRpm="2500" maxForwardSpeed="135" maxBackwardSpeed="25" brakeForce="5" lowBrakeForceScale="0.22" lowBrakeForceSpeedLimit="1" rotInertia="0.0015" >
					<torque rpm="850" torque="0.9"/>
                    <torque rpm="1000" torque="1"/>
                    <torque rpm="1250" torque="1"/>
                    <torque rpm="1500" torque="0.9"/>
                    <torque rpm="2000" torque="0.8"/>
                    <torque rpm="2300" torque="0.6"/>
                </motor>	
              <transmission minForwardGearRatio="0" maxForwardGearRatio="0" minBackwardGearRatio="0" maxBackwardGearRatio="0" />
            </motorConfiguration>
        </motorConfigurations>
		<motorStartDuration>3500</motorStartDuration>
		
		<exhaustEffects>
            <exhaustEffect node="0>2|0|3" filename="$data/effects/exhaust/exhaust.i3d" minRpmColor="0.5 0.5 0.5 0.1" maxRpmColor="0.1 0.1 0.1 10" minRpmScale="0.1" maxRpmScale="0.3" xzRotationsForward="0 0" xzRotationsBackward="0 0" xzRotationsLeft="0 0" xzRotationsRight="0 0"/>
		</exhaustEffects>				
    </motorized>



	<dashboard>
        <groups>
            <group name="MOTOR_STARTING" isMotorStarting="true" />
            <group name="MOTOR_ACTIVE" isMotorStarting="true" isMotorRunning="true" />
            <group name="MOTOR_RUNNING" isMotorStarting="false" isMotorRunning="true" />
            <group name="MOTOR_OFF" isMotorStarting="false" isMotorRunning="false" />
        </groups>
        <default>
            <dashboard displayType="VISIBILITY" node="0>2|0|1" intensity="0.5" groups="MOTOR_ACTIVE"/>	
        </default>		
    </dashboard>

	<lights>
			<states>
				<state lightTypes="0"/>			
			</states>					
		<staticLightCompounds>
            <staticLightCompound>
                <node node="0>1|0" intensity="15"/>			
                <node node="0>1|1" intensity="8"/>			
            </staticLightCompound>
        </staticLightCompounds>	
	</lights>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration >
                <foldingParts startMoveDirection="0" turnOnFoldMinLimit="0.99" turnOnFoldMaxLimit="1">
                    <foldingPart animationName="folding" speedScale="0.7"/>
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

	<interactiveControl>
        <interactiveControlConfigurations title="$l10n_actionIC_Animation">
            <interactiveControlConfiguration >
				<interactiveControls>
					<outdoorTrigger node="0>9|0" />
					<!-- PIPE OUT -->
					<interactiveControl posText="SuctionLine_Out" negText="SuctionLine_In">
						<clickPoint node="0>4|5|0" size="0.05" type="OUTDOOR" iconType="CROSS"/>					
						<function name="FOLDING_TOGGLE">
						</function>		
					</interactiveControl>						
					<!-- OPEN VALVE -->
					<interactiveControl posText="Close_Valve" negText="Open_Valve" >
						<clickPoint node="0>4|7|0" size="0.05" type="OUTDOOR" iconType="CROSS"/>
						<animation name="Valve1" speedScale="1.0" initTime="0.0" />
					</interactiveControl>
					<interactiveControl posText="Close_Valve" negText="Open_Valve" >
						<clickPoint node="0>4|6|0" size="0.05" type="OUTDOOR" iconType="CROSS"/>
						<animation name="Valve2" speedScale="1.0" initTime="0.0" />
					</interactiveControl>					
					<interactiveControl negText="Start_Motor" posText="Motor">
						<clickPoint node="0>9|1" size="0.05" type="OUTDOOR" iconType="IGNITIONKEY" alignToCamera="true" />
						<function name="MOTOR_START_STOPP" />
					</interactiveControl>	
					<interactiveControl negText="Start_Pumping" posText="Stop_Pumping">
						<clickPoint node="0>9|2" size="0.05" type="OUTDOOR" iconType="CROSS" alignToCamera="true" />
						<function name="TURN_ON_OFF" />
					</interactiveControl>					
				</interactiveControls>
			</interactiveControlConfiguration>
		</interactiveControlConfigurations>
	</interactiveControl>

    <animations>
        <animation name="moveSupport">
            <part node="0>3|1" startTime="0" endTime="0.1" startTrans="0 0.198 0" endTrans="0 0 0" />
            <sound template="clackVar5" startTime="0.09" direction="-1" volumeScale="1.3" pitchScale="1"   linkNode="0>3|1"/>
            <sound template="clackVar1" startTime="0.01"                volumeScale="1.9" pitchScale="1.5" linkNode="0>3|1"/>
        </animation>      

        <animation name="folding">
            <part node="0>4|4" startTime="0" endTime="1" startVisibility="false" endVisibility="true"/>
            <part node="0>4|3" startTime="0" endTime="1" startVisibility="true" endVisibility="false"/>			
            <part node="1>0" startTime="0" endTime="1" startVisibility="false" endVisibility="true"/>
            <part node="0>4|5" startTime="1" endTime="2" startRot="0 90 0" endRot="0 0 0" />	
					
			
            <part node="0>7" startTime="0" endTime="1" startRot="0 0 0" endRot="0 0 0" startTrans="-0.0159228 2.17062807 -1.74203694" endTrans="-0.016 0.796233 -8" />
            <part node="1>"    startTime="1" duration="0.1" componentJointIndex="1" startRotLimit="0 0 0" endRotLimit="45 45 45" startTransLimit="0 0 0" endTransLimit="8 8 8"/>			
        </animation>    

        <animation name="Valve1">
            <part node="0>4|9" startTime="2.1" endTime="2.5" startVisibility="true" endVisibility="false"/>
            <part node="0>4|7" startTime="1" endTime="2" startRot="0 90 0" endRot="0 0 0" />		
            <part node="0>4|1|1|0|0" startTime="2.1" endTime="2.5" startVisibility="false" endVisibility="true"/>			
        </animation> 		
        <animation name="Valve2">
            <part node="0>4|8" startTime="2.1" endTime="2.5" startVisibility="true" endVisibility="false"/>
            <part node="0>4|6" startTime="1" endTime="2" startRot="0 90 0" endRot="0 0 0" />		
            <part node="0>4|1|1|0|1" startTime="2.1" endTime="2.5" startVisibility="false" endVisibility="true"/>
        </animation> 
		
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="0>7">
                <componentJoint index="1" />
            </movingTool>
		
		
        </movingTools>
    </cylindered>

    <turnOnVehicle turnOffIfNotAllowed="true" turnOffText="Turn Off Pump" turnOnText="Turn On Pump">
    </turnOnVehicle>

    <powerConsumer ptoRpm="550" neededMaxPtoPower="20"/>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>			
                    <fillUnit allowFoldingThreshold="1" unitTextOverride="$l10n_unit_literShort" fillTypeCategories="LIQUID" capacity="50000" startFillType="water" ignoreFillLimit="true" updateMass="false" startFillLevel="1500">
                        <fillRootNode node="0>" />
                        <exactFillRootNode node="1>1|0" />				
                    </fillUnit>				
					
					<fillTrigger consumePtoPower="true" litersPerSecond="100" />					
                    <fillUnit unitTextOverride="$l10n_unit_literShort" showOnHud="false" showInShop="false" fillTypes="diesel" capacity="350">
						<exactFillRootNode node="0>2|12"/>
					</fillUnit>					
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>

        <sounds>
            <fill template="slurry01" />
        </sounds>
    </fillUnit> 

	 <fillTriggerVehicle triggerNode="1>1|1" fillUnitIndex="1" litersPerSecond="1500"/>
	
	<dischargeable  consumePower="true" stopDischargeOnDeactivate="false" requiresTipOcclusionArea="false">
        <dischargeNode node="0>4|1|1|1" emptySpeed="1500" fillUnitIndex="1" maxDistance="8" needsSetIsTurnedOn="true" canStartDischargeAutomatically="true">
            <raycast yOffset="1" useWorldNegYDirection="true"/>
            <info width="0.4" length="0.4" useRaycastHitPosition="true"/>
			<trigger node="0>4|1|2"/>			
            <dischargeSound template="slurry01"/>

            <dischargeStateSound template="manureSpreaderDischarge" fadeIn="1.0" fadeOut="3.0" linkNode="0>4|1|1|1"/>
        </dischargeNode>		
	</dischargeable>
	
    <waterTrailer fillUnitIndex="1" fillLitersPerSecond="1500" fillNode="1>1|1">
        <sounds>
            <refill template="defaultRefuelSound" linkNode="0>" />
        </sounds>
    </waterTrailer>	
	
    <ai>
        <agentAttachment jointNode="0>3|0|1" rotCenterWheelIndices="1 2" width="2.5" height="2.1" length="5" lengthOffset="1.1"/>
    </ai>    

    <licensePlates>
        <licensePlate node="0>2|0|0" position="BACK" preferedType="SQUARISH" placementArea="0.07 0.14 0.07 0.14" frame="true"/>		
    </licensePlates>	

	<baseColorConfigurations useDefaultColors="true">
        <baseColorConfiguration materialTemplateName="VOLVO_GREY1"/>	
        <baseColorConfiguration materialTemplateName="VOLVO_RED1"/>	
        <baseColorConfiguration materialTemplateName="VOLVO_BLACK1"/>
        <baseColorConfiguration materialTemplateName="VOLVO_PURPLE1"/>
        <baseColorConfiguration materialTemplateName="VOLVO_BM_GREEN1"/>
        <baseColorConfiguration materialTemplateName="VOLVO_YELLOW1"/>
        <material materialSlotName="mainPaint"/>
    </baseColorConfigurations>

    <designColorConfigurations title="TwoTone" useDefaultColors="true">
        <designColorConfiguration materialTemplateName="VOLVO_BLACK1"/>	
        <designColorConfiguration materialTemplateName="VOLVO_RED1"/>	
        <designColorConfiguration materialTemplateName="VOLVO_PURPLE1"/>
        <designColorConfiguration materialTemplateName="VOLVO_BM_GREEN1"/>
        <designColorConfiguration materialTemplateName="VOLVO_YELLOW1"/>
        <designColorConfiguration materialTemplateName="VOLVO_GREY1"/>
        <material materialSlotName="twoTone"/>
    </designColorConfigurations>

    <foliageBending>
        <bendingNode minX="-1.3" maxX="1.3" minZ="-5.8" maxZ="6.3" yOffset="0.6" />
    </foliageBending>

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

</vehicle>
