﻿<?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>CITY 180</name>
        <specs>
            <workingWidth>1.8</workingWidth>
            <combination xmlFilename="$data/vehicles/rigitrac/ske50/ske50.xml"/>
            <combination xmlFilename="$data/vehicles/landini/seriesREX4/seriesREX4.xml"/>
            <combination xmlFilename="$data/vehicles/fendt/vario200/vario200.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_snowPlow</function>
        </functions>
        <image>$data/vehicles/samasz/city180/store_city180.png</image>
        <price>2000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>SAMASZ</brand>
        <category>winterEquipment</category>
        <shopTranslationOffset>0 0 0</shopTranslationOffset>
        <shopRotationOffset>0.697 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>655872</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>114688</indexBufferMemoryUsage>
        <textureMemoryUsage>2228224</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_snowPlow</typeDesc>
        <filename>$data/vehicles/samasz/city180/city180.i3d</filename>
        <size width="2.5" length="1.5" />
        <components>
            <component centerOfMass="0 0.1 -0.05" solverIterationCount="20" mass="145" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0" brand="TRELLEBORG" saveId="TRELLEBORG_DEFAULT">
                <wheels>
                    <wheel>
                        <physics restLoad="0.2" repr="wheelLeft" radius="0.1" width="0.1" forcePointRatio="0.2" initialCompression="12" suspTravel="0.15" spring="10" damper="10" yOffset="0.02"/>
                    </wheel>
                    <wheel>
                        <physics restLoad="0.2" repr="wheelRight" radius="0.1" width="0.1" forcePointRatio="0.2" initialCompression="12" suspTravel="0.15" spring="10" damper="10" yOffset="0.02"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" topReferenceNode="topReferenceNode" jointType="implement" isControllable="true" lowerTransLimitScale="0 1 0" lowerRotLimitScale="0 0 0" upperRotLimitScale="0 0 0" upperRotationOffset="0" lowerRotationOffset="0">
                <distanceToGround lower="0.2" upper="0.6" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="0.8" diameter="0.01" color="0.05 0.05 0.05" adapterNode="hydraulicIn01_connector">
           <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
           <objectChange node="hydraulicIn01_attached" visibilityActive="true" visibilityInactive="false"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="0.8" diameter="0.01" color="0.05 0.05 0.05" adapterNode="hydraulicOut01_connector">
           <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
           <objectChange node="hydraulicOut01_attached" visibilityActive="true" visibilityInactive="false"/>
        </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>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn01_connector"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut01_connector" filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <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.296 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">
                <controls axis="AXIS_FRONTLOADER_ARM2" invertAxis="false" mouseSpeedFactor="0.3" iconName="SNOW_PLOW_ROT_LEFT"/>
                <rotation rotSpeed="20" rotAcceleration="80" rotMax="22" rotMin="-22" rotationAxis="2"/>
                <dependentPart node="leftHydraulic"/>
            </movingTool>
            <movingTool node="rightArm" playSound="true">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseSpeedFactor="0.3" iconName="SNOW_PLOW_ROT_RIGHT"/>
                <rotation rotSpeed="-20" rotAcceleration="80" rotMax="22" rotMin="-22" rotationAxis="2"/>
                <dependentPart node="rightHydraulic" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="leftHydraulic" referencePoint="leftHydraulicRef" referenceFrame="leftHydraulicRef">
                <translatingPart node="leftHydraulicPunch"/>
            </movingPart>
            <movingPart node="rightHydraulic" referencePoint="rightHydraulicRef" referenceFrame="rightHydraulicRef">
                <translatingPart node="rightHydraulicPunch"/>
            </movingPart>
        </movingParts>
        <sounds>
            <actionSound template="defaultHydraulicSound" pitchScale="0.8" volumeScale="1.5" linkNode="leftArm" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="leftArm"/>
            <actionSound template="clackVar6"             pitchScale="1.4" volumeScale="0.8" linkNode="leftArm" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="leftArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.2" linkNode="leftArm" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="leftArm"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="0.8" linkNode="leftArm" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="leftArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.2" linkNode="leftArm" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="leftArm"/>
            <actionSound template="defaultHydraulicSound" pitchScale="1"   volumeScale="1.3" linkNode="rightArm" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="rightArm"/>
            <actionSound template="clackVar6"             pitchScale="1.2" volumeScale="0.8" linkNode="rightArm" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="rightArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.2" linkNode="rightArm" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="rightArm"/>
            <actionSound template="clackVar6"             pitchScale="0.9" volumeScale="0.8" linkNode="rightArm" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="rightArm"/>
            <actionSound template="cylinderPunch"         pitchScale="2"   volumeScale="0.2" 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"/>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>

    <leveler fillUnitIndex="1" maxFillLevelPerMS="25" ignoreFarmlandState="true">
        <levelerNode node="levelerNode01" width="0.45" zOffset="0" minDropWidth="0.7" maxDropWidth="1.3" minDropDirOffset="1.0" maxDropDirOffset="2" alignToWorldY="false"/>
        <levelerNode node="levelerNode02" width="0.45" zOffset="0" minDropWidth="0.7" maxDropWidth="1.3" minDropDirOffset="1.0" maxDropDirOffset="2" alignToWorldY="false"/>

        <force node="city180_main_component1" maxForce="15" 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/city180/snowLeftArray.dds" numRows="7" rowLength="23" minFade="0.15" />
                <snowPlowEffect shaderPlane="effectLeft" minScale="1 0.45 0.42" maxScale="1 0.95 0.95" scrollSpeed="-5"/>
            </effectNode>
            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_DUST" linkNode="snowLeftEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/city180/snowLeftArray.dds" numRows="7" rowLength="23" 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/city180/snowRightArray.dds" numRows="7" rowLength="23" minFade="0.15" />
                <snowPlowEffect shaderPlane="effectRight" minScale="1 0.45 0.42" maxScale="1 0.95 0.95" scrollSpeed="-5"/>
            </effectNode>
            <effectNode effectClass="SnowPlowMotionPathEffect" effectType="SNOW_DUST" linkNode="snowRightEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/samasz/city180/snowRightArray.dds" numRows="7" rowLength="23" minFade="0.15" />
            </effectNode>
        </effects>
    </leveler>

    <ai>
        <agentAttachment width="1.8" height="0.8" length="0.8" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.92" maxX="0.92" minZ="-0.4" maxZ="0.2" yOffset="0.02" />
    </foliageBending>

    <baseMaterial>
        <material name="city180_mat" baseNode="city180_vis">
            <shaderParameter name="colorMat0" value="SAMASZ_ORANGE"/>
        </material>
    </baseMaterial>

    <i3dMappings>
        <i3dMapping id="city180_main_component1" node="0>" />
        <i3dMapping id="city180_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="hydraulicIn01_attached" node="0>0|0|3|0|1" />
        <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="hydraulicOut01_attached" node="0>0|0|3|1|1" />
        <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="wheelLeft" node="0>0|1|0|0" />
        <i3dMapping id="levelerNode01" node="0>0|1|0|1" />
        <i3dMapping id="leftHydraulicRef" node="0>0|1|0|2" />
        <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|4|2" />
        <i3dMapping id="rightArm" node="0>0|1|1" />
        <i3dMapping id="wheelRight" node="0>0|1|1|0" />
        <i3dMapping id="levelerNode02" node="0>0|1|1|1" />
        <i3dMapping id="rightHydraulicRef" node="0>0|1|1|2" />
        <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|4|2" />
        <i3dMapping id="leftHydraulic" node="0>0|1|2" />
        <i3dMapping id="leftHydraulicPunch" node="0>0|1|2|0" />
        <i3dMapping id="rightHydraulic" node="0>0|1|3" />
        <i3dMapping id="rightHydraulicPunch" node="0>0|1|3|0" />
    </i3dMappings>
</vehicle>
