<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable type="cowHusbandry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/placeable.xsd">
    <storeData>
        <name>$l10n_storeItem_cowBarn</name>
        <image>store/store_winter.dds</image>
        <price>55000</price>
        <functions>
            <function>$l10n_function_animalPenCow</function>
            <function>$l10n_function_adjustableMeadow</function>
        </functions>
        <lifetime>1000</lifetime>
        <dailyUpkeep>0</dailyUpkeep>
        <rotation>0</rotation>
        <brand>NONE</brand>
        <species>PLACEABLE</species>
        <category>animalpens</category>
        <brush>
            <type>husbandry</type>
            <category>animals</category>
            <tab>cows</tab>
        </brush>
        <vertexBufferMemoryUsage>2363648</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>295168</indexBufferMemoryUsage>
        <textureMemoryUsage>7274496</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <filename>i3d/cowBarn.i3d</filename>
        <canBeRenamed>true</canBeRenamed>
        <boughtWithFarmland>false</boughtWithFarmland>
    </base>

    <placement useRandomYRotation="false" useManualYRotation="true" >
        <testAreas>
            <testArea startNode="testAreaStart01" endNode="testAreaEnd01" />
        </testAreas>

        <sounds>
            <place template="medImp" />
            <placeLayered template="cowLayer" />
        </sounds>
    </placement>

    <clearAreas>
        <clearArea startNode="clearAreaStart01" widthNode="clearAreaWidth01" heightNode="clearAreaHeight01"/>
    </clearAreas>

    <leveling requireLeveling="true" maxSmoothDistance="10" maxSlope="75" maxEdgeAngle="30">
        <levelAreas>
            <levelArea startNode="levelAreaStart01" widthNode="levelAreaWidth01" heightNode="levelAreaHeight01" groundType="concrete"/>
        </levelAreas>
    </leveling>

    <indoorAreas>
        <indoorArea startNode="indoorAreaStart01" widthNode="indoorAreaWidth01" heightNode="indoorAreaHeight01"/>
    </indoorAreas>

    <triggerMarkers>
        <triggerMarker node="markerMilk"         filename="$data/shared/assets/marker/markerIconMilk.i3d" />
        <triggerMarker node="markerFood"         filename="$data/shared/assets/marker/markerIconFood.i3d" />
        <triggerMarker node="markerAnimals"      filename="$data/shared/assets/marker/markerIconAnimals.i3d" />
        <triggerMarker node="markerLiquidManure" filename="$data/shared/assets/marker/markerIconSlurry.i3d" />
        <triggerMarker node="markerBales"        filename="$data/shared/assets/marker/markerIconBales.i3d" />
        <triggerMarker node="markerManure"       filename="$data/shared/assets/marker/markerIconLoad.i3d" />
    </triggerMarkers>

    <tipOcclusionUpdateAreas>
        <tipOcclusionUpdateArea startNode="tipOcclusionUpdateAreaStart01" endNode="tipOcclusionUpdateAreaEnd01" />
    </tipOcclusionUpdateAreas>

    <ai>
        <updateAreas>
            <updateArea startNode="tipOcclusionUpdateAreaStart01" endNode="tipOcclusionUpdateAreaEnd01" />
        </updateAreas>
    </ai>

    <hotspots>
        <hotspot type="COW" teleportNode="teleportNode" />
    </hotspots>

    <animatedObjects>
