<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="livestockTrailer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://validation.gdn.giants-software.com/xml/fs22/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <storeData>
        <name>
            <en>Cattle Trailer</en>
		</name>
        <functions>
            <function>$l10n_function_livestockTrailer</function>
        </functions>
        <image>store_cattleTrailer.png</image>
        <price>6000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>LIZARD</brand>
        <category>animalTransport</category>
        <vertexBufferMemoryUsage>176384</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>30464</indexBufferMemoryUsage>
        <textureMemoryUsage>524288</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>
	
    <base>
        <typeDesc>$l10n_typeDesc_livestockTrailer</typeDesc>
        <filename>cattleTrailer.i3d</filename>
        <size width="3" length="5"/>
        <components>
            <component centerOfMass="0 0.8 -1.4" solverIterationCount="10" mass="930"/>
        </components>
        <schemaOverlay name="IMPLEMENT" attacherJointPosition="0 0"/>
    </base>
	
    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0" brand="TRELLEBORG" saveId="TRELLEBORG_DEFAULT" >
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/260_70R15_3.xml" isLeft="true" hasTireTracks="true" hasParticles="true" >
                        <physics restLoad="0.41" repr="wheelLeft"  forcePointRatio="0.4" initialCompression="7" suspTravel="0.1" spring="40" damper="30" frictionScale="2"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/260_70R15_3.xml" isLeft="false" hasTireTracks="true" hasParticles="true" >
                        <physics restLoad="0.41" repr="wheelRight" forcePointRatio="0.4" initialCompression="7" suspTravel="0.1" spring="40" damper="30" frictionScale="2"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>

            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0" brand="TRELLEBORG">
                <wheels baseConfig="TRELLEBORG_DEFAULT">
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/260_70R16.xml"/>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/260_70R16.xml"/>
                </wheels>
            </wheelConfiguration>
			
            <wheelConfiguration name="$l10n_configuration_valueWheelNarrow" price="0" brand="TRELLEBORG">
                <wheels baseConfig="TRELLEBORG_DEFAULT">
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/215_75R17_5.xml"/>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/215_75R17_5.xml"/>
                </wheels>
                <objectChange node="wheelLeft" translationActive="1.057 0.318 -2.095"/>
	            <objectChange node="wheelRight" translationActive="-1.057 0.318 -2.095"/>
            </wheelConfiguration>
			
            <wheelConfiguration name="$l10n_configuration_valueWheelBroad" price="0" brand="TRELLEBORG">
                <wheels baseConfig="TRELLEBORG_DEFAULT">
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/340_55R16.xml"/>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/340_55R16.xml"/>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <hubs>
            <color0>SHARED_BLACK2</color0>
            <color1>SHARED_BLACK2</color1>
            <hub linkNode="wheelLeft"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.152 0.152 0.152" />
            <hub linkNode="wheelRight" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.152 0.152 0.152" />
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="trailerLow" attacherHeight="0.47"/>
        </inputAttacherJoints>
        <brakeForce force="0.6"/>
        <support animationName="moveSupport"/>
    </attachable>

    <lights>
        <sharedLight linkNode="bigTriangle" filename="$data/shared/assets/reflectors/lizard/bigTriangle.xml"/>
        <sharedLight linkNode="redTriangle_1" filename="$data/shared/assets/reflectors/lizard/redTriangle_02.xml"/>
        <sharedLight linkNode="redTriangle_2" filename="$data/shared/assets/reflectors/lizard/redTriangle_02.xml"/>
        <sharedLight linkNode="rear2ChamberLight_1" filename="$data/shared/assets/lights/lizard/rearLight36_left.xml"/>
        <sharedLight linkNode="rear2ChamberLight_2" filename="$data/shared/assets/lights/lizard/rearLight36_right.xml"/>
    </lights>

    <animations>
        <animation name="moveSupport">
            <part node="supportFeet" startTime="0" endTime="0.15" startTrans="0 0.19 0" endTrans="0 0 0" />
            <part node="supportHandle" startTime="0" endTime="0.15" startRot="0 0 0" endRot="0 -400 0"/>
        </animation>
        <animation name="folding">
            <part node="handleLeft" 	startTime="0" endTime="1" startTrans="0 0 0" endTrans="0 0.05 0"/>
            <part node="handleRight" 	startTime="1" endTime="2" startTrans="0 0 0" endTrans="0 0.05 0"/>
            <part node="backDoor" 		startTime="2" endTime="5" startRot="0 0 0" endRot="-103 0 0"/>
            <part node="handleLeft" 	startTime="2" endTime="3" startTrans="0 0.05 0" endTrans="0 0 0"/>
            <part node="handleRight" 	startTime="2" endTime="3" startTrans="0 0.05 0" endTrans="0 0 0"/>
        </animation>
    </animations>

	<foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="-1">
                    <foldingPart animationName="folding" speedScale="1.0"/>
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <cylindered>
        <movingTools>
            <movingTool node="backDoor" playSound="true">
                <dependentPart node="backDoorHydraulic"/>
            </movingTool>
        </movingTools>
        <movingParts>
            <movingPart node="backDoorHydraulic" referenceFrame="backDoorHydraulicRef" referencePoint="backDoorHydraulicRef"> <!--isActiveDirty="true" maxUpdateDistance="150"-->
                <translatingPart node="backDoorHydraulicPunch"/>
            </movingPart>
        </movingParts>
        <sounds>
            <hydraulic linkNode="0>" template="defaultHydraulicSound"/>
        </sounds>
    </cylindered>

    <livestockTrailer>
        <animal type="sheep" node="sheepSlots" numSlots="4"/>
        <animal type="pig" node="pigSlots" numSlots="4"/>
        <animal type="cow" node="cowSlots" numSlots="2"/>
    </livestockTrailer>

    <ai>
        <agentAttachment jointNode="attacherJoint" rotCenterWheelIndices="1 2" width="2.3" height="3" length="4.2" lengthOffset="0.2"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.2" maxX="1.2" minZ="-3.0" maxZ="0.0" yOffset="0.3"/>
    </foliageBending>

    <licensePlates>
        <licensePlate node="licensePlateBack" position="BACK" preferedType="SQUARISH" placementArea="0.17 0.2 0.08 0.2"/>
    </licensePlates>

	<designConfigurations title="$l10n_Triangle">
        <designConfiguration name="$l10n_button_yes"> <!---name="$l10n_yes"-->
			<objectChange node="bigTriangle" 		visibilityActive="true" />
        </designConfiguration>
        <designConfiguration name="$l10n_button_no">
			<objectChange node="bigTriangle" 		visibilityActive="false" />
        </designConfiguration>
    </designConfigurations>

    <baseMaterial>
        <material name="cattleTrailer_mat" baseNode="cattleTrailer">
            <shaderParameter name="colorMat0" value="CASEIH_RED1"/>
        </material>
    </baseMaterial>
	
    <baseMaterialConfigurations price="1500" useDefaultColors="true" defaultColorIndex="0">
        <baseMaterialConfiguration color="CASEIH_RED1"/>
        <material name="cattleTrailer_mat" shaderParameter="colorMat0" />
    </baseMaterialConfigurations>
	
    <rimColorConfigurations useDefaultColors="true">
        <rimColorConfiguration name="$l10n_ui_colorSilver" color="SHARED_WHITE1" material="18" price="0"/>
        <rimColorConfiguration name="$l10n_ui_colorWhite"  color="SHARED_WHITE2" material="0" price="0"/>
        <rimColorConfiguration name="$l10n_ui_colorBlack"  color="VALTRA_BLACK1" material="0" price="0"/>
    </rimColorConfigurations>

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

  <i3dMappings>
    <i3dMapping id="cattleTrailer_main_component1" node="0>" />
    <i3dMapping id="cowSlots" node="0>0|0" />
    <i3dMapping id="cow1" node="0>0|0|0" />
    <i3dMapping id="cow2" node="0>0|0|1" />
    <i3dMapping id="pigSlots" node="0>0|1" />
    <i3dMapping id="pig1" node="0>0|1|0" />
    <i3dMapping id="pig2" node="0>0|1|1" />
    <i3dMapping id="pig3" node="0>0|1|2" />
    <i3dMapping id="pig4" node="0>0|1|3" />
    <i3dMapping id="sheepSlots" node="0>0|2" />
    <i3dMapping id="sheep1" node="0>0|2|0" />
    <i3dMapping id="sheep2" node="0>0|2|1" />
    <i3dMapping id="sheep3" node="0>0|2|2" />
    <i3dMapping id="sheep4" node="0>0|2|3" />
    <i3dMapping id="handleLeft" node="0>1|0" />
    <i3dMapping id="handleRight" node="0>1|1" />
    <i3dMapping id="supportFeet" node="0>2|0" />
    <i3dMapping id="supportHandle" node="0>2|1" />
    <i3dMapping id="attacherJoint" node="0>3" />
    <i3dMapping id="cattleTrailer" node="0>4" />
    <i3dMapping id="backDoorHydraulic" node="0>6|0" />
    <i3dMapping id="backDoorHydraulicPunch" node="0>6|0|0" />
    <i3dMapping id="rear2ChamberLight_1" node="0>7|0|0" />
    <i3dMapping id="rear2ChamberLight_2" node="0>7|0|1" />
    <i3dMapping id="redTriangle_1" node="0>7|0|2" />
    <i3dMapping id="redTriangle_2" node="0>7|0|3" />
    <i3dMapping id="backDoor" node="0>8|0" />
    <i3dMapping id="backDoorHydraulicRef" node="0>8|0|1" />
    <i3dMapping id="bigTriangle" node="0>8|0|2" />
    <i3dMapping id="licensePlateBack" node="0>8|0|3" />
    <i3dMapping id="height" node="0>10|0" />
    <i3dMapping id="start" node="0>10|1" />
    <i3dMapping id="width" node="0>10|2" />
    <i3dMapping id="wheelLeft" node="0>12|0" />
    <i3dMapping id="wheelRight" node="0>12|1" />
  </i3dMappings>
</vehicle>