<?xml version="1.0" encoding="utf-8" standalone="no"?>

<vehicle type="trailer">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <storeData>
        <name>
            <en>Turnco</en></name>
        <functions>
            <function>$l10n_function_tipper</function>
        </functions>
        <image>store450.png</image>

        <price>6500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>Turnco</brand>
        <category>augerWagons</category>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_tipper</typeDesc>
        <filename>Brent644.i3d</filename>
        <size width="3.5" length="7" lengthOffset="0.5"/>
        <components>
			<component centerOfMass="0 0.8 0" solverIterationCount="20" mass="500"/>

			<component centerOfMass="0 0 0.1" solverIterationCount="20" mass="500"/>
			<joint component1="1" component2="2" node="0>5" rotLimit="18 40 0" transLimit="0 0 0" maxRotDriveForce="0 0 50" rotDriveRotation="- - 0" rotDriveSpring="0 0 50" rotDriveDamping="0 0 30"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0">

            <default name="DEFAULT_IMPLEMENT"/>
            <selected name="DEFAULT_IMPLEMENT_SELECTED"/>
        </schemaOverlay>
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel filename="Wheels/Wheels.xml" isLeft="true" hasTireTracks="true" hasParticles="true">
                        <physics tipOcclusionAreaGroupId="1" restLoad="0.9" repr="0>0|0|0|0"  useReprDirection="true" forcePointRatio="0.5" initialCompression="15" suspTravel="0.13" spring="40" damper="50" frictionScale="2"/>
                    </wheel>
                    <wheel filename="Wheels/Wheels.xml" isLeft="false" hasTireTracks="true" hasParticles="true">
                        <physics tipOcclusionAreaGroupId="2" restLoad="0.9" repr="0>0|1|0|0" useReprDirection="true" forcePointRatio="0.5" initialCompression="15" suspTravel="0.13" spring="40" damper="50" frictionScale="2"/>
                    </wheel>
                    <wheel filename="Wheels/Wheels.xml" isLeft="false">
                        <physics tipOcclusionAreaGroupId="1" restLoad="0.9" repr="0>0|2"    forcePointRatio="0.5" initialCompression="15" suspTravel="0.13" spring="40" damper="50" frictionScale="2"/>
                    </wheel>
                    <wheel filename="Wheels/Wheels.xml" isLeft="true">
                        <physics tipOcclusionAreaGroupId="2" restLoad="0.9" repr="0>0|3"   forcePointRatio="0.5" initialCompression="15" suspTravel="0.13" spring="40" damper="50" frictionScale="2"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <attachable>

        <inputAttacherJoints>
            <inputAttacherJoint node="1>5" rootNode="1>" jointType="trailerLow"/>
        </inputAttacherJoints>

        <brakeForce>0.3</brakeForce>

    </attachable>

    <attacherJoints>
        <attacherJoint node="0>9" jointType="trailerLow" lowerRotLimit="10 80 80" upperRotationOffset="0" allowsJointLimitMovement="false">

            <schema position="0.5 0" rotation="0" invertX="false"/>
            <attachSound file="$data/sounds/vehicles/shared/attach_01.wav">
                <volume indoor="0.75" outdoor="1.10"/>
                <pitch outdoor="1.20"/>

                <lowpassGain indoor="0.75"/>

            </attachSound>

        </attacherJoint>
    </attacherJoints>


    <cylindered>
        <movingParts>
            <movingPart node="0>5" referencePoint="1>5" referenceFrame="1>" isActiveDirty="true" limitedAxis="2">
                <dependentPart node="0>0|1"/>
                <dependentPart node="0>0|0"/>
            </movingPart>
			
            <movingPart node="0>0|1" wheelIndices="1" referencePoint="1>1" localReferencePoint="0>0|1|1" referenceFrame="1>1" directionThreshold="0.03">
                <dependentPart node="0>0|1|1"/>
            </movingPart>
            <movingPart node="0>0|1|1" referencePoint="1>1" referenceFrame="1>2"/>

            <movingPart node="0>0|0" wheelIndices="2" referencePoint="1>2" localReferencePoint="0>0|0|1" referenceFrame="1>3" directionThreshold="0.03">
                <dependentPart node="0>0|0|1"/>
            </movingPart>
            <movingPart node="0>0|0|1" referencePoint="1>3" referenceFrame="1>4"/>
        </movingParts>
    </cylindered>

	<lights>
        <defaultLights>
            <defaultLight shaderNode="0>1|3|0|0" lightTypes="1" />
	    <defaultLight shaderNode="0>1|3|2|0|2" lightTypes="1" />
	    <defaultLight shaderNode="0>1|3|2|1|2" lightTypes="1" />
        </defaultLights>
        <turnLights>
            <turnLightLeft shaderNode="0>1|3|1|0|2" />
            <turnLightRight shaderNode="0>1|3|1|1|2" />
        </turnLights>
    </lights>

	<connectionHoses>
        <hose inputAttacherJointIndices="1" type="electric"  node="1>6|1"  length="0.3" diameter="0.008" straighteningFactor="0.5">
            <objectChange node="1>6|2" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unit="$l10n_unit_literShort" fillTypeCategories="bulk" capacity="7048">
                        <exactFillRootNode node="0>7"/>
                        <fillRootNode node="0>"/>

                        <fillMassNode node="0>"/>
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>

        <fillVolumeConfigurations>

            <fillVolumeConfiguration>
                <volumes>
                    <volume node="0>6|0" maxDelta="0.2" fillUnitIndex="1" />

                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

        <unloadInfos>
            <unloadInfo>
                <node node="0>6|1|0" width="1.0" length="0.8" minHeight="0.5" priority="2"/>
                <node node="0>6|1|1" width="1.0" length="0.8" minHeight="0.5" priority="2"/>
            </unloadInfo>
        </unloadInfos>

        <heightNodes>
            <heightNode fillVolumeIndex="1">
                <refNode node="0>6|1|0"/>
                <refNode node="0>6|1|1"/>
                <node node="0>3|0" baseScale="1 1 1" transAxis="0 1 0" transMax="0 0.1 0"/>
            </heightNode>
        </heightNodes>
    </fillVolume>


    <dischargeable>
        <dischargeNode node="0>8" emptySpeed="200" fillUnitIndex="1" unloadInfoIndex="1">

            <info width="0.5"/>
            <effects>

                <effectNode effectNode="0>3|0|0" materialType="unloading" materialTypeId="1" fadeTime="0.5"/>
                <effectNode effectNode="0>3|0|1" materialType="smoke" materialTypeId="1" fadeTime="0.5"/>

                <effectNode effectNode="0>3|1|0" effectClass="ParticleEffect"/>
            </effects>
        </dischargeNode>
    </dischargeable>

    <trailer>

        <trailerConfigurations>
            <trailerConfiguration>
                <trailer>
                    <tipSide name="$l10n_info_tipSideBack" dischargeNodeIndex="1">
                        <animation name="tipAnimationBack" speedScale="1" startTipTime="0.2"/>
                    </tipSide>
                </trailer>
            </trailerConfiguration>

        </trailerConfigurations>
    </trailer>

    <animations>
        <animation name="tipAnimationBack">
            <part node="0>4|1"   startTime="0" endTime="1"   startRot="0 0 85" endRot="0 0 0" />
	    <part node="0>1|6"   startTime="1" endTime="5"   startRot="90 180 165" endRot="840 180 165" />
	    <part node="0>4|0|0" startTime="1" endTime="5"  startTrans="-0.178 0.384 -0.4" endTrans="-0.17 0.614 -0.4" />
        </animation>
    </animations>

	<foliageBending>
        <bendingNode minX="-1.5" maxX="1.2" minZ="-1.5" maxZ="2.0" yOffset="0.6" />
    </foliageBending>

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