﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="leveler" 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>OLIMP 330</name>
        <specs>
            <workingWidth>3.3</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_snowPlow</function>
        </functions>
        <image>$data/vehicles/samasz/olimp330/store_olimp330.png</image>
        <price>7000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>SAMASZ</brand>
        <category>winterEquipment</category>
        <shopTranslationOffset>0 0.009 0</shopTranslationOffset>
        <shopRotationOffset>1.307 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1164032</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>201728</indexBufferMemoryUsage>
        <textureMemoryUsage>2621440</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_snowPlow</typeDesc>
        <filename>$data/vehicles/samasz/olimp330/olimp330.i3d</filename>
        <size width="4.5" length="2" lengthOffset="0.55" />
        <components>
            <component centerOfMass="0 0.1 0.425" solverIterationCount="20" mass="925" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.4" repr="axisLeft"  driveNode="wheelLeft"  useDriveNodeDirection="true" radius="0.12" width="0.1" forcePointRatio="0.2" initialCompression="20" suspTravel="0.05" spring="35" damper="15" versatileYRot="true" />
                    </wheel>
                    <wheel>
                        <physics rotSpeed="0" restLoad="0.4" repr="axisRight" driveNode="wheelRight" useDriveNodeDirection="true" radius="0.12" width="0.1" forcePointRatio="0.2" initialCompression="20" suspTravel="0.05" spring="35" damper="15" versatileYRot="true" />
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" topReferenceNode="topReferenceNode" jointType="implement" isControllable="true" lowerTransLimitScale="0 2.5 0" lowerRotLimitScale="0 0 0" upperRotLimitScale="0 0 0" upperRotationOffset="0" lowerRotationOffset="0">
                <distanceToGround lower="0.35" upper="0.9" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="0.8" diameter="0.015" color="0.05 0.05 0.05" adapterNode="hydraulicIn01_connector">
           <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="0.8" diameter="0.015" color="0.05 0.05 0.05" adapterNode="hydraulicOut01_connector">
           <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="electric"  node="electric"  length="0.8" diameter="0.005" color="0.05 0.05 0.05" adapterNode="electric_connector">
           <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <lights>
        <sharedLight linkNode="sideMarker17Static_left" filename="$data/shared/assets/lights/lizard/sideMarker17_left.xml" />
        <sharedLight linkNode="sideMarker17Static_right" filename="$data/shared/assets/lights/lizard/sideMarker17_right.xml" />
    </lights>

    <attacherJointControl>
        <control controlFunction="controlAttacherJointHeight" controlAxis="AXIS_HYDRAULICATTACHER1" invertControlAxis="true" mouseSpeedFactor="0.3" iconName="IMPLEMENT_ATTACHER_TRANS"/>

        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="0>" />
        </sounds>
    </attacherJointControl>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm"  startTime="0" endTime="0.4" startTrans="0 0 0" endTrans="0 -0.3 0" />

            <sound template="metalClose" startTime="0.01" direction="-1" volumeScale="0.8" pitchScale="1.8" linkNode="attacherJoint"/>
            <sound template="clackVar6"  startTime="0.01" direction="-1" volumeScale="0.8" pitchScale="1.3" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="leftArm" playSound="true" wheelIndices="1">
                <controls axis="AXIS_FRONTLOADER_ARM2" invertAxis="false" mouseSpeedFactor="0.3" iconName="SNOW_PLOW_ROT_LEFT"/>
                <rotation rotSpeed="15" rotAcceleration="80" rotMax="22" rotMin="-22" rotationAxis="2"/>
                <dependentPart node="leftArmHydraulic"/>
            </movingTool>
            <movingTool node="rightArm" playSound="true" wheelIndices="2">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseSpeedFactor="0.3" iconName="SNOW_PLOW_ROT_RIGHT"/>
                <rotation rotSpeed="-15" rotAcceleration="80" rotMax="22" rotMin="-22" rotationAxis="2"/>
                <dependentPart node="rightArmHydraulic" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="leftArmHydraulic" referencePoint="leftArmHydraulicRef" referenceFrame="leftArmHydraulicRef">
                <translatingPart node="leftArmHydraulicPunch" />
            </movingPart>
            <movingPart node="rightArmHydraulic" referencePoint="rightArmHydraulicRef" referenceFrame="rightArmHydraulicRef">
                <translatingPart node="rightArmHydraulicPunch" />
            </movingPart>
        </movingParts>
        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.6" volumeScale="2"   linkNode="leftArm"  actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="leftArm"/>
            <actionSound template="clackVar6"             pitchScale="1"   volumeScale="1"   linkNode="leftArm"  actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="leftArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.3" linkNode="leftArm"  actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="leftArm"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="1"   linkNode="leftArm"  actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="leftArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.3" linkNode="leftArm"  actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="leftArm"/>
            <actionSound template="defaultHydraulicSound" pitchScale="0.8" volumeScale="1.8" linkNode="rightArm" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="rightArm"/>
            <actionSound template="clackVar6"             pitchScale="1"   volumeScale="1"   linkNode="rightArm" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="rightArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.3" linkNode="rightArm" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="rightArm"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="1"   linkNode="rightArm" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="rightArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.3" linkNode="rightArm" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="rightArm"/>
        </sounds>
    </cylindered>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration name="$l10n_configuration_valueDefault">
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypes="SNOW" capacity="5000" showInShop="false" showOnHud="false"/>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypes="SNOW" capacity="5000" showInShop="false" showOnHud="false"/>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <leveler maxFillLevelPerMS="25" ignoreFarmlandState="true">
        <levelerNode node="levelerNode01" fillUnitIndex="1" width="1.2" zOffset="0" minDropWidth="1.4" maxDropWidth="2.2" minDropDirOffset="1.5" maxDropDirOffset="2.5" alignToWorldY="false"/>
        <levelerNode node="levelerNode02" fillUnitIndex="2" width="1.2" zOffset="0" minDropWidth="1.4" maxDropWidth="2.2" minDropDirOffset="1.5" maxDropDirOffset="2.5" alignToWorldY="false"/>

        <force node="olimp330_main_component1" maxForce="30" direction="1" />

        <pickUpDirection>1</pickUpDirection>

        <effects>
            <effectNode effectNode="effectLeft" effectClass="ShaderPlaneEffect" materialType="leveler" fadeTime="0.5" speed="10" />

            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_PIECES" linkNode="snowLeftEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/olimp330/snowLeftArray.dds" numRows="13" rowLength="27" minFade="0.15" />
                <snowPlowEffect shaderPlane="effectLeft" minScale="1 0.33 0.54" maxScale="1 0.95 0.95" scrollSpeed="-5"/>
            </effectNode>
            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_DUST" linkNode="snowLeftEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/olimp330/snowLeftArray.dds" numRows="13" rowLength="27" minFade="0.15" />
            </effectNode>

            <effectNode effectNode="effectRight" effectClass="ShaderPlaneEffect" materialType="leveler" fadeTime="0.5" speed="10" />

            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_PIECES" linkNode="snowRightEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/olimp330/snowRightArray.dds" numRows="13" rowLength="27" minFade="0.15" />
                <snowPlowEffect shaderPlane="effectRight" minScale="1 0.33 0.54" maxScale="1 0.95 0.95" scrollSpeed="-5"/>
            </effectNode>
            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_DUST" linkNode="snowRightEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/olimp330/snowRightArray.dds" numRows="13" rowLength="27" minFade="0.15" />
            </effectNode>
        </effects>
    </leveler>

    <ai>
        <agentAttachment width="3.4" height="1.5" length="1.5" lengthOffset="0.5"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.5" maxX="0.5" minZ="-0.2" maxZ="0.15" yOffset="0.25" />
        <bendingNode minX="0" maxX="1.75" minZ="-0.65" maxZ="0.1" yOffset="-0.45" node="leftArm" />
        <bendingNode minX="-1.75" maxX="0" minZ="-0.65" maxZ="0.1" yOffset="-0.45" node="rightArm" />
    </foliageBending>

    <baseMaterial>
        <material name="olimp330_mat" baseNode="olimp330_vis">
            <shaderParameter name="colorMat0" value="SAMASZ_ORANGE"/>
        </material>
    </baseMaterial>

    <i3dMappings>
        <i3dMapping id="olimp330_main_component1" node="0>" />
        <i3dMapping id="olimp330_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="supportArm" node="0>0|0|2" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|3|0" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|3|0|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|3|0|0|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|3|1" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|3|1|0" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|3|1|0|0" />
        <i3dMapping id="electric" node="0>0|0|3|2" />
        <i3dMapping id="electric_detached" node="0>0|0|3|2|0" />
        <i3dMapping id="electric_connector" node="0>0|0|3|2|0|0" />
        <i3dMapping id="leftArm" node="0>0|1|0" />
        <i3dMapping id="leftArmHydraulicRef" node="0>0|1|0|0" />
        <i3dMapping id="levelerNode01" node="0>0|1|0|1" />
        <i3dMapping id="axisLeft" node="0>0|1|0|2" />
        <i3dMapping id="wheelLeft" node="0>0|1|0|2|0" />
        <i3dMapping id="effectLeft" node="0>0|1|0|3|0" />
        <i3dMapping id="snowLeftEffectNode" node="0>0|1|0|3|1" />
        <i3dMapping id="sideMarker17Static_left" node="0>0|1|0|5|0" />
        <i3dMapping id="rightArm" node="0>0|1|1" />
        <i3dMapping id="rightArmHydraulicRef" node="0>0|1|1|0" />
        <i3dMapping id="levelerNode02" node="0>0|1|1|1" />
        <i3dMapping id="axisRight" node="0>0|1|1|2" />
        <i3dMapping id="wheelRight" node="0>0|1|1|2|0" />
        <i3dMapping id="effectRight" node="0>0|1|1|3|0" />
        <i3dMapping id="snowRightEffectNode" node="0>0|1|1|3|1" />
        <i3dMapping id="sideMarker17Static_right" node="0>0|1|1|5|0" />
        <i3dMapping id="leftArmHydraulic" node="0>0|1|2" />
        <i3dMapping id="leftArmHydraulicPunch" node="0>0|1|2|0" />
        <i3dMapping id="rightArmHydraulic" node="0>0|1|3" />
        <i3dMapping id="rightArmHydraulicPunch" node="0>0|1|3|0" />
        <i3dMapping id="hoses" node="0>0|2|0" />
    </i3dMappings>
</vehicle>
