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

	<!-- === Balaclavas === -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="JDSFrontierFaceMaskBase"]/apparel/layers</xpath>
		<value>
			<layers>
				<li>OnHead</li>
			</layers>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="JDSFrontierFaceMaskBase"]/apparel/bodyPartGroups</xpath>
		<value>
			<bodyPartGroups>
				<li>UpperHead</li>
				<li>Teeth</li>
			</bodyPartGroups>
		</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>
			Defs/ThingDef[
			defName="JDSTarkov_Headgear_Balaclava" or
			defName="JDSTarkov_Headwear_Balaclava2_Mask" or
			defName="JDSTarkov_Headwear_Balaclava3_Mask" or
			defName="JDSTarkov_Headwear_Balaclava4_Mask" or
			defName="JDSTarkov_Headwear_Balaclava5_Mask" or
			defName="JDSTarkov_Headwear_Balaclava6_Mask" or
			defName="JDSTarkov_Headwear_Balaclava7_Mask"
			]/statBases/ArmorRating_Sharp |
			Defs/ThingDef[
			defName="JDSTarkov_Headgear_Balaclava" or
			defName="JDSTarkov_Headwear_Balaclava2_Mask" or
			defName="JDSTarkov_Headwear_Balaclava3_Mask" or
			defName="JDSTarkov_Headwear_Balaclava4_Mask" or
			defName="JDSTarkov_Headwear_Balaclava5_Mask" or
			defName="JDSTarkov_Headwear_Balaclava6_Mask" or
			defName="JDSTarkov_Headwear_Balaclava7_Mask"
			]/statBases/ArmorRating_Blunt |
			Defs/ThingDef[
			defName="JDSTarkov_Headgear_Balaclava" or
			defName="JDSTarkov_Headwear_Balaclava2_Mask" or
			defName="JDSTarkov_Headwear_Balaclava3_Mask" or
			defName="JDSTarkov_Headwear_Balaclava4_Mask" or
			defName="JDSTarkov_Headwear_Balaclava5_Mask" or
			defName="JDSTarkov_Headwear_Balaclava6_Mask" or
			defName="JDSTarkov_Headwear_Balaclava7_Mask"
			]/statBases/ArmorRating_Heat |
			Defs/ThingDef[
			defName="JDSTarkov_Headgear_Balaclava" or
			defName="JDSTarkov_Headwear_Balaclava2_Mask" or
			defName="JDSTarkov_Headwear_Balaclava3_Mask" or
			defName="JDSTarkov_Headwear_Balaclava4_Mask" or
			defName="JDSTarkov_Headwear_Balaclava5_Mask" or
			defName="JDSTarkov_Headwear_Balaclava6_Mask" or
			defName="JDSTarkov_Headwear_Balaclava7_Mask"
			]/statBases/Insulation_Cold
		</xpath>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>
			Defs/ThingDef[
			defName="JDSTarkov_Headgear_Balaclava" or
			defName="JDSTarkov_Headwear_Balaclava2_Mask" or
			defName="JDSTarkov_Headwear_Balaclava3_Mask" or
			defName="JDSTarkov_Headwear_Balaclava4_Mask" or
			defName="JDSTarkov_Headwear_Balaclava5_Mask" or
			defName="JDSTarkov_Headwear_Balaclava6_Mask" or
			defName="JDSTarkov_Headwear_Balaclava7_Mask"
			]/statBases
		</xpath>
		<value>
			<Bulk>1</Bulk>
			<WornBulk>1</WornBulk>
			<ArmorRating_Blunt>0.01</ArmorRating_Blunt>
			<ArmorRating_Sharp>0.01</ArmorRating_Sharp>
			<Insulation_Cold>2</Insulation_Cold>
			<Insulation_Heat>0.5</Insulation_Heat>
		</value>
	</Operation>

	<!-- === Beanie === -->
	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="JDSTarkov_Headwear_Beanie"]</xpath>
		<attribute>ParentName</attribute>
		<value>EFTHeadgearBeanie</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>
			Defs/ThingDef[defName="JDSTarkov_Headwear_Beanie"]/statBases/ArmorRating_Sharp |
			Defs/ThingDef[defName="JDSTarkov_Headwear_Beanie"]/statBases/ArmorRating_Blunt |
			Defs/ThingDef[defName="JDSTarkov_Headwear_Beanie"]/statBases/ArmorRating_Heat |
			Defs/ThingDef[defName="JDSTarkov_Headwear_Beanie"]/statBases/Insulation_Cold
		</xpath>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="JDSTarkov_Headwear_Beanie"]/statBases</xpath>
		<value>
			<Bulk>1</Bulk>
			<WornBulk>1</WornBulk>
			<ArmorRating_Sharp>0.01</ArmorRating_Sharp>
			<ArmorRating_Blunt>0.01</ArmorRating_Blunt>
			<Insulation_Heat>5</Insulation_Heat>
			<Insulation_Cold>10</Insulation_Cold><!-- Personally i think 22 is too much -->
		</value>
	</Operation>

	<!-- === Caps / Ushanka === -->
	<Operation Class="PatchOperationAttributeSet">
		<xpath>
			Defs/ThingDef[
			defName="JDSTarkov_Headwear_Army_Cap" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Black" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Green" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Tan" or
			defName="JDSTarkov_Headwear_Ushanka_Cap"
			]
		</xpath>
		<attribute>ParentName</attribute>
		<value>EFTHeadgearCaps</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>
			Defs/ThingDef[
			defName="JDSTarkov_Headwear_Army_Cap" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Black" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Green" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Tan" or
			defName="JDSTarkov_Headwear_Ushanka_Cap"
			]/statBases/ArmorRating_Sharp |
			Defs/ThingDef[
			defName="JDSTarkov_Headwear_Army_Cap" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Black" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Green" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Tan" or
			defName="JDSTarkov_Headwear_Ushanka_Cap"
			]/statBases/ArmorRating_Blunt |
			Defs/ThingDef[
			defName="JDSTarkov_Headwear_Army_Cap" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Black" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Green" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Tan" or
			defName="JDSTarkov_Headwear_Ushanka_Cap"
			]/statBases/ArmorRating_Heat |
			Defs/ThingDef[
			defName="JDSTarkov_Headwear_Army_Cap" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Black" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Green" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Tan"
			]/statBases/Insulation_Cold
		</xpath>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>
			Defs/ThingDef[
			defName="JDSTarkov_Headwear_Army_Cap" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Black" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Green" or
			defName="JDSTarkov_Headwear_Baseball_Cap_Tan"
			]/statBases
		</xpath>
		<value>
			<Bulk>1</Bulk>
			<WornBulk>1</WornBulk>
			<ArmorRating_Sharp>0.01</ArmorRating_Sharp>
			<ArmorRating_Blunt>0.01</ArmorRating_Blunt>
			<Insulation_Cold>0.50</Insulation_Cold>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="JDSTarkov_Headwear_Ushanka_Cap"]/statBases</xpath>
		<value>
			<Bulk>2.5</Bulk>
			<WornBulk>1.5</WornBulk>
			<ArmorRating_Sharp>0.06</ArmorRating_Sharp>
			<ArmorRating_Blunt>0.10</ArmorRating_Blunt>
		</value>
	</Operation>

</Patch>