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

    <storeData>
        <name>HT 50 MC</name>
        <specs>
            <capacity unit="$l10n_unit_liter">45000</capacity>
            <combination>ITR 26.33 HD</combination>
        </specs>
        <functions>
            <function>$l10n_function_hookLiftContainer</function>
        </functions>
        <image>store/ht50.dds</image>
        <price>45000</price>
        <dailyUpkeep>40</dailyUpkeep>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>BERGMANN</brand>
        <category>tippers</category>
        <vertexBufferMemoryUsage>521420</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>66324</indexBufferMemoryUsage>
        <textureMemoryUsage>10334216</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <typeDesc>$l10n_typeDesc_container</typeDesc>
    <filename>itRunner/containerChaffMC.i3d</filename>

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

    <wheels autoRotateBackSpeed="2.0">
        <wheel restLoad="0.5" repr="0>0" radius="0.085" initialCompression="50" suspTravel="0.05" spring="300" damper="100" frictionScale="0.35" mass="0.02" maxLatStiffness="300" maxLatStiffnessLoad="3"/>
        <wheel restLoad="0.5" repr="0>1" radius="0.085" initialCompression="50" suspTravel="0.05" spring="300" damper="100" frictionScale="0.35" mass="0.02" maxLatStiffness="300" maxLatStiffnessLoad="3"/>
    </wheels>

    <brakeForce>0.5</brakeForce>

    <lights>
        <low>
            <light                        decoration="0>6|0" lightTypes="0 1 2 3"/> <!--BackLights-->
        </low>
        <high>
            <light realLight="0>6|1" decoration="0>6|0" lightTypes="0 1 2 3" /> <!--BackLights-->
        </high>
    </lights>

    <turnLights>
        <turnLightLeft  realLight="0>8|0|1" decoration="0>8|0|0" />
        <turnLightRight realLight="0>8|1|1" decoration="0>8|1|0" />
    </turnLights>

    <brakeLights>
        <brakeLight decoration="0>7|0" realLight="0>6|1"/>
    </brakeLights>

    <cylinderedHydraulicSound file="$data/sounds/hydraulicUp.wav" pitchOffset="0.8" volume="0.4" />
    <fillSound file="$data/maps/sounds/siloFillSound.wav" pitchOffset="1.0" volume="1.5" />

    <inputAttacherJoints>
        <inputAttacherJoint index="0>2" jointType="hookLift" allowsJointRotLimitMovement="false" upperRotationOffset="0" forceSelectionOnAttach="false"/>
    </inputAttacherJoints>

    <fillUnits>
        <fillUnit unit="$l10n_unit_literShort" fillTypeCategories="bulk" capacity="48000" />
    </fillUnits>

    <fillVolumes>
        <volumes>
            <volume index="0>3|5|0" >
                <deformNode index="0>3|11|0" />
                <deformNode index="0>3|11|1" />
                <deformNode index="0>3|11|2" />
                <deformNode index="0>3|11|3" />
            </volume>
        </volumes>

        <heights>
            <height fillVolumeIndex="1">
                <refNode index="0>3|10|0" />
                <refNode index="0>3|10|1" />
                <node index="0>3|6|0" baseScale="1.06 1 1" transAxis="0 1 0" orientateToWorldY="true" />
            </height>
        </heights>

         <unloadInfos>
            <unloadInfo fillVolumeIndex="1" >
                <node index="0>3|10|0" width="1.0" length="2.6" minHeight="0.7" priority="2" />
                <node index="0>3|10|1" width="1.0" length="2.6" minHeight="0.7" priority="2" />
                <node index="0>3|10|2" width="1.0" length="8.6" />
                <node index="0>3|10|3" width="1.0" length="8.6" />
            </unloadInfo>
        </unloadInfos>
    </fillVolumes>

    <tipReferencePoints>
        <tipReferencePoint index="0>3|7" width="2.5" />
    </tipReferencePoints>

    <tipAnimations>
        <tipAnimation speedScale="1" animationName="tipAnimationBack" doorAnimationName="tipAnimationBackDoor" doorAnimationOpenSpeedScale="1" doorAnimationCloseSpeedScale="-1.2" dischargeStartTime="0.2" dischargeEndTime="15" >
            <tipEffect>
                <effectNode effectNode="0>3|6|0" materialType="unloading" materialTypeId="3" fadeTime="0.5" />
                <effectNode effectNode="0>3|6|1" materialType="smoke"     materialTypeId="1" fadeTime="0.5" />
            </tipEffect>
            <fillVolume>
                <unloadInfo index="1" />
                <height index="1"/>
            </fillVolume>
        </tipAnimation>
    </tipAnimations>

    <fillRootNode index="0>" />
    <exactFillRootNode index="0>4" />
    <fillAutoAimTargetNode index="0>5" startZ="3" endZ="-2.9" invert="false" fillUnitIndex="1" startPercentage="25"/>
    <fillMassNode index="0>" />

    <movingTools>
        <movingTool index="0>3|0" playSound="true">
            <controls axis="AXIS_DOOR" invertAxis="true" invertMouseAxis="false" iconFilename="$dataS2/menu/moveControls/topDoor.png" />
            <rotation rotSpeed="50" rotAcceleration="160" rotMax="90" rotMin="0" speedFactor="0.3" rotationAxis="1" />
            <dependentPart index="0>3|1" />
        </movingTool>

        <!-- backTipping -->
        <movingTool index="0>3|2" playSound="true">
            <dependentPart index="0>3|3" />
        </movingTool>

        <movingTool index="0>3|0">
            <dependentPart index="0>3|1" />
        </movingTool>
    </movingTools>

    <movingParts>
        <movingPart index="0>3|1" referencePoint="0>3|0|0" referenceFrame="0>3|8">
            <translatingPart index="0>3|1|0" />
        </movingPart>

        <movingPart index="0>3|1" referencePoint="0>3|0|0" referenceFrame="0>3|10">
            <translatingPart index="0>3|1|0" />
        </movingPart>
        <movingPart index="0>3|3" referencePoint="0>3|2|0" referenceFrame="0>3|9">
            <translatingPart index="0>3|3|0" />
        </movingPart>
    </movingParts>

    <animations>
        <!-- move col -->
        <animation name="tipAnimationBack">
            <part node="0>3|14"   startTime="0" endTime="14" startTrans="0 1.846 3.848" endTrans="0 1.846 -3.02" />
        </animation>

        <!-- backdoor -->
        <animation name="tipAnimationBackDoor">
            <part node="0>3|2"   startTime="0" endTime="4" startRot="0 0 0" endRot="90 0 0" />

            <!-- fillVolume deformers -->
            <part node="0>3|11|0"   startTime="0" endTime="4" startTrans="1.132 3.205 -3.190" endTrans="1.132 3.205 -2.570" />
            <part node="0>3|11|1"   startTime="0" endTime="4" startTrans="-1.132 3.205 -3.190" endTrans="-1.132 3.205 -2.570" />
            <part node="0>3|11|2"   startTime="0" endTime="4" startTrans="1.132 3.205 -3.813" endTrans="1.132 3.205 -3.190" />
            <part node="0>3|11|3"   startTime="0" endTime="4" startTrans="-1.132 3.205 -3.813" endTrans="-1.132 3.205 -3.190" />
        </animation>
    </animations>

    <tipScrollerNodes>
        <tipScrollerNode index="0>3|12" shaderParameterName="offsetUV" scrollSpeed="1.2" shaderParameterComponent="1" turnOnFadeTime="1" turnOffFadeTime="1" />
        <tipScrollerNode index="0>3|13" shaderParameterName="scrollPosition" scrollSpeed="0.41" scrollLength="6.784" shaderParameterComponent="1" turnOnFadeTime="1" turnOffFadeTime="1"/>
    </tipScrollerNodes>

    <hookLiftContainer tiltContainerOnDischarge="false"/>

	<baseColorConfigurations icon="$dataS2/menu/hud/configurations/config_color.png" price="1200" useDefaultColors="true">
		<baseColorConfiguration color="1 1 1 1"/>
		<colorNode node="0>3"/>
	</baseColorConfigurations>

    <washable dirtDuration="90" washDuration="1" workMultiplier="4" />

    <components count="1">
        <component1 centerOfMass="0 0.2 0" solverIterationCount="10" />
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" fileTurnedOn="$dataS2/menu/schemas/implementSchemaTurnedOn.png" fileSelectedTurnedOn="$dataS2/menu/schemas/implementSchemaSelectedTurnedOn.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>
