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

    <storeData>
        <name>$l10n_PFN_0_9</name>
        <specs>
            <combination>$l10n_MTZ_1025</combination>
        </specs>
        <functions>
            <function>$l10n_function_frontloader</function>
        </functions>
        <image>stores/store_pfn_09.png</image>
        <price>2500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>ROSTSELMASH</brand>
        <category>frontLoaders</category>
        <shopTranslationOffset>0 0 -1.5</shopTranslationOffset>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloader</typeDesc>
        <filename>tools/pfn_09.i3d</filename>
        <size width="2.5" length="2.5" lengthOffset="1.7"/>
        <components>
            <component centerOfMass="0 0.23 2" solverIterationCount="10" mass="540"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0">
            <default name="DEFAULT_IMPLEMENT"/>
            <selected name="DEFAULT_IMPLEMENT_SELECTED"/>
        </schemaOverlay>
    </base>

    <attacherJoints>
        <attacherJoint jointType="frontloader" node="attacherJointTools" nodeVisual="attacherJointTools_visuals" allowsJointLimitMovement="false" allowsLowering="false" rotLimitSpring="7500 7500 7500" rotLimitDamping="1 1 1" transLimitSpring="7500 7500 7500" transLimitDamping="1 1 1">
            <schema position="1 0" rotation="0" invertX="false"/>
			<objectChange node="pinAtacherLeft"  translationActive="0.3 -0.067 0.117"  translationInactive="0.262 -0.067 0.117"/>
			<objectChange node="pinAtacherRight" translationActive="-0.3 -0.067 0.117" translationInactive="-0.262 -0.067 0.117"/>
        </attacherJoint>
        <sounds>
            <attach template="ATTACH_01" linkNode="pfn_09_main_component1"/>
        </sounds>
    </attacherJoints>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" hardAttach="true" jointType="attachableFrontloader">
			    <objectChange node="hoses"         visibilityActive="true" visibilityInactive="false"/>
                <objectChange node="hoses1"        visibilityActive="true" visibilityInactive="false"/>
		        <objectChange node="wingArm"       visibilityActive="true" visibilityInactive="false"/>
				<objectChange node="hydraulicMain" visibilityActive="true" visibilityInactive="false"/>
			</inputAttacherJoint>
		</inputAttacherJoints>
        <support animationName="moveSupport"/>
    </attachable>

    <connectionHoses>
	    <target attacherJointIndices="1" type="hydraulicIn" node="hydraulic01Ref">
		    <objectChange node="attachedCab01" visibilityActive="true"  visibilityInactive="false"/>
			<objectChange node="detachedCab01" visibilityActive="false" visibilityInactive="true"/>
		</target>
		<target attacherJointIndices="1" type="hydraulicOut" node="hydraulic02Ref">
		    <objectChange node="attachedCab02" visibilityActive="true"  visibilityInactive="false"/>
			<objectChange node="detachedCab02" visibilityActive="false" visibilityInactive="true"/>
		</target>
    </connectionHoses>

    <animations>
        <animation name="moveSupport">
            <part node="supportCol" startTime="0" endTime="0.1" startRot="69 0 0" endRot="0 0 0"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="armDummy" delayedNode="arm">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseSpeedFactor="1.2" iconName="FRONTLOADER_ARM_ROTATE"/>
                <attacherJoint jointIndices="1"/>
                <rotation rotSpeed="20" rotAcceleration="150" rotMax="1" rotMin="-85" startRot="-10" detachingRotMinLimit="-10"/>
                <dependentPart node="attacherRotDummy"/>
                <dependentMovingTool node="attacherDummy" minRotLimits="-5 -15" maxRotLimits="100 50"/>
            </movingTool>
			
            <movingTool node="attacherDummy" delayedNode="attacher">
                <controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="true" mouseSpeedFactor="0.7" iconName="FRONTLOADER_ARM_ROTATE_TOOL"/>
                <attacherJoint jointIndices="1"/>
                <rotation rotSpeed="100" rotAcceleration="300" rotMax="55" rotMin="-60" startRot="-5" syncMaxRotLimits="true"/>
            </movingTool>
			
            <movingTool node="arm">
                <dependentPart node="hydraulicMain"/>
                <dependentPart node="attacherRot"/>
            </movingTool>
			
            <movingTool node="attacher">
                <dependentPart node="wingFront"/>
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="wingMiddle" localReferencePoint="wingArm" referencePoint="wingArmRef" referenceFrame="wingMiddleRefFrame">
                <dependentPart node="wingArm"/>
                <dependentPart node="hydraulicFront"/>
            </movingPart>
            <movingPart node="wingArm" referencePoint="wingArmRef" referenceFrame="arm"/>
	
            <movingPart node="wingFront" localReferencePoint="wingPart" referencePoint="wingPartRef" referenceFrame="wingFrontRefFrame">
                <dependentPart node="wingPart"/>
                <dependentPart node="hydraulicFront"/>
            </movingPart>
            <movingPart node="wingPart" referencePoint="wingPartRef" referenceFrame="wingPartRefFrame"/>

            <movingPart node="hydraulicMain" referencePoint="hydraulicMainRef" referenceFrame="arm" playSound="true">
                <translatingPart node="hydraulicMainPunch"/>
                <dependentPart node="wingMiddle"/>
            </movingPart>
            <movingPart node="hydraulicFront" referencePoint="hydraulicFrontRef" referenceFrame="wingMiddleRefFrame" playSound="true">
                <translatingPart node="hydraulicFrontPunch"/>
            </movingPart>

            <movingPart node="attacherRotDummy" referenceFrame="attacherRootDummy">
                <attacherJoint jointIndices="1"/>
            </movingPart>

            <movingPart node="attacherRot" referenceFrame="pfn_09_vis">
                <attacherJoint jointIndices="1"/>
                <dependentPart node="wingFront"/>
            </movingPart>
        </movingParts>

        <sounds>
            <hydraulic template="DEFAULT_HYDRAULIC_SOUND" linkNode="pfn_09_main_component1"/>
        </sounds>
    </cylindered>

    <foliageBending>
        <bendingNode minX="-0.58" maxX="0.58" minZ="-0.1" maxZ="1.7" yOffset="-0.18" node="hydraulicFront"/>
    </foliageBending>

    <baseMaterial>
        <material name="pfn_09_mat" baseNode="arm">
            <shaderParameter name="colorMat0" value="0.30 0.02 0.02 1"/>
			<shaderParameter name="colorMat1" value="0.03 0.03 0.03 1"/>
        </material>
    </baseMaterial>

    <baseMaterialConfigurations price="200">
        <baseMaterialConfiguration name="$l10n_Red"    color="0.3 0.02 0.02 1"/>
		<baseMaterialConfiguration name="$l10n_Blue"   color="0.0 0.27 0.70 1"/>
		<baseMaterialConfiguration name="$l10n_Yellow" color="0.8 0.55 0.05 1"/>
        <material name="pfn_09_mat" shaderParameter="colorMat0" />
    </baseMaterialConfigurations>

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

    <i3dMappings>
	    <i3dMapping id="pfn_09_main_component1"     node="0>"/>
		<i3dMapping id="pfn_09_vis"                 node="0>0"/>
		<i3dMapping id="attacherJoint"              node="0>0|0"/>
		<i3dMapping id="wingArmRef"                 node="0>0|1"/>
		<i3dMapping id="hoses1"                     node="0>0|2"/>
		<i3dMapping id="arm"                        node="0>1"/>
		<i3dMapping id="attacherRot"                node="0>1|0"/>
		<i3dMapping id="attacher"                   node="0>1|0|0"/>
		<i3dMapping id="wingPartRef"                node="0>1|0|0|0"/>
		<i3dMapping id="wingFrontRefFrame"          node="0>1|0|0|1"/>
	    <i3dMapping id="attacherJointTools_visuals" node="0>1|0|0|2"/>
		<i3dMapping id="pinAtacherLeft"             node="0>1|0|0|4"/>
		<i3dMapping id="pinAtacherRight"            node="0>1|0|0|5"/>
		<i3dMapping id="wingFront"                  node="0>1|1"/>
		<i3dMapping id="wingPart"                   node="0>1|1|0"/>
		<i3dMapping id="hydraulicFrontRef"          node="0>1|1|1"/>
		<i3dMapping id="wingPartRefFrame"           node="0>1|1|2"/>
		<i3dMapping id="wingMiddle"                 node="0>1|2"/>
		<i3dMapping id="hydraulicFront"             node="0>1|2|0"/>
		<i3dMapping id="hydraulicFrontPunch"        node="0>1|2|0|0"/>
		<i3dMapping id="wingArm"                    node="0>1|2|1"/>
		<i3dMapping id="hydraulic01Ref"             node="0>1|4|0"/>
        <i3dMapping id="attachedCab01"              node="0>1|4|1"/>
        <i3dMapping id="detachedCab01"              node="0>1|4|2"/>
		<i3dMapping id="hydraulic02Ref"             node="0>1|5|0"/>
        <i3dMapping id="attachedCab02"              node="0>1|5|1"/>
        <i3dMapping id="detachedCab02"              node="0>1|5|2"/>
		<i3dMapping id="hydraulicMainRef"           node="0>1|6"/>
		<i3dMapping id="wingMiddleRefFrame"         node="0>1|7"/>
		<i3dMapping id="hoses"                      node="0>1|8|0"/>
		<i3dMapping id="attacherRootDummy"          node="0>2"/>
		<i3dMapping id="attacherJointDummy"         node="0>2|0|0"/>
        <i3dMapping id="wingArmRefDummy"            node="0>2|0|0|0"/>
		<i3dMapping id="armDummy"                   node="0>3"/>
		<i3dMapping id="attacherRotDummy"           node="0>3|0"/>
		<i3dMapping id="attacherDummy"              node="0>3|0|0"/>
	    <i3dMapping id="attacherJointTools"         node="0>3|0|0|0"/>
	    <i3dMapping id="supportCol"                 node="0>3|1"/>
		<i3dMapping id="hydraulicMain"              node="0>4"/>
		<i3dMapping id="hydraulicMainPunch"         node="0>4|0"/>
    </i3dMappings>
</vehicle>