<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- ========== Heckler & Koch G36C - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_G36CHRT</defName>
		<statBases>
			<Mass>2.82</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>2.18</SightsEfficiency>
			<ShotSpread>0.13</ShotSpread>
			<SwayFactor>1.03</SwayFactor>
			<Bulk>5.00</Bulk>
			<WorkToMake>34000</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>30</Steel>
			<ComponentIndustrial>6</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.43</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>0.9</warmupTime>
			<range>31</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<soundCast>RNShotG36C</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>30</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_556x45mmNATO</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>TRUE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
			<aimedBurstShotCount>3</aimedBurstShotCount>
		</FireModes>

		<!-- No additional CE weaponTags needed -->
	</Operation>

	<!-- ========== Glock 17 - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_Glock17_HRT</defName>
		<statBases>
			<Mass>0.66</Mass>
			<RangedWeapon_Cooldown>0.40</RangedWeapon_Cooldown>
			<SightsEfficiency>0.70</SightsEfficiency>
			<ShotSpread>0.17</ShotSpread>
			<SwayFactor>0.84</SwayFactor>
			<Bulk>1.86</Bulk>
			<WorkToMake>7500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>5</Chemfuel>
			<Steel>20</Steel>
			<ComponentIndustrial>3</ComponentIndustrial>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x19mmPara_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>12</range>
			<soundCast>RNShotGlock17</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>17</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_9x19mmPara</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
		</FireModes>

		<!-- No additional CE weaponTags needed -->
	</Operation>

	<!-- ========== Heckler & Koch HK417 - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_HK417HRTDMR</defName>
		<statBases>
			<Mass>4.23</Mass>
			<RangedWeapon_Cooldown>0.57</RangedWeapon_Cooldown>
			<SightsEfficiency>2.36</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.10</SwayFactor>
			<Bulk>11.05</Bulk>
			<WorkToMake>30000</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>5</Chemfuel>
			<Steel>60</Steel>
			<ComponentIndustrial>5</ComponentIndustrial>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_762x51mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.6</warmupTime>
			<range>75</range>
			<soundCast>RNShot_GenericDMR</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_762x51mmNATO</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>

		<!-- No additional CE weaponTags needed -->

		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<!-- ========== M4A1 - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_M4A1HRT</defName>
		<statBases>
			<Mass>2.90</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>2.24</SightsEfficiency>
			<ShotSpread>0.1</ShotSpread>
			<SwayFactor>1.17</SwayFactor>
			<Bulk>7.56</Bulk>
			<WorkToMake>35500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>40</Steel>
			<ComponentIndustrial>6</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.58</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>55</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
			<soundCast>RNShot_GenericAR_II</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>30</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_556x45mmNATO</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>TRUE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
			<aimedBurstShotCount>3</aimedBurstShotCount>
		</FireModes>

		<!-- No additional CE weaponTags needed -->
	</Operation>

	<!-- ========== M9A1 - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_M9A1_HRT</defName>
		<statBases>
			<Mass>1.01</Mass>
			<RangedWeapon_Cooldown>0.38</RangedWeapon_Cooldown>
			<SightsEfficiency>0.70</SightsEfficiency>
			<ShotSpread>0.17</ShotSpread>
			<SwayFactor>1.06</SwayFactor>
			<Bulk>2.17</Bulk>
			<WorkToMake>7000</WorkToMake>
		</statBases>
		<costList>
			<Steel>25</Steel>
			<ComponentIndustrial>3</ComponentIndustrial>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x19mmPara_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>12</range>
			<soundCast>RNPistolShot</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>15</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_9x19mmPara</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
		</FireModes>

		<!-- No additional CE weaponTags needed -->
	</Operation>

	<!-- ========== M24A2 - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_M24A2HRTSn</defName>
		<statBases>
			<Mass>7.10</Mass>
			<RangedWeapon_Cooldown>1.36</RangedWeapon_Cooldown>
			<SightsEfficiency>2.60</SightsEfficiency>
			<ShotSpread>0.05</ShotSpread>
			<SwayFactor>1.33</SwayFactor>
			<Bulk>11.92</Bulk>
			<WorkToMake>30500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>15</Chemfuel>
			<Steel>65</Steel>
			<ComponentIndustrial>5</ComponentIndustrial>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_762x51mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.8</warmupTime>
			<range>75</range>
			<soundCast>RNShot_GenericBoltSniper</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>5</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_762x51mmNATO</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>

		<!-- No additional CE weaponTags needed -->

		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<!-- ========== MP5A2 SD - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_MP5A2SDHRT_PDW</defName>
		<statBases>
			<Mass>2.50</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.10</SightsEfficiency>
			<ShotSpread>0.13</ShotSpread>
			<SwayFactor>0.93</SwayFactor>
			<Bulk>6.80</Bulk>
			<WorkToMake>29000</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>5</Chemfuel>
			<Steel>40</Steel>
			<ComponentIndustrial>6</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.60</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x19mmPara_FMJ</defaultProjectile>
			<warmupTime>0.5</warmupTime>
			<range>31</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<soundCast>RNShotSMG2SD</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>30</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_9x19mmPara</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
			<aimedBurstShotCount>3</aimedBurstShotCount>
		</FireModes>

		<!-- No additional CE weaponTags needed -->
	</Operation>

	<!-- ========== Remington 870 - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_Remington870HRT</defName>
		<statBases>
			<Mass>2.72</Mass>
			<RangedWeapon_Cooldown>1.02</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.14</ShotSpread>
			<SwayFactor>1.12</SwayFactor>
			<Bulk>7.67</Bulk>
			<WorkToMake>14500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>40</Steel>
			<ComponentIndustrial>1</ComponentIndustrial>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_12Gauge_Buck</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>12</range>
			<soundCast>RN870Shot</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>6</magazineSize>
			<reloadTime>5.1</reloadTime>
			<ammoSet>AmmoSet_12Gauge</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
		</FireModes>

		<!-- No additional CE weaponTags needed -->
	</Operation>

	<!-- ========== UMP 45 - Hostage Rescue Team variant ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_UMP45HRT_PDW</defName>
		<statBases>
			<Mass>2.54</Mass>
			<RangedWeapon_Cooldown>0.37</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.14</ShotSpread>
			<SwayFactor>0.94</SwayFactor>
			<Bulk>4.50</Bulk>
			<WorkToMake>30500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>30</Steel>
			<ComponentIndustrial>5</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.84</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_45ACP_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>15</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
			<soundCast>RNUMP45Shot</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>25</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_45ACP</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
			<aimedBurstShotCount>3</aimedBurstShotCount>
		</FireModes>

		<!-- No additional CE weaponTags needed -->
	</Operation>

	<!-- == Shared patches for firearm melee tools == -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="RNGun_Glock17_HRT" or
			defName="RNGun_M9A1_HRT"
			]/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="RNGun_G36CHRT" or
			defName="RNGun_HK417HRTDMR" or
			defName="RNGun_M4A1HRT" or
			defName="RNGun_M24A2HRTSn" or
			defName="RNGun_MP5A2SDHRT_PDW" or
			defName="RNGun_Remington870HRT" or
			defName="RNGun_UMP45HRT_PDW"
			]/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>
</Patch>