<?xml version="1.0" encoding="utf-8" ?>
<Patch>
	<!--Melee Attacks for Guns-->
	<Operation Class="PatchOperationReplace">
		<xpath>
			Defs/ThingDef[
			defName="RNGun_LAS16Sickle_Rifle" or
			defName="RNGun_PLAS1_Scorcher" or
			defName="RNGun_LAS99_QuasarCannon"
			]/tools
		</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>2.02</cooldownTime>
					<armorPenetrationBlunt>1.63</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<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>
			</tools>
		</value>
	</Operation>

	<!-- ============ Sickle ============ -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_LAS16Sickle_Rifle</defName>
		<statBases>
			<Mass>3</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.1</SightsEfficiency>
			<ShotSpread>0.33</ShotSpread>
			<SwayFactor>1.2</SwayFactor>
			<Bulk>7</Bulk>
			<WorkToMake>59500</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_SicklePulse</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>55</range>
			<burstShotCount>5</burstShotCount>
			<soundCast>RNShot_LAS16Sickle</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilAmount>0</recoilAmount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<FireModes>
			<aimedBurstShotCount>3</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<!-- ============ Scorcher ============ -->
	
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_PLAS1_Scorcher</defName>
		<statBases>
			<Mass>4</Mass>
			<RangedWeapon_Cooldown>2.5</RangedWeapon_Cooldown>
			<SightsEfficiency>1.1</SightsEfficiency>
			<ShotSpread>0.17</ShotSpread>
			<SwayFactor>1.25</SwayFactor>
			<Bulk>8.5</Bulk>
			<WorkToMake>62000</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_ScorcherPulse</defaultProjectile>
			<ai_AvoidFriendlyFireRadius>3</ai_AvoidFriendlyFireRadius>
			<warmupTime>1.75</warmupTime>
			<range>55</range>
			<burstShotCount>3</burstShotCount>
			<soundCast>RNShot_PLAS1Scorcher</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilAmount>0</recoilAmount>
			<ticksBetweenBurstShots>20</ticksBetweenBurstShots>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<FireModes>
			<aimedBurstShotCount>2</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<!-- ============ Quasar ============ -->
	
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RNGun_LAS99_QuasarCannon</defName>
		<statBases>
			<SightsEfficiency>2.18</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.61</SwayFactor>
			<Bulk>10.50</Bulk>
			<Mass>6.6</Mass>
			<RangedWeapon_Cooldown>5</RangedWeapon_Cooldown>
			<WorkToMake>82000</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_QuasarPulse</defaultProjectile>
			<ai_AvoidFriendlyFireRadius>4</ai_AvoidFriendlyFireRadius>
			<warmupTime>7</warmupTime>
			<range>55</range>
			<soundCast>RNShot_QuasarShot</soundCast>
			<soundAiming>RN_Quasar_Aiming</soundAiming>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>15</muzzleFlashScale>
			<recoilAmount>0</recoilAmount>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

</Patch>