<!--         <animatedObject saveId="milk" >
            <animation duration="1.5">
                <part node="doorMilkLeft">
                    <keyFrame time="0.0" rotation="0 0 0"/>
                    <keyFrame time="1.0" rotation="0 -120 0"/>
                </part>
                <part node="doorMilkRight">
                    <keyFrame time="0.0" rotation="0 0 0"/>
                    <keyFrame time="1.0" rotation="0 120 0"/>
                </part>
            </animation>
            <controls triggerNode="doorMilkTrigger" posAction="ACTIVATE_HANDTOOL" posText="action_openDoor" negText="action_closeDoor" />
            <sounds>
                <moving linkNode="doorMilkBase" template="woodBigDoorLoop" />
                <posEnd linkNode="doorMilkBase" template="metalDoorsOpen" />
                <negEnd linkNode="doorMilkBase" template="metalDoorsClose" />
            </sounds>
        </animatedObject> -->
    </animatedObjects>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0" linkNode="milkContainer0" filename="$data/placeables/lely/nautilus/nautilus.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="milkContainer1" filename="$data/placeables/lely/nautilus/nautilus.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="milkContainer2" filename="$data/placeables/lely/nautilus/nautilus.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="milkContainer3" filename="$data/placeables/lely/nautilus/nautilus.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="milkContainer4" filename="$data/placeables/lely/nautilus/nautilus.i3d"/>
    </dynamicallyLoadedParts>

    <infoTrigger triggerNode="infoTrigger" />

    <husbandry saveId="Animals_COW" hasStatistics="false">
        <storage node="storage" fillTypes="LIQUIDMANURE MILK BUFFALOMILK STRAW MANURE" isExtension="false">
            <capacity fillType="LIQUIDMANURE" capacity="100000" />
            <capacity fillType="MILK"         capacity="165000" />
            <capacity fillType="BUFFALOMILK"  capacity="165000" />
            <capacity fillType="STRAW"        capacity="60000" />
            <capacity fillType="MANURE"       capacity="5000000" />
   </storage>

        <unloadingStation supportsExtension="true" storageRadius="50" hideFromPricesMenu="true">
            <unloadTrigger exactFillRootNode="exactFillRootNodeStraw" fillTypes="STRAW" />
            <unloadTrigger fillTypes="MILK BUFFALOMILK LIQUIDMANURE" />
        </unloadingStation>

        <loadingStation supportsExtension="true" storageRadius="50">
            <loadTrigger triggerNode="liquidManureTrigger" fillTypes="LIQUIDMANURE" fillLitersPerSecond="2000" aiNode="aiLoadingNodeLiquidManure" />
            <loadTrigger triggerNode="milkTrigger" fillTypes="MILK BUFFALOMILK" fillLitersPerSecond="2000" aiNode="aiLoadingNodeMilk"/>
            <loadTrigger triggerNode="manureTrigger" fillTypes="MANURE" fillLitersPerSecond="5000" aiNode="aiLoadingNodeManure" />
        </loadingStation>

        <animals type="COW" baseMaxNumAnimals="150" maxNumVisualAnimals="40">
            <navigation shape="navMeshShape" />
            <loadingTrigger node="loadingTrigger" />
        </animals>

        <food capacity="120000" >
            <foodPlaces>
                <foodPlace node="foodPlace1" />
<!--                 <foodPlace node="foodPlace2" />
                <foodPlace node="foodPlace3" />
                <foodPlace node="foodPlace4" />
                <foodPlace node="foodPlace5" />
                <foodPlace node="foodPlace6" />
                <foodPlace node="foodPlace7" />
                <foodPlace node="foodPlace8" />
                <foodPlace node="foodPlace9" /> -->
            </foodPlaces>
            <dynamicFoodPlane node="fillVolumeFood" defaultFillType="forage" maxAllowedHeapAngle="60" maxSubDivEdgeLength="0.5" capacity="10000"/>
            <unloadTrigger exactFillRootNode="exactFillRootNodeFood" />
            <baleTrigger triggerNode="baleTrigger"/>
        </food>

        <liquidManure />

        <milk>
            <milkingRobots>
                <milkingRobot linkNode="milkingRobot1" class="MilkingRobot" filename="$data/placeables/lely/astronautA5/astronautA5.xml" />
            </milkingRobots>
        </milk>

        <water automaticWaterSupply="true">
            <waterPlaces>
                <waterPlace node="waterPlace1" />
            </waterPlaces>
        </water>

        <straw>
            <manure factor="2.5" />
            <strawPlane node="strawPlane" minY="-0.185" maxY="0.0" colorChange="false" />
        </straw>

        <fence xmlFilename="$data/placeables/brandless/fences/husbandries/cowFence/cowFence.xml">
            <sections>
                <section segmentId="SEGMENT" customizable="true">
                    <node node="fence1Node1" />
                    <node node="fence1Node2" />
                    <node node="fence1Node3" />
                    <node node="fence1Node4" />
                </section>
            </sections>
        </fence>

        <meadow>
            <fruitType name="GRASS" eatableStartGrowthState="greenMiddle" eatableEndGrowthState="harvestReady" eatenGrowthState="greenSmall" />
            <fruitType name="MEADOW" eatableStartGrowthState="greenMiddle" eatableEndGrowthState="harvestReady" eatenGrowthState="greenSmall" />

            <createTask weedState="0">
                <fruit type="MEADOW" growthState="greenSmall" />
                <ground type="NONE" />
                <terrainGroundType name="grass" />
            </createTask>
        </meadow>
    </husbandry>

    <colorConfigurations>
        <material slotName="color_mat" />
        <colorConfiguration color="RUDOLFHOERMANN_GREEN"/>
        <colorConfiguration color="RUDOLFHOERMANN_BEIGE"/>
        <colorConfiguration color="RUDOLFHOERMANN_RED"/>
        <colorConfiguration color="RUDOLFHOERMANN_BLUE"/>
        <colorConfiguration color="RUDOLFHOERMANN_DARKGREY"/>
        <colorConfiguration color="RUDOLFHOERMANN_LIGHTGREY"/>
        <colorConfiguration color="RUDOLFHOERMANN_WHITEALU"/>
        <colorConfiguration color="RUDOLFHOERMANN_GREYALU"/>
        <colorConfiguration color="RUDOLFHOERMANN_OXIDRED"/>
        <colorConfiguration color="RUDOLFHOERMANN_WOODDARK"/>
        <colorConfiguration color="RUDOLFHOERMANN_WOODBRIGHT"/>
        <colorConfiguration color="RUDOLFHOERMANN_LIGHTGREEN"/>
        <colorConfiguration color="RUDOLFHOERMANN_DARKBEIGE"/>
    </colorConfigurations>
