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

	<!-- ========== Melee Tools ========== -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Gun_AllianceCompactSMG"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>grip</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</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="RE_Gun_AllianceRapidSniperRifle"]/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>

	<!-- ========== M-12 Locust ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RE_Gun_AllianceCompactSMG</defName>
		<statBases>
			<SightsEfficiency>1.1</SightsEfficiency>
			<ShotSpread>0.14</ShotSpread>
			<SwayFactor>1.18</SwayFactor>
			<Bulk>3.75</Bulk>
			<Mass>1.8</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_Locust</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>32</range>
			<burstShotCount>5</burstShotCount>
			<ticksBetweenBurstShots>3</ticksBetweenBurstShots>
			<soundCast>RE_Shot_Locust</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilPattern>Regular</recoilPattern>
			<recoilAmount>1.34</recoilAmount>
		</Properties>
		<costList>
			<Steel>10</Steel>
			<Plasteel>25</Plasteel>
			<ComponentSpacer>1</ComponentSpacer>
			<Chemfuel>5</Chemfuel>
		</costList>
		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>3.5</reloadTime>
			<ammoSet>AmmoSet_Locust</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aimedBurstShotCount>4</aimedBurstShotCount>
		</FireModes>
	</Operation>

	<!-- Name -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Gun_AllianceCompactSMG"]/label</xpath>
		<value>
			<label>M-12 Locust</label>
		</value>
	</Operation>

	<!-- ========== M-97 Viper ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RE_Gun_AllianceRapidSniperRifle</defName>
		<statBases>
			<SightsEfficiency>2.5</SightsEfficiency>
			<ShotSpread>0.05</ShotSpread>
			<SwayFactor>1.46</SwayFactor>
			<Bulk>10.0</Bulk>
			<Mass>4.20</Mass>
			<RangedWeapon_Cooldown>0.27</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_Viper</defaultProjectile>
			<warmupTime>1.45</warmupTime>
			<range>78</range>
			<ammoConsumedPerShotCount>4</ammoConsumedPerShotCount>
			<soundCast>RE_Shot_Viper</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>11</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>24</magazineSize>
			<reloadTime>1.1</reloadTime>
			<ammoSet>AmmoSet_Viper</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiUseBurstMode>False</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<!-- Name -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Gun_AllianceRapidSniperRifle"]/label</xpath>
		<value>
			<label>M-97 Viper</label>
		</value>
	</Operation>

</Patch>