<?xml version="1.0" encoding="utf-8" standalone="no"?>
<vehicle type="cutter">
    <annotation>By LoogleCZ</annotation>
    <storeData>
        <name>NH TX 65 Header</name>
        <specs>
            <workingWidth>6.1</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_cutter</function>
        </functions>
        <image>store/header.png</image>
        <price>24000</price>
        <lifetime>600</lifetime>
        <rotation>180</rotation>
        <brand>NEWHOLLAND</brand>
        <category>cutters</category>
    </storeData>
    <base>
        <typeDesc>$l10n_typeDesc_cutter</typeDesc>
        <filename>cutter.i3d</filename>
        <size width="10.5" length="3.5"/>
        <speedLimit value="10"/>
        <components>
            <component centerOfMass="0 0.5 0" mass="1000"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0">
            <default name="DEFAULT_IMPLEMENT"/>
            <selected name="DEFAULT_IMPLEMENT_SELECTED"/>
        </schemaOverlay>
    </base>
    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="0>5" jointType="cutter">
                <distanceToGround lower="1.07" upper="2.8"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
    </attachable>
    <powerTakeOffs>
        <input inputNode="0>15" inputAttacherJointIndices="1" aboveAttacher="true"/>
    </powerTakeOffs>
    <powerConsumer ptoRpm="540" neededMaxPtoPower="50"/>

    <groundReferenceNodes>
        <groundReferenceNode node="0>21|3" threshold="0.3" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cutter" functionName="processCutterArea" >
            <area startNode="0>21|0" widthNode="0>21|1" heightNode="0>21|2" />
            <groundReferenceNode index="1" />
        </workArea>
    </workAreas>
    <cylindered>
        <movingTools>
            <movingTool node="0">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="false"/>
                <rotation rotSpeed="20" rotAcceleration="50" rotMax="180" rotMin="154"/>
                <dependentPart node="11|0"/>
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="11|0" referencePoint="0|4" referenceFrame="0>11|1">
                <translatingPart node="11|0|0"/>
            </movingPart>
            <movingPart node="0|0|1" referencePoint="0|2" referenceFrame="0>" scaleZ="true"/>
            <movingPart node="0|0|2" referencePoint="0|3" referenceFrame="0>" scaleZ="true"/>
        </movingParts>
        <sounds>
            <hydraulic file="$data/sounds/vehicles/hydraulic/hydraulic_loop_01.wav">
                <volume outdoor="0.4"/>
                <pitch outdoor="0.8"/>
            </hydraulic>
        </sounds>
    </cylindered>
	<animations>
        <animation name="knifeAnimation" looping="true">
            <part node="0>18|3|0" startTime="0" endTime="0.5" startTrans="0 0 0" endTrans="0 0.05 0"/>
            <part node="0>18|3|0" startTime="0.5" endTime="1" startTrans="0 0.05 0" endTrans="0 0 0"/>

            <part node="0>18|3|1" startTime="0" endTime="0.5" startTrans="0 0 0" endTrans="0 -0.05 0"/>
            <part node="0>18|3|1" startTime="0.5" endTime="1" startTrans="0 0.05 0" endTrans="0 0 0"/>

            <part node="0>18|2|0" startTime="0" endTime="0.5" startTrans="0 0 0" endTrans="0.1 0 0"/>
            <part node="0>18|2|0" startTime="0.5" endTime="1" startTrans="0.1 0 0" endTrans="0 0 0"/>

            <part node="0>7|2" startTime="0" endTime="0.5" startTrans="0.013 -0.425 0.13" endTrans="0.1 -0.425 0.13"/>
            <part node="0>7|2" startTime="0.5" endTime="1" startTrans="0.1 -0.425 0.13" endTrans="0.013 -0.425 0.13"/>
        </animation>
    </animations>
    <turnOnVehicle turnedOnByAttacherVehicle="true">
        <turnedOnAnimation name="knifeAnimation" speedScale="6" turnOnFadeTime="2" turnOffFadeTime="2"/>
    </turnOnVehicle>
	
	<cutter fruitTypeCategories="grainHeader">
        <fruitExtraObjects hideOnDetach="true">
            <fruitExtraObject fruitType="canola" node="0>18"/>
            <fruitExtraObject fruitType="wheat" node="0>7"/>
            <fruitExtraObject fruitType="barley" node="0>7"/>
            <fruitExtraObject fruitType="soybean" node="0>7"/>
            <fruitExtraObject fruitType="oat" node="0>7"/>
        </fruitExtraObjects>

        <testAreas>
            <testArea startNode="0>20|0" widthNode="0>20|0|0" heightNode="0>20|0|1" />
            <testArea startNode="0>20|1" widthNode="0>20|1|0" heightNode="0>20|1|1" />
            <testArea startNode="0>20|2" widthNode="0>20|2|0" heightNode="0>20|2|1" />
            <testArea startNode="0>20|3" widthNode="0>20|3|0" heightNode="0>20|3|1" />
        </testAreas>
		
        <effect>
            <effectNode linkNode="0>19|0" speedScale="0.0018" effectType="CENTER" changeSpeedScale="0.01" />
            <effectNode linkNode="0>19|1" speedScale="0.0013" lengthAndRadius="1 1 1 0.8" effectType="LEFT"  useInterpolation="true" minOffset="3" />
            <effectNode linkNode="0>19|2" speedScale="0.0013" lengthAndRadius="1 1 1 0.8" effectType="RIGHT" useInterpolation="true" minOffset="3" useMaxValue="true" />
        </effect>
		
        <animationNodes>
            <animationNode node="0>1" rotSpeed="-800" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="1"/>
            <animationNode node="0>0|0|0" rotSpeed="-200" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="1"/>
        </animationNodes>
		
    </cutter>
    <dynamicMount forceLimitScale="1"/>

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

    <ai>
        <areaMarkers leftNode="0>17|0|0" rightNode="0>17|0|1" backNode="0>17|0|2" />
        <sizeMarkers leftNode="0>17|1|0" rightNode="0>17|1|1" backNode="0>17|1|2" />
        <collisionTrigger node="0>17|2" />
    </ai>
</vehicle>
