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

	<!-- STORE DATEN -->
    <storeData>
        <name>
			<en>Carlift</en>
			<de>Heckstapler</de>
		</name>
        <functions>
            <function>$l10n_function_heckstapler</function>
        </functions>
        <image>storelogo.png</image>
        <price>4500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>CJFARMING</brand>
        <category>misc</category>
        <vertexBufferMemoryUsage>2460948</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>419244</indexBufferMemoryUsage>
        <textureMemoryUsage>29360592</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

	<!-- BASIC DATEN -->
	<base>
        <typeDesc>$l10n_typeDesc_weight</typeDesc>
        <filename>heckstapler.i3d</filename>
        <size width="3" length="3" lengthOffset="1"/>
        <components>
            <component centerOfMass="0.00 0.00 0.03" solverIterationCount="10" mass="450" />
        </components>
        <schemaOverlay attacherJointPosition="0 0">
            <default name="DEFAULT_IMPLEMENT"/>
            <selected name="DEFAULT_IMPLEMENT_SELECTED"/>
        </schemaOverlay>
    </base>

	<!-- HUBWERK ANBINDUNG -->
    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerRotLimitScale="0 0 0" upperRotationOffset="1" lowerRotationOffset="0" needsLowering="false">
                <distanceToGround lower="0" upper="0.8" />
            </inputAttacherJoint>
        </inputAttacherJoints>
    </attachable>

	<!-- ANIMATION -->
    <animations>
        <animation name="mainArmMovement">
            <part node="vis_subframe" startTime="0" endTime="0.8" startTrans="0 -0.154 -0.114" endTrans="0 1.516 -0.114" />
            <part node="vis_fork" startTime="0" endTime="0.8" startTrans="0 0.033 0.163" endTrans="0 1.535 0.163" />
        </animation>
        <animation name="mainForkMovement">
            <part node="fork_back_right" startTime="0" endTime="0.8" startTrans="0 -0.033 -0.164" endTrans="-0.225 -0.033 -0.164" />
            <part node="fork_back_left" startTime="0" endTime="0.8" startTrans="0 -0.033 -0.164" endTrans="0.225 -0.033 -0.164" />
            <part node="fork_rotate_right" startTime="0" endTime="0.8" startTrans="0 0 0" endTrans="-0.225 0 0" />
            <part node="fork_rotate_left" startTime="0" endTime="0.8" startTrans="0 0 0" endTrans="0.225 0 0" />
        </animation>
    </animations>
	<cylindered>
        <movingTools>
            <movingTool node="vis_subframe" playSound="true">
                <controls axis="AXIS_FRONTLOADER_ARM" invertAxis="true" mouseSpeedFactor="0.5" iconName="CRANE_ARM2_ROTATE_X" />
                <animation animSpeed="0.2" animAcceleration="5" animName="mainArmMovement" />
                <dependentPart node="tubes_back" />
                <dependentPart node="tubes_front" />
                <dynamicMountAttacher value="true" />
            </movingTool>
            <movingTool node="vis_fork" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="true" mouseSpeedFactor="0.4" iconName="TOOL_OPEN_CLOSE" />
                <animation animSpeed="0.2" animAcceleration="5" animName="mainForkMovement" />
                <dynamicMountAttacher value="true" />
            </movingTool>
            <movingTool node="vis_mainframe" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL" invertAxis="true" mouseSpeedFactor="0.8" iconName="CRANE_ARM2_ROTATE_TOOL" />
                <rotation rotSpeed="10" rotAcceleration="150" rotMax="5" rotMin="-5" startRot="0" />
                <dependentPart node="hydraulic" />
				<dependentPart node="tubes_carrier" />
                <dynamicMountAttacher value="true" />
            </movingTool>
			<movingTool node="fork_rotate" playSound="true">
                <controls axis="AXIS_FRONTLOADER_ARM2" invertAxis="true" mouseSpeedFactor="0.9" iconName="TOP_DOOR_ROTATE" />
                <rotation rotSpeed="30" rotAcceleration="150" rotMax="45" rotMin="-90" startRot="0" />
				<dynamicMountAttacher value="true" />
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="hydraulic" referencePoint="hydraulic_ref" referenceFrame="hydraulic_ref">
                <translatingPart node="hydraulicpunch" />
            </movingPart>
            <movingPart node="tubes_back" referencePoint="tubes_back_ref" referenceFrame="tubes_back_ref" scaleZ="true"/>
            <movingPart node="tubes_front" referencePoint="tubes_front_ref" referenceFrame="tubes_front_ref" scaleZ="true" />
			<movingPart node="tubes_carrier" referencePoint="tubes_carrier_ref" referenceFrame="tubes_carrier_ref" scaleZ="true" />
        </movingParts>
        <sounds>
            <hydraulic template="DEFAULT_HYDRAULIC_SOUND" />
        </sounds>
    </cylindered>
	
	<!-- HYDRAULISCHE ANBINDUNG IN/OUT -->
	<connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydraulicIn1" length="0.05" diameter="0.014" straighteningFactor="0.05">
           <objectChange node="vis_support" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicIn2" length="0.05" diameter="0.014" straighteningFactor="0.05">
           <objectChange node="vis_support" visibilityActive="false" visibilityInactive="true"/>
		</hose>
    </connectionHoses>

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

	<!-- BELEUCHTUNG -->
    <lights>
        <states>
            <state lightTypes="0" />
            <state lightTypes="0 1" />
        </states>
        <realLights>
            <low>
                <light node="workLightBackLow" lightTypes="1"/>
            </low>
            <high>
                <light node="workLightBackHigh" lightTypes="1"/>
            </high>
        </realLights>
        <defaultLights>
            <defaultLight shaderNode="workLightBack_static" lightTypes="1"/>
        </defaultLights>
    </lights>
	
	<!-- LADEN DER HYDRAULIC ADAPTER -->
	<dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0|0" linkNode="hydraulicIn1Adapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
		<dynamicallyLoadedPart node="0|0" linkNode="hydraulicIn2Adapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
		<dynamicallyLoadedPart node="0|0" linkNode="hydraulicIn3Adapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
		<dynamicallyLoadedPart node="0|0" linkNode="hydraulicIn4Adapter"  filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>
	
	<!-- SPANGURTE -->
	<tensionBelts>
        <tensionBeltsConfigurations>
            <tensionBeltsConfiguration>
                <tensionBelts linkNode="belts" jointNode="0>" width="0.075" maxEdgeLength="0.1" geometryBias="0.01" ratchetPosition="0.2" defaultOffset="0.1" defaultOffsetSide="0.1" defaultHeight="4" activationTrigger="beltActivationTrigger">
                    <tensionBelt startNode="beltStart" endNode="beltEnd" offsetLeft="1.3"/>
                </tensionBelts>
            </tensionBeltsConfiguration>
        </tensionBeltsConfigurations>
    </tensionBelts>
	
	<!-- DESIGN / FARBWAHL -->
    <baseMaterial>
        <material name="stp_change_mat" baseNode="vis_mainframe">
            <shaderParameter name="colorMat1" value="FORTSCHRITT_RED"/>
        </material>
        <material name="stp_change_mat" baseNode="vis_subframe">
            <shaderParameter name="colorMat1" value="FORTSCHRITT_RED"/>
        </material>
    </baseMaterial>
    <baseMaterialConfigurations price="100" useDefaultColors="true" defaultColorIndex="13">
        <material name="stp_change_mat" shaderParameter="colorMat1" />
    </baseMaterialConfigurations>

	<!-- I3D KOMPONENTEN -->
	<i3dMappings>
		<i3dMapping id="maincomponent" node="0>" />
		<i3dMapping id="topReferenceNode" node="0>0" />
		<i3dMapping id="attacherJoint" node="0>1" />
		<i3dMapping id="vis_mainframe" node="0>2" />
		<i3dMapping id="vis_subframe" node="0>2|0" />
		<i3dMapping id="vis_fork" node="0>2|0|0" />
		<i3dMapping id="belts" node="0>2|0|0|0" />
		<i3dMapping id="fork_back_right" node="0>2|0|0|0|0" />
		<i3dMapping id="beltStart" node="0>2|0|0|0|0|0" />
		<i3dMapping id="fork_back_left" node="0>2|0|0|0|1" />
		<i3dMapping id="beltEnd" node="0>2|0|0|0|1|0" />
		<i3dMapping id="fork_rotate" node="0>2|0|0|1" />
		<i3dMapping id="fork_rotate_right" node="0>2|0|0|1|0" />
		<i3dMapping id="dynamicMountTrigger1" node="0>2|0|0|1|0|0|0" />
		<i3dMapping id="fork_rotate_left" node="0>2|0|0|1|1" />
		<i3dMapping id="dynamicMountTrigger2" node="0>2|0|0|1|1|0|0" />
		<i3dMapping id="jointNode" node="0>2|0|0|1|2" />
		<i3dMapping id="tubes_front_ref" node="0>2|0|0|2" />
		<i3dMapping id="beltActivationTrigger" node="0>7" />
		<i3dMapping id="tubes_front" node="0>2|0|1" />
		<i3dMapping id="tubes_back" node="0>2|0|2" />
		<i3dMapping id="hydraulic_ref" node="0>2|1" />
		<i3dMapping id="tubes_back_ref" node="0>2|2" />
		<i3dMapping id="hydraulic" node="0>3" />
		<i3dMapping id="hydraulicpunch" node="0>3|0" />
		<i3dMapping id="hydraulicIn1Adapter" node="0>4|0" />
		<i3dMapping id="hydraulicIn2Adapter" node="0>4|1" />
		<i3dMapping id="hydraulicIn3Adapter" node="0>4|2" />
		<i3dMapping id="hydraulicIn4Adapter" node="0>4|3" />
		<i3dMapping id="hydraulicIn1" node="0>4|4" />
		<i3dMapping id="hydraulicIn2" node="0>4|5" />
		<i3dMapping id="vis_support" node="0>6" />
		<i3dMapping id="tubes_carrier" node="0>3|1" />
		<i3dMapping id="tubes_carrier_ref" node="0>5|0" />
		<i3dMapping id="workLightBackLow" node="0>2|3|1|1" />
		<i3dMapping id="workLightBackHigh" node="0>2|3|1|0" />
		<i3dMapping id="workLightBack_static" node="0>2|3|0" />
    </i3dMappings>	
</vehicle>
