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

	<!-- === Tools === -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName ="VFES_Gun_DoubleActionRevolver"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>grip</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.54</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>0.555</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Grip</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>muzzle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.54</cooldownTime>
					<armorPenetrationBlunt>0.555</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VFES_Gun_DoubleBarreledShotgun" or defName="VFES_Gun_HuntingRifle"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>2.02</cooldownTime>
					<armorPenetrationBlunt>1.630</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>muzzle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Double Action Revolver === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VFES_Gun_DoubleActionRevolver</defName>

		<statBases>
			<WorkToMake>4500</WorkToMake>
			<Mass>1.5</Mass>
			<Bulk>1.39</Bulk>
			<ShotSpread>0.18</ShotSpread>
			<SwayFactor>1.27</SwayFactor>
			<SightsEfficiency>0.7</SightsEfficiency>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
		</statBases>

		<costList>
			<Steel>35</Steel>
			<WoodLog>5</WoodLog>
			<ComponentIndustrial>2</ComponentIndustrial>
		</costList>

		<Properties>
			<recoilAmount>2.5</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_44Magnum_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>12</range>
			<soundCast>VFE_Shot_DoubleactionRevolver</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>6</magazineSize>
			<reloadTime>1</reloadTime>
			<reloadOneAtATime>true</reloadOneAtATime>
			<ammoSet>AmmoSet_44Magnum</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>

		<weaponTags>
			<li>SimpleGun</li>
			<li>Revolver</li>
			<li>CE_Sidearm</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VFES_Gun_DoubleActionRevolver"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>0.90,0.90</DrawSize>
				<DrawOffset>0.05,0.01</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- === Double Barreled Shotgun === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VFES_Gun_DoubleBarreledShotgun</defName>

		<statBases>
			<WorkToMake>7000</WorkToMake>
			<Mass>3.8</Mass>
			<Bulk>10</Bulk>
			<ShotSpread>0.18</ShotSpread>
			<SwayFactor>1.27</SwayFactor>
			<SightsEfficiency>1</SightsEfficiency>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
		</statBases>

		<costList>
			<Steel>40</Steel>
			<WoodLog>10</WoodLog>
			<ComponentIndustrial>2</ComponentIndustrial>
		</costList>

		<Properties>
			<recoilAmount>3.0</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_12Gauge_Buck</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>16</range>
			<soundCast>Shot_Shotgun_NoRack</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>2</magazineSize>
			<reloadTime>1.7</reloadTime>
			<reloadOneAtATime>true</reloadOneAtATime>
			<ammoSet>AmmoSet_12Gauge</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>

		<weaponTags>
			<li>SimpleGun</li>
			<li>CE_AI_AssaultWeapon</li>
		</weaponTags>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VFES_Gun_DoubleBarreledShotgun"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.03,1.15</DrawSize>
				<DrawOffset>0.05,0.0</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- === Hunting Rifle === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VFES_Gun_HuntingRifle</defName>

		<statBases>
			<WorkToMake>12800</WorkToMake>
			<Mass>7.30</Mass>
			<Bulk>10.50</Bulk>
			<ShotSpread>0.05</ShotSpread>
			<SwayFactor>1.27</SwayFactor>
			<SightsEfficiency>2.24</SightsEfficiency>
			<RangedWeapon_Cooldown>1.36</RangedWeapon_Cooldown>
		</statBases>

		<costList>
			<Steel>45</Steel>
			<WoodLog>10</WoodLog>
			<ComponentIndustrial>3</ComponentIndustrial>
		</costList>

		<Properties>
			<recoilAmount>1.5</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_303British_FMJ</defaultProjectile>
			<warmupTime>1.5</warmupTime>
			<range>75</range>
			<soundCast>Shot_BoltActionRifle</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>5</magazineSize>
			<reloadTime>1.2</reloadTime>
			<reloadOneAtATime>true</reloadOneAtATime>
			<ammoSet>AmmoSet_303British</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>

		<weaponTags>
			<li>SimpleGun</li>
			<li>CE_AI_Rifle</li>
		</weaponTags>

		<!-- Disallow with Run and Gun -->
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VFES_Gun_DoubleBarreledShotgun"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.25,1.45</DrawSize>
				<DrawOffset>0.10,0.1</DrawOffset>
			</li>
		</value>
	</Operation>

</Patch>