﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="turnOnShovel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>Ruby 2000</name>
        <specs>
            <combination filterCategory="frontLoaders" />
            <combination filterCategory="frontLoaderVehicles" />
        </specs>
        <functions>
            <function>$l10n_function_sugarBeetCutter</function>
        </functions>
        <image>$data/vehicles/fliegl/ruby/store_ruby.png</image>
        <price>15500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>FLIEGL</brand>
        <category>frontLoaderTools</category>
        <shopTranslationOffset>0 0.007 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>260352</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>47616</indexBufferMemoryUsage>
        <textureMemoryUsage>917504</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_frontloaderTool</typeDesc>
        <filename>$data/vehicles/fliegl/ruby/ruby.i3d</filename>
        <size width="3.5" length="2" lengthOffset="0.15"/>
        <components>
            <component centerOfMass="0 0.08 -0.03" solverIterationCount="10" mass="1070" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="frontloader" />
        </inputAttacherJoints>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn" node="hydraulicIn01" length="1.5" diameter="0.015" straighteningFactor="1" isTwoPointHose="true" adapterNode="hydraulicIn01_connector">
           <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="1.0" diameter="0.015" straighteningFactor="1" isTwoPointHose="true" adapterNode="hydraulicOut01_connector">
           <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypeCategories="SHOVEL" capacity="2300" >
                        <exactFillRootNode node="exactFillRootNode" />
                        <alarmTriggers>
                            <alarmTrigger minFillLevel="0" maxFillLevel="0" turnOffInTrigger="true"/>
                        </alarmTriggers>
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <fillVolume>
        <fillVolumeConfigurations>
            <fillVolumeConfiguration>
                <volumes>
                    <volume node="fillVolume" allSidePlanes="false" maxAllowedHeapAngle="60" fillUnitIndex="1" />
                </volumes>
            </fillVolumeConfiguration>
        </fillVolumeConfigurations>

        <loadInfos>
            <loadInfo>
                <node node="fillVolumeLoadNode" width="1.3" length="0.1" />
            </loadInfo>
        </loadInfos>

        <unloadInfos>
            <unloadInfo>
                <node node="fillVolumeUnloadNode" width="1.3" length="0.1" />
            </unloadInfo>
        </unloadInfos>
    </fillVolume>

    <dischargeable requiresTipOcclusionArea="false">
        <dischargeNode node="dischargeNode" fillUnitIndex="1" emptySpeed="2300" canStartDischargeAutomatically="true">
            <raycast node="dischargeNode" maxDistance="30" useWorldNegYDirection="true" yOffset="2"/>
            <info width="2.0" length="1" zOffset="0.5"/>

            <effects>
                <effectNode effectClass="TipEffect">
                    <effectNode effectNode="emitterShape" effectClass="ParticleEffect" materialType="unloadingParticle"/>
                    <effectNode effectNode="grainEffect" materialType="unloading"  fadeTime="0.5" alignXAxisToWorldY="true" extraDistance="0.2"/>
                </effectNode>
                <effectNode effectNode="smokeEffect" materialType="unloadingSmoke"  fadeTime="0.5" />
            </effects>
        </dischargeNode>
        <dischargeNode node="dischargeNodeBack" emptySpeed="230" fillUnitIndex="1" unloadInfoIndex="1" needsSetIsTurnedOn="true" canStartDischargeAutomatically="true" turnOnActivateNode="true" canStartGroundDischargeAutomatically="true">
            <raycast useWorldNegYDirection="true" />
            <info width="2.0" length="0.5" zOffset="0" useRaycastHitPosition="true"/>
            <fillType converterName="SUGARBEET_CUTTER"/>
            <effects>
                <effectNode effectNode="emitterShapeCut" effectClass="ParticleEffect" materialType="unloadingParticle"/>
            </effects>
        </dischargeNode>
    </dischargeable>

    <shovel>
        <shovelNode node="pickUpNode" fillUnitIndex="1" loadInfoIndex="1" width="2.8" length="0.5" needsMovement="true" maxPickupAngle="105"/>
        <dischargeInfo node="dischargeNode" minSpeedAngle="105" maxSpeedAngle="150" dischargeNodeIndex="1" />
    </shovel>

    <turnOnVehicle>
        <animationNodes>
            <animationNode node="roll" rotSpeed="500"  rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="2"/>
        </animationNodes>

        <sounds>
            <start template="dischargeStart" volumeScale="0.8" pitchScale="0.8"/>
            <work  template="dischargeLoop"  volumeScale="0.8" pitchScale="0.8"/>
            <stop  template="dischargeStop"  volumeScale="0.8" pitchScale="0.8"/>
        </sounds>
    </turnOnVehicle>

    <ai>
        <agentAttachment width="2.6" height="1.2" length="1.4" lengthOffset="0.15"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.35" maxX="1.3" minZ="-0.55" maxZ="0.88" yOffset="0" />
    </foliageBending>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="ruby_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|1|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|1|0|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|1|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|1|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|1|1|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|1|1|0|0" />
        <i3dMapping id="pickUpNode" node="0>0|1" />
        <i3dMapping id="roll" node="0>0|2" />
        <i3dMapping id="dischargeNodeBack" node="0>0|3" />
        <i3dMapping id="fillVolume" node="0>0|4|0" />
        <i3dMapping id="fillVolumeLoadNode" node="0>0|4|1" />
        <i3dMapping id="fillVolumeUnloadNode" node="0>0|4|2" />
        <i3dMapping id="exactFillRootNode" node="0>0|4|3" />
        <i3dMapping id="dischargeNode" node="0>0|5" />
        <i3dMapping id="emitterShape" node="0>0|6|0" />
        <i3dMapping id="grainEffect" node="0>0|6|1|0" />
        <i3dMapping id="smokeEffect" node="0>0|6|1|1" />
        <i3dMapping id="emitterShapeCut" node="0>0|6|2" />
    </i3dMappings>
</vehicle>
