<?xml version="1.0" encoding="utf-8"?>
<Items>

	<!-- Mod-Refactor Victim - Com-Hub -->
	<Item
			name="" identifier="oxygear_comhub" category="Electrical" Tags="oxygear,hub,signal"
			scale="0.5" isshootable="true" damagedbyexplosions="true" explosiondamagemultiplier="0.2" >

			<Sprite texture="oxygear_comhub.png" depth="0.8" sourcerect="0,0,100,200" origin="0.5,0.5" />

			<StaticBody width="100" height="200" density="100" />

			<RelayComponent IsOn="true" IsActive="true" canbeselected="true" allowingameediting="true"
							MinVoltage="0.5" PowerConsumption="10.0" maxPower="4000.0" OverloadVoltage="2.5"
							vulnerabletoemp="false" canbeoverloaded="false" FireProbability="0.10" >

							<GuiFrame relativesize="0.2,0.14" minsize="450,160" anchor="BottomCenter" style="ItemUI" />

							<!-- Zugangsberechtigung über ID Karte -->
							<RequiredItem items="idcard" type="Picked" msg="ItemMsgUnauthorizedAccess" ignoreineditor="true" />

							<!-- Interface zur Aktivierung der Signale	-->
							<CustomInterface canbeselected="true" >
							  <GuiFrame relativesize="0.20,0.40" anchor="Center" style="ItemUI" />
								<Button text="Signal out #1" connection="signal_out1" />
								<Button text="Signal out #2" connection="signal_out2" />
								<Button text="Signal out #3" connection="signal_out3" />
								<Button text="Signal out #4" connection="signal_out4" />
								<Button text="Signal out #5" connection="signal_out5" />
								<!-- <Button text="Signal out #6" connection="signal_out6" /> -->
							</CustomInterface>

							<!-- Tasten-Interface zur Aktivierung/Deaktivierung -->
							<CustomInterface canbeselected="true" >
								<GuiFrame relativesize="0.10,0.15" anchor="BottomCenter" style="ItemUI" absoluteoffset="-20,0" />
								<Button text="On" >
									<StatusEffect type="OnUse" targettype="This" isOn="true" IsActive="true" />
								</Button>
								<Button text="Off" >
									<StatusEffect type="OnUse" targettype="This" isOn="false" IsActive="false" />
								</Button>
							</CustomInterface>

							<!-- Interface zur Aktivierung/Deaktivierung des ComHubs
							<CustomInterface canbeselected="true" >
								<GuiFrame relativesize="0.10,0.14" anchor="BottomCenter" style="ItemUI" absoluteoffset="-20,0" />
								<TickBox text="Powered" >
									<StatusEffect type="OnUse" targettype="This" IsOn="true" />
									<StatusEffect type="OnSecondaryUse" targettype="This" IsOn="false" />
								</TickBox>
							</CustomInterface>
							-->

							<poweronsound file="Content/Items/PowerOnLight1.ogg" range="400" loop="false" />

							<StatusEffect type="InWater" target="This" condition="-0.5" />
			</RelayComponent>

			<ConnectionPanel selectkey="Action" canbeselected="true" allowingameediting="false" msg="ItemMsgRewireScrewdriver" hudpriority="10" >

							<GuiFrame relativesize="0.3,0.6" minsize="400,400" maxsize="600,1200" anchor="Center" style="ConnectionPanel" />
							<RequiredItem items="screwdriver" type="Equipped" />

							<!--	Power-Eingang	-->
							<input name="power_in" displayname="connection.powerin" />

							<!--	Signal-Eingänge	-->
							<input name="set_state" displayname="connection.setstate" />
							<input name="toggle" displayname="connection.togglestate" />
							<input name="signal_in1" displayname="connection.signalinx~[num]=1" />
							<input name="signal_in2" displayname="connection.signalinx~[num]=2" />
							<input name="signal_in3" displayname="connection.signalinx~[num]=3" />
							<input name="signal_in4" displayname="connection.signalinx~[num]=4" />
							<input name="signal_in5" displayname="connection.signalinx~[num]=5" />

							<!--	Power-Ausgänge	-->
							<output name="power_out" displayname="connection.powerout" />
							<output name="power_out" displayname="connection.powerout" />

							<!--	Zwei zusätzliche Power-Ausgänge	-->
							<output name="power_out" displayname="connection.powerout" />
							<output name="power_out" displayname="connection.powerout" />

							<!--	Signal-Ausgänge	-->
							<output name="state_out" displayname="connection.stateout" fallbackdisplayname="connection.signalout" />
							<output name="signal_out1" displayname="connection.signaloutx~[num]=1" />
							<output name="signal_out2" displayname="connection.signaloutx~[num]=2" />
							<output name="signal_out3" displayname="connection.signaloutx~[num]=3" />
							<output name="signal_out4" displayname="connection.signaloutx~[num]=4" />
							<output name="signal_out5" displayname="connection.signaloutx~[num]=5" />

							<!--	Brzzzt!	[Mod.]	-->
							<RequiredSkill identifier="electrical" level="55" />
							<StatusEffect type="OnFailure" target="Character" targetlimbs="LeftHand,RightHand">
								<Sound file="Content/Sounds/Damage/Electrocution1.ogg" range="1000" />
								<Explosion range="100.0" stun="0" force="100.0" flames="false" shockwave="false" sparks="true" underwaterbubble="false" />
								<Affliction identifier="stun" strength="15" />
								<Affliction identifier="burn" strength="5" />
							</StatusEffect>
			</ConnectionPanel>

			<!-- Bildschirm -->
			<LightComponent range="25.0" lightcolor="0,144,188,122" powerconsumption="0.01" IsOn="true" castshadows="false" flicker="0.2" flickerspeed="0.5" allowingameediting="false" >

							<!-- Licht Radius -->
							<LightTexture texture="%ModDir%/Lights/oxygear_comhub_light_a.png" origin="0.5,0.5" alpha="1.0" />

							<!-- Licht Objekt/Gehäuse -->
							<sprite texture="%ModDir%/Lights/oxygear_comhub_light_a.png" sourcerect="0,0,100,200" alpha="1.0" origin="0.5,0.5" />
			</LightComponent>

			<!-- Betrieb - Status (Grün) -->
			<LightComponent range="25.0" lightcolor="0,155,25,240" powerconsumption="0.01" IsOn="true" castshadows="false" flicker="0.1" flickerspeed="0.2" allowingameediting="false" >

							<!-- Licht Radius -->
							<LightTexture texture="%ModDir%/Lights/oxygear_comhub_light_b.png" origin="0.5,0.5" alpha="1.0" />

							<!-- Licht Objekt/Gehäuse -->
							<sprite texture="%ModDir%/Lights/oxygear_comhub_light_b.png" sourcerect="0,0,100,200" alpha="1.0" origin="0.5,0.5" />

							<IsActive targetitemcomponent="PowerTransfer" />
			</LightComponent>

			<!-- Überladung - Status (Orange) -->
			<LightComponent range="25.0" lightcolor="200,100,0,240" powerconsumption="0.01" IsOn="false" castshadows="false" flicker="0.1" flickerspeed="0.2" blinkfrequency="0.5" allowingameediting="false" >

							<!-- Licht Radius -->
							<LightTexture texture="%ModDir%/Lights/oxygear_comhub_light_c.png" origin="0.5,0.5" alpha="1.0" />

							<!-- Licht Objekt/Gehäuse -->
							<sprite texture="%ModDir%/Lights/oxygear_comhub_light_c.png" sourcerect="0,0,100,200" alpha="1.0" origin="0.5,0.5" />

							<IsActive targetitemcomponent="PowerTransfer" overload="eq True" />
			</LightComponent>

			<Repairable
							selectkey="Action" header="electricalrepairsheader" msg="ItemMsgRepairScrewdriver" hudpriority="10"
							deteriorationspeed="0.05" RepairThreshold="80" mindeteriorationdelay="200" maxdeteriorationdelay="800"
							MinDeteriorationCondition="0" fixDurationHighSkill="5" fixDurationLowSkill="25" >

							<RequiredSkill identifier="electrical" level="55" />
							<RequiredItem items="screwdriver" type="equipped" />

							<GuiFrame relativesize="0.2,0.16" minsize="400,180" maxsize="480,216" anchor="Center" relativeoffset="0.0,0.27" style="ItemUI" />
							<ParticleEmitter particle="damagebubbles" particleburstamount="2" particleburstinterval="2.0" particlespersecond="2" scalemin="0.5" scalemax="1.5" anglemin="0" anglemax="359" velocitymin="-10" velocitymax="10" mincondition="0.0" maxcondition="50.0" />
							<ParticleEmitter particle="spark" particleburstamount="5" particlespersecond="5" anglemin="0" anglemax="359" velocitymin="100" velocitymax="500" particleburstinterval="2"  scalemin="0.5" scalemax="1" mincondition="0.0" maxcondition="15.0" />
							<ParticleEmitter particle="fleshsmoke" particlespersecond="2" scalemin="1" scalemax="2" mincondition="0.0" maxcondition="50.0" />
							<StatusEffect type="OnFailure" target="Character" targetlimbs="LeftHand,RightHand" >
								<Sound file="Content/Sounds/Damage/Electrocution1.ogg" range="1000" />
								<Affliction identifier="stun" strength="4" />
								<Affliction identifier="burn" strength="5" />
							</StatusEffect>
			</Repairable>

	</Item>

</Items>