<?xml version="1.0" encoding="utf-8"?>
<foliageType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../shared/xml/schema/foliageType.xsd">
    <fruitType name="rye" shownOnMap="true" useForFieldMissions="true">
        <mapColors default="0 0.5 0.75 1" colorBlind="0.2918 0.3564 0.7011 1"/>
        <windrow fillType="straw" litersPerSqm="4"/>
        <harvest litersPerSqm="0.9" cutHeight="0.15" chopperType="CHOPPER_STRAW"/>
        <growth resetsSpray="true" growthRequiresLime="true"/>
        <soil lowDensityRequired="true" increasesDensity="false" consumesLime="true" startSprayLevel="0"/>
        <seeding directionSnapAngle="0" needsRolling="true" litersPerSqm="0.034" isAvailable="true"/>
        <cultivation isAllowed="true"/>
        <mulcher chopperType="CHOPPER_STRAW"/>
    </fruitType>
    <!-- rye

    0 1 2 3

    1 0 0 0 - invisible
    0 1 0 0 - green small
    1 1 0 0 - green small 2
    0 0 1 0 - green middle
    1 0 1 0 - green big
    0 1 1 0 - green big 2
    1 1 1 0 - harvest ready
    0 0 0 1 - dead
    1 0 0 1 - harvested (cut)

    -->
    <foliageLayer cellSize="8" objectMask="16711935" decalLayer="0" densityMapChannelOffset="0" numDensityMapChannels="4" numBlocksPerUnit="1.8" shapeSource="rye.i3d">
        <foliageStateDefaults distanceMapLayer="1" width="1.0" height="1.2" widthVariance="0.2" heightVariance="0.2" horizontalPositionVariance="0.5" />
        <!-- default LOD distances etc -->
        <foliageLodDefaults lod="0" viewDistance="18" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" />
        <foliageLodDefaults lod="1" viewDistance="80" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" />
        <!-- 1 0 0 0 - invisible -->
        <foliageState name="invisible" isGrowing="true" allowsWeeding="true" allowsHoeing="true"/>
        <!-- 0 1 0 0 - green small -->
        <foliageState name="Small1" numBlocksPerUnit="6" distanceMap="distanceMaps/foliage_rye_distance_diffuse.dds" isGrowing="true" allowsWeeding="true" allowsHoeing="true" fieldCourseLineHeight="0.3">
            <foliageShape>
                <foliageLod blockShape="0>0|0" numBlocksPerUnit="2.1" />
                <foliageLod blockShape="0>1|0" numBlocksPerUnit="2.1"  />
            </foliageShape>
        </foliageState>
        <!-- 1 1 0 0 - green small 2 -->
        <foliageState name="Small2" numBlocksPerUnit="6" distanceMap="distanceMaps/foliage_rye_distance_diffuse.dds" isGrowing="true" allowsWeeding="true" allowsHoeing="true" fieldCourseLineHeight="0.3">
            <foliageShape>
                <foliageLod blockShape="0>0|0" />
                <foliageLod blockShape="0>1|0" />
            </foliageShape>
        </foliageState>
        <!-- 0 0 1 0 - green middle -->
        <foliageState name="Medium" numBlocksPerUnit="5" distanceMap="distanceMaps/foliage_rye_distance_diffuse.dds" isGrowing="true" allowsWeeding="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.5">
            <foliageShape>
                <foliageLod blockShape="0>0|1" />
                <foliageLod blockShape="0>1|1" />
            </foliageShape>
        </foliageState>
        <!-- 1 0 1 0 - green big -->
        <foliageState name="Big" numBlocksPerUnit="3" distanceMap="distanceMaps/foliage_rye_distance_diffuse.dds" isGrowing="true" isForageReady="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.85">
            <foliageShape>
                <foliageLod blockShape="0>0|2" />
                <foliageLod blockShape="0>1|2" />
            </foliageShape>
        </foliageState>
        <!-- 1 1 1 0 - harvest ready -->
        <foliageState name="Ready" numBlocksPerUnit="3" distanceMap="distanceMaps/foliage_rye_distanceReady_diffuse.dds" isGrowing="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" isHarvestReady="true" groundType="HARVEST_READY" fieldCourseLineHeight="1">
            <foliageShape>
                <foliageLod blockShape="0>0|3" />
                <foliageLod blockShape="0>1|3" />
            </foliageShape>
        </foliageState>
        <!-- 0 0 0 1 - dead -->
        <foliageState name="Bad" numBlocksPerUnit="3" distanceMap="distanceMaps/foliage_rye_distanceBad_diffuse.dds" isWithered="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.85">
            <foliageShape>
                <foliageLod blockShape="0>0|4" />
                <foliageLod blockShape="0>1|4" />
            </foliageShape>
        </foliageState>
        <!-- 1 0 0 1 - harvested (cut) -->
        <foliageState name="Cut" isCut="true" isDestructedByWheel="true" isDestructedByDisaster="true">
            <foliageShape>
                <foliageLod blockShape="0>0|5" />
                <foliageLod blockShape="0>1|5" />
            </foliageShape>
        </foliageState>
        <!--  -->
    </foliageLayer>

    <growth>
        <seasonal initialState="Big">
            <period name="EARLY_SPRING"/>
            <period name="MID_SPRING" plantingAllowed="true">
                <update startState="invisible" endState="Small1" />
            </period>
            <period name="LATE_SPRING" plantingAllowed="true">
                <update startState="invisible" endState="Small1" />
                <update startState="Small1" endState="Small2" />
            </period>
            <period name="EARLY_SUMMER">
                <update startState="Small1" endState="Small2" />
                <update startState="Small2" endState="Medium" />
            </period>
            <period name="MID_SUMMER">
                <update startState="Small2" endState="Medium" />
                <update startState="Medium" endState="Big" />
            </period>
            <period name="LATE_SUMMER">
                <update startState="Big" endState="Ready" />
                <update startState="Medium" endState="Big" />
            </period>
            <period name="EARLY_AUTUMN">
                <update startState="Ready" endState="Bad" />
                <update startState="Big" endState="Ready" />
            </period>
            <period name="MID_AUTUMN">
                <update startState="Ready" endState="Bad" />
            </period>
            <period name="LATE_AUTUMN"/>
            <period name="EARLY_WINTER"/>
            <period name="MID_WINTER"/>
            <period name="LATE_WINTER"/>
        </seasonal>
        <nonSeasonal>
            <update startState="invisible"       endState="Small1" />
            <update startState="Small1"          endState="Small2" />
            <update startState="Small2"          endState="Medium" />
            <update startState="Medium"          endState="Big" />
            <update startState="Big"             endState="Ready" />
            <update startState="Ready"           endState="Bad" />
        </nonSeasonal>
    </growth>
</foliageType>