<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="MetalFach_N267">
	<annotation>Copyright (C) Mati7766, All Rights Reserved.</annotation>

    <typeDesc>$l10n_TypeDesc_ManureSpreader</typeDesc>
    <filename>WarfamaN218.i3d</filename>

    <size width="3.5" length="8.0" />

	<wheels autoRotateBackSpeed="2.0">
		<wheel driveMode="0" repr="2>2" radius="0.56" deltaY="0.3" suspTravel="0.3" spring="100" damper="1" mass="0.5" />
        <wheel driveMode="0" repr="2>3" radius="0.56" deltaY="0.3" suspTravel="0.3" spring="100" damper="1" mass="0.5" />
        <wheel driveMode="0" repr="2>4" radius="0.56" deltaY="0.3" suspTravel="0.3" spring="100" damper="1" mass="0.5" />
        <wheel driveMode="0" repr="2>5" radius="0.56" deltaY="0.3" suspTravel="0.3" spring="100" damper="1" mass="0.5" />
    </wheels>
    <brakeForce>2</brakeForce>
	<steeringAxleAngleScale startSpeed="5" endSpeed="70" />
    <lights count="1">
        <light1 index="5" />
    </lights>
	<lightCoronas>
		<lightCorona index="14" />
	</lightCoronas>	  	

    <cuttingAreas count="1">
        <cuttingArea1 startIndex="10" widthIndex="11" heightIndex="12"/>
    </cuttingAreas>

	<massScale value="1" />
    <capacity>12000</capacity>
    <startFillLevel>0</startFillLevel>

    <sprayParticleSystem file="particel.i3d" />

    <spraySound file="$data/vehicles/trailers/manureSpreader.wav" pitchOffset="1" volume="1"/>

    <sprayValves>
        <sprayValve index="13" />
		 <sprayValve index="36" />
		 <sprayValve index="37" />
		 <sprayValve index="38" />
		 <sprayValve index="39" />
    </sprayValves>

    <rotatingParts>
        <rotatingPart node="9|0" speed="-0.03" />
        <rotatingPart node="9|1" speed="0.03" />
        <rotatingPart node="9|2" speed="-0.03" />
        <rotatingPart node="9|3" speed="0.03" />
    </rotatingParts>
	
    <fillSound file="$data/maps/sounds/siloFillSound.wav" pitchOffset="1.0" volume="1.5" />

    <attacherJoint index="4" jointType="trailerLow"/>

    <fillPlanes>
        <fillPlane type="manure">
            <node index="30|1">
                <key time="0" y="1.16874" scale="1 1 0.01"/>
                <key time="0.5" y="1.16874" scale="1 1 0.5"/>
                <key time="1" y="1.16874" scale="1 1 1"/>
            </node>
        </fillPlane>
        <fillPlane type="grass">
            <node index="30|0">
                <key time="0" y="1.03465" scale="0.88 0.1 0.9"/>
				<key time="1" y="0.51839" scale="0.88 1 0.9"/>
            </node>
        </fillPlane>
        <fillPlane type="chaff">
            <node index="30|0">
                <key time="0" y="1.03465" scale="0.88 0.1 0.9"/>
				<key time="1" y="0.51839" scale="0.88 1 0.9"/>
            </node>
		</fillPlane>
    </fillPlanes>


    <sprayUsages>
        <sprayUsage fillType="manure" litersPerSecond="100" />
    </sprayUsages>

    <fillTypes fillTypes="manure grass chaff" />

    <support animationName="moveSupport" />

    <animations>
        <!-- move support wheel down/up -->
        <animation name="moveSupport">
            <part node="6" startTime="0" duration="0.5" startTrans="0.2 1.28 2.4" endTrans="0.2 0.84 2.4" />
		</animation>

		<!-- animacja tylnej burty -->
        <animation name="backDoorAnimation">
            <part node="0>23" startTime="0" duration="0.3" endTime="1" startTrans="-0.0204 2.50335 -2.72627" endTrans="-0.0204 3.7852 -2.72627"/>
        </animation>
    </animations>

	
	<doorAnimation name="openDoor" openSpeedScale="0.4" closeSpeedScale="-0.3" />
	<backDoorAnimation animationName="backDoorAnimation" />

	<tipReferencePoint index="28" />
	<tipAnimation rootNode="23" speedScale="1" clip="tipAnimationClipSource" />
	
	<fillRootNode index="0>" />
    <exactFillRootNode index="26" />
    <fillAutoAimTargetNode index="27" />
    <fillMassNode index="0>" />

	<adapter index="9" />
	<additionalBoards index="29" />
	
		<UVScrollParts>
		<UVScrollPart index="0>22|0|0|0" speed="0 -0.03" />
    </UVScrollParts>

    <movingTools>
        <!-- support -->
        <movingTool index="0>6" componentJointIndex="0" anchorActor="0"></movingTool>
    </movingTools>

    <components count="3">
        <component1 centerOfMass="0 0 -0.4" solverIterationCount="4" />
        <component2 solverIterationCount="8" />
		<component3 solverIterationCount="180" />
        <joint component1="0" component2="1" index="0>6|0" rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="0" component2="2" index="2>0" rotLimit="10 0 0" transLimit="0 0 0" />
    </components>
	
	<dischargeParticleSystems>
        <dischargeParticleSystem type="chaff" node="31" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDischargeParticleSystemChaff.i3d" />
		<dischargeParticleSystem type="grass" node="31" position="0 0 0" rotation="0 0 0" file="$data/vehicles/particleSystems/trailerDischargeParticleSystemChaff.i3d" />
    </dischargeParticleSystems>
	
	<powerShaft index="0>22|1" part="0>22|1|0" fixPoint="0>22|1|0|0" />
</vehicle>