<?xml version="1.0" encoding="utf-8" ?>
<Patch>
	<!--Melee Attacks for Guns-->
	<Operation Class="PatchOperationReplace">
		<xpath>
			Defs/ThingDef[
			defName="RNGun_P2Peacemaker_Pistol" or
			defName="RNGun_P4Senator_Revolver" or
			defName="RNGun_LAS58Talon_Revolver" or
			defName="RNGun_SEAFG31_Ultimatum" or
			defName="RNGun_SG22Bushwhacker_Shotgun"
			]/tools
		</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>grip</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>4</power>
					<cooldownTime>1.55</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ============ Peacemaker ============ -->
	
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_P2Peacemaker_Pistol</defName>
		<statBases>
			<Mass>1.11</Mass>
			<RangedWeapon_Cooldown>0.39</RangedWeapon_Cooldown>
			<SightsEfficiency>0.7</SightsEfficiency>
			<ShotSpread>0.5</ShotSpread>
			<SwayFactor>1.07</SwayFactor>
			<Bulk>2.1</Bulk>
			<WorkToMake>7000</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x20mmRed_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>12</range>
			<soundCast>RNShot_P2Peacemaker</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilAmount>2.72</recoilAmount>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>15</magazineSize>
			<reloadTime>1.8</reloadTime>
			<ammoSet>AmmoSet_9x20mmRed</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_Sidearm</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<!-- ============ Senator ============ -->
	
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_P4Senator_Revolver</defName>
		<statBases>
			<Mass>1.39</Mass>
			<RangedWeapon_Cooldown>0.49</RangedWeapon_Cooldown>
			<SightsEfficiency>0.7</SightsEfficiency>
			<ShotSpread>0.5</ShotSpread>
			<SwayFactor>1.39</SwayFactor>
			<Bulk>2.79</Bulk>
			<WorkToMake>5000</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_13x40Prez_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>12</range>
			<soundCast>RNShot_P4Senator</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilAmount>2.96</recoilAmount>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>6</magazineSize>
			<reloadTime>2.8</reloadTime>
			<ammoSet>AmmoSet_13x40Prez</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_Sidearm</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<!-- ============ Bushwhacker ============ -->
	
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_SG22Bushwhacker_Shotgun</defName>
		<statBases>
			<Mass>2</Mass>
			<RangedWeapon_Cooldown>0.37</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.33</ShotSpread>
			<SwayFactor>1.34</SwayFactor>
			<Bulk>5</Bulk>
			<WorkToMake>5000</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_10Gauge_Buck</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>12</range>
			<burstShotCount>3</burstShotCount>
			<soundCast>RNShot_AR23Liberator</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilAmount>1.45</recoilAmount>
			<ticksBetweenBurstShots>1</ticksBetweenBurstShots> <!-- technically it fires all three at once, but this is as low as we can practically go -->
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>3</magazineSize>
			<reloadTime>1.8</reloadTime>
			<ammoSet>AmmoSet_10Gauge</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_Sidearm</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<!-- ============ Talon ============ -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_LAS58Talon_Revolver</defName>
		<statBases>
			<Mass>1.39</Mass>
			<RangedWeapon_Cooldown>0.49</RangedWeapon_Cooldown>
			<SightsEfficiency>0.7</SightsEfficiency>
			<ShotSpread>0.5</ShotSpread>
			<SwayFactor>1.39</SwayFactor>
			<Bulk>2.79</Bulk>
			<WorkToMake>8000</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_TalonPulse</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>12</range>
			<soundCast>RNShot_LAS58Talon</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilAmount>0</recoilAmount>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_Sidearm</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<!-- ============ Ultimatum ============ -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_SEAFG31_Ultimatum</defName>
		<statBases>
			<Mass>2.7</Mass>
			<RangedWeapon_Cooldown>0</RangedWeapon_Cooldown> <!-- so you have more time to run the fuck away -->
			<SightsEfficiency>1.0</SightsEfficiency>
			<ShotSpread>0.16</ShotSpread>
			<SwayFactor>0.89</SwayFactor>
			<Bulk>4.1</Bulk>
			<WorkToMake>11500</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_80mm_UltiHE</defaultProjectile>
			<warmupTime>1.2</warmupTime>
			<range>12</range>
			<soundCast>RNShot_G31Ultimatum</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilAmount>1.73</recoilAmount>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<reloadTime>3</reloadTime>
			<ammoSet>AmmoSet_80mmUltimatum</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

</Patch>
