<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- ========== Steyr AUG A2 ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_AUGA2AR</defName>
		<statBases>
			<Mass>3.60</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>2.09</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.17</SwayFactor>
			<Bulk>7.90</Bulk>
			<WorkToMake>40500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>45</Steel>
			<ComponentIndustrial>7</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.47</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.175</warmupTime>
			<range>40</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<soundCast>RNShotAUG</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

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

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

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

	<!-- ========== Steyr AUG A3 SD ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_AUGA3SDAR</defName>
		<statBases>
			<Mass>3.20</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.10</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.11</SwayFactor>
			<Bulk>7.90</Bulk>
			<WorkToMake>39500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>45</Steel>
			<ComponentIndustrial>7</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.56</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>40</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<soundCast>RNShot_SDAR_III</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

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

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

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

	<!-- ========== F2000 ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_F2000AR</defName>
		<statBases>
			<Mass>3.60</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.09</ShotSpread>
			<SwayFactor>1.05</SwayFactor>
			<Bulk>6.88</Bulk>
			<WorkToMake>36500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>40</Steel>
			<ComponentIndustrial>6</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.41</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>55</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
			<soundCast>RNShot_GenericBullpup_III</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

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

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

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

	<!-- ========== FAMAS ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_FAMASAR</defName>
		<statBases>
			<Mass>3.61</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.12</SwayFactor>
			<Bulk>7.57</Bulk>
			<WorkToMake>37500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>45</Steel>
			<ComponentIndustrial>6</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.44</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>40</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
			<soundCast>RNShot_GenericBullpup_II</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>25</magazineSize>
			<reloadTime>4.5</reloadTime>
			<ammoSet>AmmoSet_556x45mmNATO</ammoSet>
		</AmmoUser>

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

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

	<!-- ========== Groza-4 ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_Groza4AR</defName>
		<statBases>
			<Mass>3.60</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.13</ShotSpread>
			<SwayFactor>1.08</SwayFactor>
			<Bulk>7.20</Bulk>
			<WorkToMake>35500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>5</Chemfuel>
			<Steel>45</Steel>
			<ComponentIndustrial>6</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.67</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_9x39mmSoviet_FMJ</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>31</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<soundCast>RNShot_Groza4</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>4.5</reloadTime>
			<ammoSet>AmmoSet_9x39mmSoviet</ammoSet>
		</AmmoUser>

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

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

	<!-- ========== L85A2 ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_L85A2MILSPEC</defName>
		<statBases>
			<Mass>3.82</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>2.24</SightsEfficiency>
			<ShotSpread>0.06</ShotSpread>
			<SwayFactor>1.21</SwayFactor>
			<Bulk>7.85</Bulk>
			<WorkToMake>41000</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>5</Chemfuel>
			<Steel>50</Steel>
			<ComponentIndustrial>7</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.40</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>48</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<soundCast>RNShot_GenericBullpup</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

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

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

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

	<!-- ========== Type 97 / QBZ-95 ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_Type97AR</defName>
		<statBases>
			<Mass>3.35</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.09</SwayFactor>
			<Bulk>7.58</Bulk>
			<WorkToMake>36500</WorkToMake>
		</statBases>
		<costList>
			<Chemfuel>10</Chemfuel>
			<Steel>40</Steel>
			<ComponentIndustrial>6</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>1.49</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_556x45mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>48</range>
			<burstShotCount>6</burstShotCount>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<soundCast>RNShot_GenericBullpup_III</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

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

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</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_AUGA2AR" or
			defName="RNGun_AUGA3SDAR" or
			defName="RNGun_F2000AR" or
			defName="RNGun_FAMASAR" or
			defName="RNGun_Groza4AR" or
			defName="RNGun_L85A2MILSPEC" or
			defName="RNGun_Type97AR"
			]/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>