<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<placeable type="silo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../shared/xml/schema/placeable.xsd">
    <storeData>
        <name>            
		<en>Silos</en>	
		<de>Silos</de>		
		<pl>Silos</pl>	
        </name>
        <functions>
            <function>$l10n_function_farmSilo</function>
        </functions>
        <image>i3d/store_SFarm_barnSilo.dds</image>
        <price>40000</price>
        <dailyUpkeep>100</dailyUpkeep>
        <lifetime>1000</lifetime>
        <rotation>0</rotation>
        <brand>None</brand>
        <species>placeable</species>
        <category>silos</category>
        <brush>
            <type>placeable</type>
            <category>buildings</category>
            <tab>silos</tab>
        </brush>
        <vertexBufferMemoryUsage>809728</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>200192</indexBufferMemoryUsage>
        <textureMemoryUsage>18022400</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <filename>i3d/SFarm_barnSilo.i3d</filename>
        <canBeRenamed>true</canBeRenamed>
		<boughtWithFarmland>true</boughtWithFarmland>
    </base>

    <placement useRandomYRotation="false" useManualYRotation="true" >
        <testAreas>
            <testArea startNode="testArea1Start" endNode="testArea1End" />
        </testAreas>

        <sounds>
            <place template="siloImp" />
        </sounds>
    </placement>

    <clearAreas>
        <clearArea startNode="clearArea1Start" widthNode="clearArea1Width" heightNode="clearArea1Height"/>
    </clearAreas>

    <leveling requireLeveling="true" maxSmoothDistance="1" maxSlope="75" maxEdgeAngle="30">
        <levelAreas>
            <levelArea startNode="levelArea1Start" widthNode="levelArea1Width" heightNode="levelArea1Height" groundType="dirt"/>
        </levelAreas>
    </leveling>

    <indoorAreas>
        <indoorArea startNode="0>8|0" widthNode="0>8|0|0" heightNode="0>8|0|1" />		
    </indoorAreas>

    <tipOcclusionUpdateAreas>
        <tipOcclusionUpdateArea startNode="tipOcclusionUpdateArea1Start" endNode="tipOcclusionUpdateArea1End" />
    </tipOcclusionUpdateAreas>

    <ai>
        <updateAreas>
            <updateArea startNode="tipOcclusionUpdateArea1Start" endNode="tipOcclusionUpdateArea1End" />
        </updateAreas>
        <splines>
            <spline node="aiSpline" />
        </splines>
    </ai>

    <infoTrigger triggerNode="infoTrigger"/>

    <silo>
        <loadingStation node="loadingTrigger" supportsExtension="true" storageRadius="50">
            <loadTrigger triggerNode="loadingTrigger" fillLitersPerSecond="100" dischargeNode="dischargeNode" fillTypeCategories="farmSilo" aiNode="aiLoadingNode">
                <effectNode effectClass="PipeEffect" effectNode="pipeEffect"      materialType="pipe"           fadeTime="0.5" maxBending="0" controlPoint="4.8 0 0 0" />
                <effectNode                          effectNode="pipeEffectSmoke" materialType="unloadingSmoke" fadeTime="0.5" />
                <sounds>
                    <loading template="silosActive" />
                </sounds>
            </loadTrigger>
        </loadingStation>

        <unloadingStation supportsExtension="true" storageRadius="50">
            <unloadTrigger exactFillRootNode="exactFillRootNode" fillTypeCategories="farmSilo" aiNode="aiUnloadingNode"/>
        </unloadingStation>

        <storages>
			<storage node="storageSilo" fillTypeCategories="farmSilo" capacity="60000" isExtension="false">
				<dynamicFillPlane fillTypeCategories="farmSilo" node="fillVolume_grainSilo" maxAllowedHeapAngle="35" maxDelta="1" />
			</storage>
		</storages>
    </silo>
	
	<triggerMarkers>
        <triggerMarker node="markerLoading"   	filename="$data/shared/assets/marker/markerIconLoad.i3d" 		adjustToGround="false" />
        <triggerMarker node="markerUnloading" 	filename="$data/shared/assets/marker/markerIconUnload.i3d" 		adjustToGround="false" />
		<triggerMarker node="warningStripes01"/>
    </triggerMarkers>

    <hotspots>
        <hotspot type="UNLOADING" linkNode="mapPosition" teleportNode="teleportNode"/>
    </hotspots>
	
	<animatedObjects>
		<animatedObject saveId="barn01Door" >
            <animation duration="4">
				<part node="hand01">
					<keyFrame time="0" translation="0.003 -0.471 -1.632" rotation="0 0 0" />
					<keyFrame time="0.05" translation="0.003 -0.471 -1.632" rotation="0 0 -40" />
					<keyFrame time="0.1" translation="0.003 -0.471 -1.569" rotation="0 0 -40" />
					<keyFrame time="0.15" translation="0.003 -0.471 -1.569" rotation="0 0 0" />				
				</part>
				<part node="barn01Door_right">
					<keyFrame time="0.15" rotation="0 0 0" />
					<keyFrame time="0.55" rotation="0 100 0" />
				</part>
				<part node="barn01Door_left">
					<keyFrame time="0.35" rotation="0 0 0" />
					<keyFrame time="1" rotation="0 -100 0" />
				</part>
            </animation>
            <controls triggerNode="barn01Door_trigger" posAction="ACTIVATE_HANDTOOL" posText="action_openDoor" negText="action_closeDoor" />
            <sounds>
                <moving file="sounds/gate_loop.wav" loops="0" volume="0.8" radius="25" innerRadius="3" fadeOut="0.25"/>
                <posEnd file="sounds/gate_opened.wav" volume="0.8" radius="25" innerRadius="3" />
                <negEnd file="sounds/gate_closed.wav" volume="0.8" radius="25" innerRadius="3" />
            </sounds>
        </animatedObject>
		<animatedObject saveId="barn02Door" >
            <animation duration="4">
				<part node="hand02">
					<keyFrame time="0" translation="0.003 -0.471 -1.632" rotation="0 0 0" />
					<keyFrame time="0.05" translation="0.003 -0.471 -1.632" rotation="0 0 -40" />
					<keyFrame time="0.1" translation="0.003 -0.471 -1.569" rotation="0 0 -40" />
					<keyFrame time="0.15" translation="0.003 -0.471 -1.569" rotation="0 0 0" />				
				</part>
				<part node="barn02Door_right">
					<keyFrame time="0.15" rotation="0 0 0" />
					<keyFrame time="0.55" rotation="0 100 0" />
				</part>
				<part node="barn02Door_left">
					<keyFrame time="0.35" rotation="0 0 0" />
					<keyFrame time="1" rotation="0 -100 0" />
				</part>
            </animation>
            <controls triggerNode="barn02Door_trigger" posAction="ACTIVATE_HANDTOOL" posText="action_openDoor" negText="action_closeDoor" />
            <sounds>
                <moving file="sounds/gate_loop.wav" loops="0" volume="0.8" radius="25" innerRadius="3" fadeOut="0.25"/>
                <posEnd file="sounds/gate_opened.wav" volume="0.8" radius="25" innerRadius="3" />
                <negEnd file="sounds/gate_closed.wav" volume="0.8" radius="25" innerRadius="3" />
            </sounds>
        </animatedObject>
		<animatedObject index="swietlowka1">
			<controls posAction="ACTIVATE_HANDTOOL" triggerNode="lampaTrigger1" posText="action_turnOnLight" negText="action_turnOffLight" />
		    <sounds>
				<moving file="sounds/switch01_0.wav" loops="1" volume="1" radius="25" innerRadius="3" fadeOut="0.25"/>
			</sounds>
			<animation initialTime="0" duration="0.1">
				<part node="lever01">
					<keyFrame time="0.00" rotation="0 0 0" />
					<keyFrame time="1" rotation="0 0 -9" />
				</part>
				<part node="lampa1_1">
					<keyFrame time="0.1" visibility="false" />
					<keyFrame time="0.2" visibility="true" />
				</part>
			</animation>
		</animatedObject>
	</animatedObjects>

    <i3dMappings>
        <i3dMapping id="loadingTrigger" node="0>0|0|0|0" />
        <i3dMapping id="dischargeNode" node="0>0|0|0|1" />
        <i3dMapping id="dischargeEffect" node="0>0|0|0|2" />
        <i3dMapping id="pipeEffect" node="0>0|0|0|2|0" />
        <i3dMapping id="pipeEffectSmoke" node="0>0|0|0|2|1" />
        <i3dMapping id="aiLoadingNode" node="0>0|0|0|3" />
        <i3dMapping id="markerLoading" node="0>0|0|1" />
        <i3dMapping id="exactFillRootNode" node="0>0|1|0" />
        <i3dMapping id="grainGutterLinkNode" node="0>0|1|1" />
        <i3dMapping id="aiUnloadingNode" node="0>0|1|2" />
        <i3dMapping id="markerUnloading" node="0>0|1|3" />
        <i3dMapping id="mapPosition" node="0>0|2" />
		<i3dMapping id="storage" node="0>0|3" />
		<i3dMapping id="storageSilo" node="0>5|0|7" />
        <i3dMapping id="infoTrigger" node="0>0|4" />
        <i3dMapping id="aiSpline" node="0>0|5" />
		<i3dMapping id="warningStripes01" node="0>9" />
		
        <i3dMapping id="clearArea1Start" node="0>1|0" />
        <i3dMapping id="clearArea1Width" node="0>1|0|0" />
        <i3dMapping id="clearArea1Height" node="0>1|0|1" />
        <i3dMapping id="levelArea1Start" node="0>2|0" />
        <i3dMapping id="levelArea1Width" node="0>2|0|0" />
        <i3dMapping id="levelArea1Height" node="0>2|0|1" />
        <i3dMapping id="testArea1Start" node="0>3|0" />
        <i3dMapping id="testArea1End" node="0>3|0|0" />
        <i3dMapping id="tipOcclusionUpdateArea1Start" node="0>4|0" />
        <i3dMapping id="tipOcclusionUpdateArea1End" node="0>4|0|0" />
        <i3dMapping id="teleportNode" node="0>7" />
		<i3dMapping id="fillVolume_grainSilo" node="0>5|0|7" />
		
		<i3dMapping id="barn01Door_trigger" node="0>5|1|0|0" />
		<i3dMapping id="barn01Door_right" node="0>5|1|0|1" />
		<i3dMapping id="barn01Door_left" node="0>5|1|0|2" />
		<i3dMapping id="hand01" node="0>5|1|0|1|1" />
		
		<i3dMapping id="barn02Door_trigger" node="0>5|1|1|0" />
		<i3dMapping id="barn02Door_right" node="0>5|1|1|1" />
		<i3dMapping id="barn02Door_left" node="0>5|1|1|2" />
		<i3dMapping id="hand02" node="0>5|1|1|1|1" />
		
		<i3dMapping id="lampaTrigger1" node="0>5|5|0" />
		<i3dMapping id="lever01" node="0>5|5|1|0" />
		<i3dMapping id="lampa1_1" node="0>5|5|2|1" />
    </i3dMappings>
</placeable>
