﻿<?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>JUMP 320</name>
        <specs>
            <workingWidth>3.2</workingWidth>
        </specs>
        <functions>
            <function>$l10n_function_snowPlow</function>
        </functions>
        <storePacks>
            <storePack>STARTER_SNOW</storePack>
        </storePacks>
        <image>$data/vehicles/samasz/jump320/store_jump320.png</image>
        <price>6000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>SAMASZ</brand>
        <category>winterEquipment</category>
        <shopTranslationOffset>0 0.005 0</shopTranslationOffset>
        <shopRotationOffset>0.723 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1117440</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>187648</indexBufferMemoryUsage>
        <textureMemoryUsage>2228224</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_snowPlow</typeDesc>
        <filename>$data/vehicles/samasz/jump320/jump320.i3d</filename>
        <size width="4.5" length="2" lengthOffset="-0.1" />
        <components>
            <component centerOfMass="0 0.1 -0.2" solverIterationCount="20" mass="620" />
        </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="30" 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="30" 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.38" upper="0.9" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="0.5" diameter="0.016" color="0.05 0.05 0.05" adapterNode="hydraulicIn01_connector" isTwoPointHose="true">
           <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="0.5" diameter="0.016" color="0.05 0.05 0.05" adapterNode="hydraulicOut01_connector" isTwoPointHose="true">
           <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="electric"  node="electric"  length="0.5" diameter="0.005" color="0.05 0.05 0.05" adapterNode="electric_connector" isTwoPointHose="true">
           <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <lights>
        <sharedLight linkNode="sideMarker18Static_left" filename="$data/shared/assets/lights/lizard/sideMarker18_left.xml" />
        <sharedLight linkNode="sideMarker18Static_right" filename="$data/shared/assets/lights/lizard/sideMarker18_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.25 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="rotPart" playSound="true" wheelIndices="1 2">
                <controls axis="AXIS_HYDRAULICATTACHER2" invertAxis="false" mouseSpeedFactor="0.3" iconName="SNOW_PLOW_ROT_CENTER"/>
                <rotation rotSpeed="-15" rotAcceleration="80" rotMax="35" rotMin="-35" rotationAxis="2"/>
                <dependentPart node="leftHydraulic"/>
                <dependentPart node="rightHydraulic"/>
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="leftHydraulic" referencePoint="leftHydraulicRef" referenceFrame="leftHydraulicRef">
                <translatingPart node="leftHydraulicPunch01"/>
                <translatingPart node="leftHydraulicPunch02"/>
                <translatingPart node="leftHydraulicPunch03"/>
            </movingPart>
            <movingPart node="rightHydraulic" referencePoint="rightHydraulicRef" referenceFrame="rightHydraulicRef">
                <translatingPart node="rightHydraulicPunch01"/>
                <translatingPart node="rightHydraulicPunch02"/>
                <translatingPart node="rightHydraulicPunch03"/>
            </movingPart>
        </movingParts>
        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.6" volumeScale="2"   linkNode="rotPart" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="rotPart"/>
            <actionSound template="clackVar6"             pitchScale="1"   volumeScale="1"   linkNode="rotPart" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="rotPart"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.3" linkNode="rotPart" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="rotPart"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="1"   linkNode="rotPart" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="rotPart"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.3" linkNode="rotPart" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="rotPart"/>
        </sounds>
    </cylindered>

    <fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration name="$l10n_configuration_valueDefault">
                <fillUnits>
                    <fillUnit unitTextOverride="$l10n_unit_literShort" fillTypes="SNOW" capacity="5000" showInShop="false"  showOnHud="false"/>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <leveler fillUnitIndex="1" maxFillLevelPerMS="25" ignoreFarmlandState="true">
        <levelerNode node="levelerNode" width="2.8" zOffset="0" minDropWidth="2.5" maxDropWidth="3.2" minDropDirOffset="1" maxDropDirOffset="2" alignToWorldY="false"/>

        <force node="jump320_main_component1" maxForce="30" direction="1" />

        <pickUpDirection>1</pickUpDirection>

        <effects>
            <effectNode effectNode="effectMesh" effectClass="ShaderPlaneEffect" materialType="leveler" fadeTime="0.5" speed="10" />

            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_PIECES" linkNode="snowEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/jump320/snowArray.dds" numRows="13" rowLength="27" minFade="0.15" />
                <snowPlowEffect shaderPlane="effectMesh" minScale="1 0.44 0.53" maxScale="1 0.95 0.95" scrollSpeed="-5"/>
            </effectNode>
            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_DUST" linkNode="snowEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/jump320/snowArray.dds" numRows="13" rowLength="27" minFade="0.15" />
            </effectNode>
        </effects>
    </leveler>

    <ai>
        <agentAttachment width="3.0" height="1.2" length="1.5" lengthOffset="-0.1"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.5" maxX="0.5" minZ="-0.9" maxZ="-0.1" yOffset="0.3" />
        <bendingNode minX="-1.65" maxX="1.65" minZ="-0.2" maxZ="0.55" yOffset="-0.45" node="rotPart" />
    </foliageBending>

    <baseMaterial>
        <material name="jump320_vmask_mat" baseNode="jump320_vis">
            <shaderParameter name="colorMat0" value="SAMASZ_ORANGE"/>
        </material>
    </baseMaterial>

    <i3dMappings>
        <i3dMapping id="jump320_main_component1" node="0>" />
        <i3dMapping id="jump320_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="rotPart" node="0>0|1|0" />
        <i3dMapping id="axisLeft" node="0>0|1|0|0|0" />
        <i3dMapping id="wheelLeft" node="0>0|1|0|0|0|0" />
        <i3dMapping id="axisRight" node="0>0|1|0|0|1" />
        <i3dMapping id="wheelRight" node="0>0|1|0|0|1|0" />
        <i3dMapping id="sideMarker18Static_left" node="0>0|1|0|1|0|0" />
        <i3dMapping id="sideMarker18Static_right" node="0>0|1|0|1|0|1" />
        <i3dMapping id="rightHydraulicRef" node="0>0|1|0|2" />
        <i3dMapping id="leftHydraulicRef" node="0>0|1|0|3" />
        <i3dMapping id="levelerNode" node="0>0|1|0|4" />
        <i3dMapping id="effectMesh" node="0>0|1|0|5|0" />
        <i3dMapping id="snowEffectNode" node="0>0|1|0|5|1" />
        <i3dMapping id="leftHydraulic" node="0>0|1|1" />
        <i3dMapping id="leftHydraulicPunch01" node="0>0|1|1|0" />
        <i3dMapping id="leftHydraulicPunch02" node="0>0|1|1|0|0" />
        <i3dMapping id="leftHydraulicPunch03" node="0>0|1|1|0|0|0" />
        <i3dMapping id="rightHydraulic" node="0>0|1|2" />
        <i3dMapping id="rightHydraulicPunch01" node="0>0|1|2|0" />
        <i3dMapping id="rightHydraulicPunch02" node="0>0|1|2|0|0" />
        <i3dMapping id="rightHydraulicPunch03" node="0>0|1|2|0|0|0" />
    </i3dMappings>
</vehicle>