<!-- 
    <solarPanels>
        <solarPanelsConfigurations>
            <solarPanelsConfiguration name="$l10n_ui_no" isActive="false">
                <objectChange node="solarPanels" visibilityActive="false"/>
            </solarPanelsConfiguration>

            <solarPanelsConfiguration name="$l10n_ui_yes" isActive="true" price="25000" incomePerHour="87" />
        </solarPanelsConfigurations>
    </solarPanels> -->

    <i3dMappings>
        <i3dMapping id="clearAreaStart01" node="0>0|0" />
        <i3dMapping id="clearAreaWidth01" node="0>0|0|0" />
        <i3dMapping id="clearAreaHeight01" node="0>0|0|1" />
        <i3dMapping id="levelAreaStart01" node="0>1|0" />
        <i3dMapping id="levelAreaWidth01" node="0>1|0|0" />
        <i3dMapping id="levelAreaHeight01" node="0>1|0|1" />
        <i3dMapping id="indoorAreaStart01" node="0>2|0" />
        <i3dMapping id="indoorAreaWidth01" node="0>2|0|0" />
        <i3dMapping id="indoorAreaHeight01" node="0>2|0|1" />
        <i3dMapping id="testAreaStart01" node="0>3|0" />
        <i3dMapping id="testAreaEnd01" node="0>3|0|0" />
        <i3dMapping id="tipOcclusionUpdateAreaStart01" node="0>4|0" />
        <i3dMapping id="tipOcclusionUpdateAreaEnd01" node="0>4|0|0" />
        <i3dMapping id="fillVolumeFood" node="0>5|0" />
        <i3dMapping id="exactFillRootNodeFood" node="0>5|1" />
        <i3dMapping id="foodPlace1" node="0>5|2|0" />
        <i3dMapping id="foodPlace2" node="0>5|2|1" />
        <i3dMapping id="foodPlace3" node="0>5|2|2" />
        <i3dMapping id="foodPlace4" node="0>5|2|3" />
        <i3dMapping id="foodPlace5" node="0>5|2|4" />
        <i3dMapping id="foodPlace6" node="0>5|2|5" />
        <i3dMapping id="foodPlace7" node="0>5|2|6" />
        <i3dMapping id="foodPlace8" node="0>5|2|7" />
        <i3dMapping id="foodPlace9" node="0>5|2|8" />
        <i3dMapping id="baleTrigger" node="0>5|3" />
        <i3dMapping id="waterPlace1" node="0>6|0" />
        <i3dMapping id="exactFillRootNodeStraw" node="0>7|0" />
        <i3dMapping id="baleTriggerStraw" node="0>7|1" />
        <i3dMapping id="strawPlane" node="0>7|2" />
        <i3dMapping id="milkTrigger" node="0>8|0" />
        <i3dMapping id="aiLoadingNodeMilk" node="0>8|1" />
        <i3dMapping id="milkingRobot1" node="0>8|2" />
        <i3dMapping id="milkContainer0" node="0>8|3" />
        <i3dMapping id="milkContainer1" node="0>8|4" />
        <i3dMapping id="milkContainer2" node="0>8|5" />
        <i3dMapping id="milkContainer3" node="0>8|6" />
        <i3dMapping id="milkContainer4" node="0>8|7" />
        <i3dMapping id="manureTrigger" node="0>9|0" />
        <i3dMapping id="aiLoadingNodeManure" node="0>9|1" />
        <i3dMapping id="liquidManureTrigger" node="0>10|0" />
        <i3dMapping id="aiLoadingNodeLiquidManure" node="0>10|1" />
        <i3dMapping id="navigationRootNode" node="0>11" />
        <i3dMapping id="navMeshShape" node="0>11|0"/>
        <i3dMapping id="storage" node="0>12" />
        <i3dMapping id="loadingTrigger" node="0>13" />
        <i3dMapping id="infoTrigger" node="0>14" />
        <i3dMapping id="markerMilk" node="0>15|0" />
        <i3dMapping id="markerBales" node="0>15|1" />
        <i3dMapping id="markerFood" node="0>15|2" />
        <i3dMapping id="markerLiquidManure" node="0>15|3" />
        <i3dMapping id="markerManure" node="0>15|4" />
        <i3dMapping id="markerAnimals" node="0>15|5" />
        <i3dMapping id="teleportNode" node="0>15|6" />
        <i3dMapping id="fence1Node1" node="0>19|0|0"/>
        <i3dMapping id="fence1Node2" node="0>19|0|1"/>
        <i3dMapping id="fence1Node3" node="0>19|0|2"/>
        <i3dMapping id="fence1Node4" node="0>19|0|3"/>
    </i3dMappings>
</placeable>
