﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="baleLoader">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Ursus T-127</en>
        <de>Ursus T-127</de>
    </name>
    <typeDesc>$l10n_TypeDesc_BaleLoader</typeDesc>
    <filename>data/vehicles/trailers/ursus/ursusT127.i3d</filename>

    <size width="4.5" length="15" lengthOffset="-1" />

    <wheels autoRotateBackSpeed="2.0">
        <wheel  restLoad="1.1" repr="0>0" radius="0.435" initialCompression="40" suspTravel="0.15" spring="20" damper="35" mass="0.07" hasTyreTracks="true" tyreTrackAtlasIndex="1"/>
        <wheel  restLoad="1.1" repr="0>1" radius="0.435" initialCompression="40" suspTravel="0.15" spring="20" damper="35" mass="0.07" hasTyreTracks="true" tyreTrackAtlasIndex="1"/>
    </wheels>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0|0" linkNode="0>0"     filename="$data/vehicles/wheels/trelleborg/trelleborgAW305_480_45_17.i3d" />
        <dynamicallyLoadedPart node="0|1" linkNode="0>1"     filename="$data/vehicles/wheels/trelleborg/trelleborgAW305_480_45_17.i3d" />
    </dynamicallyLoadedParts>

    <brakeForce>0.2</brakeForce>
    <capacity>8</capacity>

    <lightCoronas>
        <lightCorona index="0>8|0" />
    </lightCoronas>

    <brakeLights>
        <brakeLight index="0>8|1" />
    </brakeLights>

    <turnSignals>
        <turnSignalLeft index="0>8|4|0" />
        <turnSignalRight index="0>8|4|1" />
    </turnSignals>

    <reverseLights>
        <reverseLight index="0>8|2" />
    </reverseLights>

    <movingTools>
        <!-- mainPlattform Unload -->
        <movingTool index="0>3" >
            <!-- arm hydraulic -->
            <dependentPart index="0>4" />
        </movingTool>

        <!-- arm -->
        <movingTool index="0>5">
            <!-- arm hydraulic -->
            <dependentPart index="0>7" />
        </movingTool>
    </movingTools>

    <movingParts>
        <!-- mainplattform hydraulics -->
        <movingPart index="0>4" referencePoint="0>3|2" referenceFrame="0>3">
            <translatingPart index="0>4|0" />
        </movingPart>

        <!-- bale grab arm cylinder -->
        <movingPart index="0>7" referencePoint="0>5|1" referenceFrame="0>">
            <translatingPart index="0>7|0" />
        </movingPart>
    </movingParts>

    <animations>
        <!-- rotate bale grab from transport to work position -->
        <animation name="baleGrabberTransportToWork">
            <part node="0>5" startTime="0" duration="2.5" startRot="0 0 0" endRot="0 0 90"/>
        </animation>

        <!-- rotate bale grab up from work to drop bale position -->
        <animation name="baleGrabberWorkToDrop">
            <part node="0>5" startTime="0" duration="0.6" startRot="0 0 90" endRot="0 0 0"/>
        </animation>

        <!-- drop bale from grabber to platform -->
        <animation name="baleGrabberDropBale0">
            <part node="0>5|0|0" startTime="0" duration="0.5" startTrans="i3dValue" startRot="i3dValue" endTrans="0.357 0.756 0" endRot="0 0 -58.776"/>
            <part node="0>5|0|0" startTime="0.5" duration="0.5" startTrans="0.357 0.756 0" endTrans="0.357 1.562 0" startRot="0 0 -58.776" endRot="0 0 -120"/>
        </animation>

        <animation name="baleGrabberDropBale1">
            <part node="0>5|0|0" startTime="0" duration="0.5" startTrans="i3dValue" startRot="i3dValue" endTrans="0.397 0.322 0" endRot="0 0 -50"/>
        </animation>

        <animation name="moveBalePlaces"><!--startTrans="0.70045 0.86255 3.68286"  -->
            <part node="3|3" startTime="0" duration="10" endTrans="0.70045 0.81983 0.35" />
        </animation>

        <animation name="moveBalePlacesToEmpty">
            <part node="3|3" startTime="0" duration="13" endTrans="0.70045 0.81983 -0.218" />
        </animation>

        <!--
        These are not used, we have two different baleGrabberDropBale animations
        animation name="frontBalePusher">
            <part node="0>3|0" startTime="0" duration="0.77" startTrans="0.70045 0.24658 3.86013" endTrans="0.70045 0.24658 2.49" />
        </animation>
        <animation name="balesToOtherRow">
            <part node="0>3|4" startTime="0.05" endTime="0.77" startTrans="0.09318 0.86255 3.77725" endTrans="1.28049 0.86255 3.77725" />
        </animation-->

        <animation name="rotatePlatform">
            <!--part node="0>3|0" startTime="0" duration="0.77" startTrans="0.70045 0.24658 3.86013" endTrans="0.70045 0.24658 2.49" /-->
        </animation>

        <animation name="moveBalePlacesExtrasOnce">
            <!--part node="0>3|0" startTime="0" duration="0.77" startTrans="0.70045 0.24658 3.86013" endTrans="0.70045 0.24658 2.49" /-->
            <part node="0>3|0" startTime="0" endTime="2.5" startTrans="0.70045 0.24658 3.86013" endTrans="0.70045 0.24658 2.636" />
            <part node="0>3|0" startTime="2.5" endTime="5" startTrans="0.70045 0.24658 2.636" endTrans="0.70045 0.24658 3.86013" />
        </animation>

        <animation name="rotatePlatformEmpty">
        </animation>

        <animation name="moveBalePusherToEmpty">
        </animation>

        <animation name="emptyHidePusher1">
        </animation>

        <animation name="releaseFrontplattform">
        </animation>

        <animation name="closeGrippers">
        </animation>

        <!-- tipping main plattform -->
        <animation name="emptyRotate">
            <part node="0>3" startTime="0" duration="9" endRot="-90 0 0" />
        </animation>

        <!-- move support wheel down/up -->
        <animation name="moveSupport">
            <part node="0>6" startTime="0" duration="0.6" startTrans="-0.15259 0.5949 2.6865" endTrans="-0.15259 0.20638 2.6865" />
            <part node="0>8|3" startTime="0" duration="0.6" startRot="0 720 0" endRot="0 0 0" />
        </animation>
    </animations>

    <baleGrabber grabNode="0>5|0|0"/>

    <baleLoader moveBalePlacesAfterRotatePlatform="true" />

    <balePlaces startBalePlace="0>3|4" >
        <balePlace node="0>3|3|0" />
        <balePlace node="0>3|3|1" />
        <balePlace node="0>3|3|2" />
        <balePlace node="0>3|3|3" />
    </balePlaces>

    <baleTypes>
        <baleType minBaleDiameter="1.1" maxBaleDiameter="1.3" minBaleWidth="1.1" maxBaleWidth="1.3" />
    </baleTypes>

    <support animationName="moveSupport" />

    <allowFillFromAir value="false" />
    <allowTipDischarge value="false" />

    <inputAttacherJoints>
        <inputAttacherJoint index="2" jointType="trailerLow"/>
    </inputAttacherJoints>

    <baleGrabSound file="$data/vehicles/trailers/baler.wav" pitchOffset="1" volume="1"/>
    <baleLoaderHydraulicSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="2.0" volume="0.5"/>

    <washable dirtDuration="90" washDuration="1" workMultiplier="4" />

    <driveGroundParticleSystems>
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="1" />
        <driveGroundParticleSystem file="$data/vehicles/particleAnimations/shared/drivingParticleSystem.i3d" wheel="2" />
    </driveGroundParticleSystems>

    <components count="1">
        <component1 centerOfMass="0 0.5 -0.5" solverIterationCount="10" />
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>
