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

	<!-- ========== Cowboy Hat,  Bowler Hat and Tuque ========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_CowboyHat" or defName="Apparel_BowlerHat" or defName="Apparel_Tuque" or defName="Apparel_HatHood"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>2</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<!-- ========== Tribal Headdress ========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_TribalHeaddress"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>5</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<!-- ========== War Mask and War Veil ========== -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Apparel_WarMask" or defName="Apparel_WarVeil"]/equippedStatOffsets</xpath>
		<value>
			<Suppressability>-0.25</Suppressability>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_WarMask"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>10</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_WarVeil"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>1</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_WarVeil"]/apparel/layers/li[.="Overhead"]</xpath>
		<value>
			<li>StrappedHead</li>
		</value>
	</Operation>

	<!-- ========== Simple Helmet ========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_SimpleHelmet"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>4</StuffEffectMultiplierArmor>
			<Bulk>3</Bulk>
			<WornBulk>1</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_SimpleHelmet"]/stuffCategories/li[.="Metallic"]</xpath>
		<value>
			<li>Steeled</li>
		</value>
	</Operation>

	<!-- ========== Advanced Helmet ========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<Bulk>4</Bulk>
			<WornBulk>1</WornBulk>
			<ArmorRating_Heat>0.54</ArmorRating_Heat>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/statBases</xpath>
		<value>
			<ArmorRating_Sharp>8</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/statBases</xpath>
		<value>
			<ArmorRating_Blunt>12</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/label</xpath>
		<value>
			<label>composite helmet</label>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/description</xpath>
		<value>
			<description>A lightweight combat helmet with a complex design, made from composite material. More effective protection than plain steel but less durable.</description>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/statBases/MaxHitPoints</xpath>
		<value>
			<MaxHitPoints>75</MaxHitPoints>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/recipeMaker/unfinishedThingDef</xpath>
		<value>
			<unfinishedThingDef>UnfinishedTechArmor</unfinishedThingDef>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/costList</xpath>
		<value>
			<costList>
				<Steel>30</Steel>
				<DevilstrandCloth>15</DevilstrandCloth>
			</costList>
		</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/costStuffCount</xpath>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Apparel_AdvancedHelmet"]/stuffCategories</xpath>
	</Operation>

	<!-- ========== Marine Helmet ========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorHelmet"]/description</xpath>
		<value>
			<description>A marine armor helmet, with a built-in status computer and layered plasteel-weave plates.\n\nBuilt-in servo-motors assist the wearer's muscles in holding the weight of the helmet while the integrated combat HUD improves weapon accuracy.\n\nArmor like this is often used by rapid-incursion space marines.</description>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/statBases</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>1</WornBulk>
			<NightVisionEfficiency_Apparel>0.6</NightVisionEfficiency_Apparel>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/statBases/Flammability</xpath>
		<value>
			<Flammability>0</Flammability>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/statBases/Mass</xpath>
		<value>
			<Mass>4.8</Mass>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/statBases/MaxHitPoints</xpath>
		<value>
			<MaxHitPoints>240</MaxHitPoints>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>16</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>36</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/equippedStatOffsets</xpath>
		<value>
			<AimingAccuracy>0.15</AimingAccuracy>
			<SmokeSensitivity>-1</SmokeSensitivity>
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/equippedStatOffsets/ToxicEnvironmentResistance</xpath>
		<match Class="PatchOperationReplace">
			<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/equippedStatOffsets/ToxicEnvironmentResistance</xpath>
			<value>
				<ToxicEnvironmentResistance>0.50</ToxicEnvironmentResistance>
			</value>
		</match>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/equippedStatOffsets</xpath>
			<value>
				<ToxicEnvironmentResistance>0.50</ToxicEnvironmentResistance>
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/costList/Plasteel</xpath>
		<value>
			<Plasteel>60</Plasteel>
			<DevilstrandCloth>20</DevilstrandCloth>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/apparel</xpath>
		<value>
			<immuneToToxGasExposure>true</immuneToToxGasExposure>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]/apparel/layers</xpath>
		<value>
			<li>OnHead</li>
			<li>StrappedHead</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetPowerBase"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.80</ArmorRating_Sharp>
						<parts>
							<li>Eye</li>
							<li>Nose</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.80</ArmorRating_Blunt>
						<parts>
							<li>Eye</li>
							<li>Nose</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

	<!-- ========== Recon Armor Helmet ========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_ArmorHelmetRecon"]/description</xpath>
		<value>
			<description>A high-tech armored helmet with a built-in status computer and a protective plasteel-weave plate.\n\nBuilt-in servo-motors assist the wearer's muscles in holding the weight of the helmet while the integrated combat HUD improves weapon accuracy.\n\nArmor like this is often used by imperial scout troops or glitterworld police forces.</description>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Apparel_ArmorHelmetRecon"]</xpath>
		<value>
			<li Class="CombatExtended.ApparelDefExtension">
				<isRadioPack>true</isRadioPack>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/statBases</xpath>
		<value>
			<Bulk>4</Bulk>
			<WornBulk>1</WornBulk>
			<NightVisionEfficiency_Apparel>0.7</NightVisionEfficiency_Apparel>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/statBases/Flammability</xpath>
		<value>
			<Flammability>0.25</Flammability>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/statBases/Mass</xpath>
		<value>
			<Mass>3.0</Mass>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/statBases/MaxHitPoints</xpath>
		<value>
			<MaxHitPoints>190</MaxHitPoints>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>12</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>26</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]</xpath>
		<value>
			<equippedStatOffsets>
				<AimingAccuracy>0.15</AimingAccuracy>
				<ToxicEnvironmentResistance>0.50</ToxicEnvironmentResistance>
				<SmokeSensitivity>-1</SmokeSensitivity>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/costList/Plasteel</xpath>
		<value>
			<Plasteel>50</Plasteel>
			<DevilstrandCloth>15</DevilstrandCloth>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/apparel</xpath>
		<value>
			<immuneToToxGasExposure>true</immuneToToxGasExposure>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]/apparel/layers</xpath>
		<value>
			<li>OnHead</li>
			<li>StrappedHead</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[@Name="ApparelArmorHelmetReconBase"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.70</ArmorRating_Sharp>
						<parts>
							<li>Eye</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.70</ArmorRating_Blunt>
						<parts>
							<li>Eye</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Sharp>0.50</ArmorRating_Sharp>
						<parts>
							<li>Nose</li>
							<li>Jaw</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.50</ArmorRating_Blunt>
						<parts>
							<li>Nose</li>
							<li>Jaw</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

</Patch>