<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- Pistols -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_Scraptooth"]/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>
	<!-- Long guns-->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_Gnasher" or
			defName="Gun_Deathdealer" or
			defName="Gun_ScatterStick" or
			defName="Gun_Thrasher" or
			defName="Gun_Crucifier"
			]/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>
	<!-- Heavy Weapons -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_SkullBuster" or defName="Gun_Scorcher"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2.44</cooldownTime>
					<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ==========  Skullbuster Crank Gun =========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_SkullBuster</defName>
		<statBases>
			<Mass>9.12</Mass>
			<RangedWeapon_Cooldown>0.93</RangedWeapon_Cooldown>
			<SightsEfficiency>0.9</SightsEfficiency>
			<ShotSpread>0.21</ShotSpread>
			<SwayFactor>2.53</SwayFactor>
			<Bulk>13.7</Bulk>
			<WorkToMake>32000</WorkToMake>
		</statBases>
		<costList>
			<ChunkSlagSteel>3</ChunkSlagSteel>
			<Steel>60</Steel>
			<ComponentIndustrial>8</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.32</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_303British_FMJ</defaultProjectile>
			<warmupTime>1.25</warmupTime>
			<range>62</range>
			<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
			<burstShotCount>25</burstShotCount>
			<soundCast>ShotCrucifier</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>200</magazineSize>
			<reloadTime>7.8</reloadTime>
			<ammoSet>AmmoSet_303British</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>10</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>SuppressFire</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_MachineGun</li>
			<li>CE_AI_Suppressive</li>
		</weaponTags>
		<researchPrerequisite>Gunsmithing</researchPrerequisite>
	</Operation>

	<!-- ==========  Scraptooth Pistols =========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Scraptooth</defName>
		<statBases>
			<WorkToMake>35500</WorkToMake>
			<SightsEfficiency>0.7</SightsEfficiency>
			<ShotSpread>0.2</ShotSpread>
			<SwayFactor>1.7</SwayFactor>
			<Bulk>5</Bulk>
			<Mass>4.8</Mass>
			<RangedWeapon_Cooldown>0.65</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.8</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x19mmParaTwin_Feral_FMJ</defaultProjectile>
			<warmupTime>1.0</warmupTime>
			<range>11</range>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<ammoConsumedPerShotCount>2</ammoConsumedPerShotCount>
			<muzzleFlashScale>7</muzzleFlashScale>
			<soundCast>ShotScraptooth</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
		</Properties>
		<AmmoUser>
			<magazineSize>16</magazineSize>
			<reloadTime>4.6</reloadTime>
			<ammoSet>AmmoSet_9x19mmParaTwin_Feral</ammoSet>
		</AmmoUser>
		<FireModes>
		</FireModes>
		<weaponTags>
			<li>FeralPistol</li>
			<li>FeralGun</li>
		</weaponTags>
	</Operation>

	<!-- ==========  Gnasher SMG =========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Gnasher</defName>
		<statBases>
			<Mass>5.50</Mass>
			<RangedWeapon_Cooldown>0.37</RangedWeapon_Cooldown>
			<SightsEfficiency>0.60</SightsEfficiency>
			<ShotSpread>0.54</ShotSpread>
			<SwayFactor>1.64</SwayFactor>
			<Bulk>4.90</Bulk>
			<WorkToMake>24500</WorkToMake>
		</statBases>
		<Properties>
			<recoilAmount>1.25</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Feral_Nail</defaultProjectile>
			<warmupTime>0.9</warmupTime>
			<range>14</range>
			<burstShotCount>8</burstShotCount>
			<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
			<soundCast>ShotGnasher</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>8</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>48</magazineSize>
			<reloadTime>4.9</reloadTime>
			<ammoSet>AmmoSet_Feral_Nail</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>6</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
		</FireModes>
		<weaponTags>
			<li>FeralPistol</li>
			<li>FeralGun</li>
		</weaponTags>
	</Operation>

	<!-- ========== Deathdealer Machinepistols ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Deathdealer</defName>
		<statBases>
			<Mass>4.20</Mass>
			<RangedWeapon_Cooldown>0.37</RangedWeapon_Cooldown>
			<SightsEfficiency>0.8</SightsEfficiency>
			<ShotSpread>0.67</ShotSpread>
			<SwayFactor>1.95</SwayFactor>
			<Bulk>5.8</Bulk>
			<WorkToMake>24500</WorkToMake>
		</statBases>
		<Properties>
			<recoilAmount>2.65</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x19mmParaTwin_Feral_FMJ</defaultProjectile>
			<warmupTime>0.8</warmupTime>
			<range>16</range>
			<burstShotCount>4</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<ammoConsumedPerShotCount>2</ammoConsumedPerShotCount>
			<soundCast>ShotDeathdealer</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>40</magazineSize>
			<reloadTime>4.8</reloadTime>
			<ammoSet>AmmoSet_9x19mmParaTwin_Feral</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>2</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
		</FireModes>
		<weaponTags>
			<li>FeralGun</li>
			<li>FeralRifle</li>
		</weaponTags>
	</Operation>

	<!-- ========== Scatterstick Shotgun ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_ScatterStick</defName>
		<statBases>
			<Mass>3.50</Mass>
			<RangedWeapon_Cooldown>0.39</RangedWeapon_Cooldown>
			<ShotSpread>0.15</ShotSpread>
			<SwayFactor>1.26</SwayFactor>
			<Bulk>6.7</Bulk>
			<SightsEfficiency>0.9</SightsEfficiency>
			<WorkToMake>22500</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_12Gauge_Buck</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>16</range>
			<soundCast>ShotScatterStick</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
		</Properties>
		<AmmoUser>
			<magazineSize>3</magazineSize>
			<reloadTime>6.8</reloadTime>
			<ammoSet>AmmoSet_12Gauge</ammoSet>
		</AmmoUser>
		<FireModes/>
		<weaponTags>
			<li>CE_AI_AssaultWeapon</li>
		</weaponTags>
	</Operation>

	<!-- ========== Thrasher Assault Rifle ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Thrasher</defName>
		<statBases>
			<Mass>5.3</Mass>
			<RangedWeapon_Cooldown>0.38</RangedWeapon_Cooldown>
			<SightsEfficiency>0.90</SightsEfficiency>
			<ShotSpread>0.37</ShotSpread>
			<SwayFactor>1.7</SwayFactor>
			<Bulk>11.03</Bulk>
			<WorkToMake>30000</WorkToMake>
		</statBases>
		<Properties>
			<recoilAmount>1.83</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_303British_FMJ</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>48</range>
			<burstShotCount>4</burstShotCount>
			<ticksBetweenBurstShots>2</ticksBetweenBurstShots>
			<soundCast>ShotThrasher</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>26</magazineSize>
			<reloadTime>4.7</reloadTime>
			<ammoSet>AmmoSet_303British</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>3</aimedBurstShotCount>
			<aiUseBurstMode>TRUE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>FeralGun</li>
			<li>FeralRifle</li>
		</weaponTags>
	</Operation>

	<!-- ========== Crucible Anti-Material Rifle ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Crucifier</defName>
		<statBases>
			<WorkToMake>44500</WorkToMake>
			<SightsEfficiency>2.2</SightsEfficiency>
			<ShotSpread>0.02</ShotSpread>
			<SwayFactor>2.4</SwayFactor>
			<Bulk>17.5</Bulk>
			<Mass>13.80</Mass>
			<RangedWeapon_Cooldown>1.38</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.83</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_50BMG_FMJ</defaultProjectile>
			<warmupTime>4.2</warmupTime>
			<range>76</range>
			<soundCast>Shot_AssaultRifle</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>15</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>5</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_50BMG</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>FeralSniperRifle</li>
			<li>Bipod_AMR</li>
		</weaponTags>
	</Operation>

	<!-- ========== Scorcher Flamethrower ========== -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_Scorcher"]/statBases</xpath>
		<value>
			<statBases>
				<Mass>4.2</Mass>
				<RangedWeapon_Cooldown>0.44</RangedWeapon_Cooldown>
				<SightsEfficiency>0.90</SightsEfficiency>
				<ShotSpread>0.18</ShotSpread>
				<SwayFactor>1.4</SwayFactor>
				<Bulk>5</Bulk>
				<WorkToMake>31500</WorkToMake>
			</statBases>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_Scorcher"]/costList</xpath>
		<value>
			<costList>
				<ChunkSlagSteel>1</ChunkSlagSteel>
				<Steel>35</Steel>
				<ComponentIndustrial>2</ComponentIndustrial>
			</costList>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_Scorcher"]</xpath>
		<value>
			<recipeMaker>
				<researchPrerequisite>CE_Launchers</researchPrerequisite>
			</recipeMaker>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_Scorcher"]/verbs</xpath>
		<value>
			<verbs>
				<li Class="CombatExtended.VerbPropertiesCE">
					<verbClass>CombatExtended.Verb_ShootCE</verbClass>
					<recoilAmount>0.95</recoilAmount>
					<hasStandardCommand>true</hasStandardCommand>
					<defaultProjectile>Bullet_Flamethrower_Prometheum</defaultProjectile>
					<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
					<warmupTime>1.1</warmupTime>
					<range>11</range>
					<minRange>3</minRange>
					<targetParams>
						<canTargetLocations>true</canTargetLocations>
					</targetParams>
					<soundCast>HissFlamethrower</soundCast>
					<muzzleFlashScale>0</muzzleFlashScale>
					<ticksBetweenBurstShots>3</ticksBetweenBurstShots>
					<burstShotCount>20</burstShotCount>
				</li>
			</verbs>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_Scorcher"]</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_AmmoUser">
					<magazineSize>40</magazineSize>
					<reloadTime>5</reloadTime>
					<ammoSet>AmmoSet_Flamethrower</ammoSet>
				</li>
				<li Class="CombatExtended.CompProperties_FireModes">
					<aiUseBurstMode>true</aiUseBurstMode>
					<aimedBurstShotCount>10</aimedBurstShotCount>
					<aiAimMode>SuppressFire</aiAimMode>
				</li>
			</comps>
		</value>
	</Operation>
</Patch>