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

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_M98Widow</defName>
		<statBases>
			<Mass>12</Mass>
			<RangedWeapon_Cooldown>0.64</RangedWeapon_Cooldown>
			<SightsEfficiency>3.5</SightsEfficiency>
			<ShotSpread>0.03</ShotSpread>
			<SwayFactor>1.88</SwayFactor>
			<Bulk>16.80</Bulk>
			<WorkToMake>12500</WorkToMake>
		</statBases>
		<costList>
			<Plasteel>80</Plasteel>
			<ComponentSpacer>2</ComponentSpacer>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_M98_Geth</defaultProjectile>
			<warmupTime>2</warmupTime>
			<range>88</range>
			<ammoConsumedPerShotCount>10</ammoConsumedPerShotCount>
			<soundCast>Shot_M98Widow</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>11</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>10</magazineSize>
			<reloadTime>1.5</reloadTime>
			<ammoSet>AmmoSet_M98_Geth</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>GethM98Widow</li>
		</weaponTags>

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

	<!-- ========== Geth Javelin ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_GethJavelin</defName>
		<statBases>
			<Mass>3</Mass>
			<RangedWeapon_Cooldown>0.4</RangedWeapon_Cooldown>
			<SightsEfficiency>2.8</SightsEfficiency>
			<ShotSpread>0.03</ShotSpread>
			<SwayFactor>1.62</SwayFactor>
			<Bulk>10.60</Bulk>
			<WorkToMake>12500</WorkToMake>
		</statBases>
		<costList>
			<Plasteel>60</Plasteel>
			<ComponentSpacer>2</ComponentSpacer>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_GethSniper</defaultProjectile>
			<warmupTime>1.45</warmupTime>
			<range>83</range>
			<ammoConsumedPerShotCount>5</ammoConsumedPerShotCount>
			<soundCast>Shot_Javelin</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>5</magazineSize>
			<reloadTime>1.1</reloadTime>
			<ammoSet>AmmoSet_GethSniper</ammoSet>
		</AmmoUser>

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

		<weaponTags>
			<li>GethJavelin</li>
		</weaponTags>

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

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Gun_GethJavelin"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.18,1.12</DrawSize>
				<DrawOffset>0.0,0.0</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- ========== Geth ShotGun ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_GethPlasmaShotgun</defName>
		<statBases>
			<Mass>2.4</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
			<ShotSpread>0.14</ShotSpread>
			<SwayFactor>1.18</SwayFactor>
			<Bulk>7.20</Bulk>
			<WorkToMake>12500</WorkToMake>
		</statBases>
		<costList>
			<Plasteel>50</Plasteel>
			<ComponentSpacer>2</ComponentSpacer>
		</costList>
		<Properties>
			<recoilAmount>2.18</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_GethShotgun</defaultProjectile>
			<warmupTime>0.7</warmupTime>
			<range>18</range>
			<burstShotCount>2</burstShotCount>
			<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
			<ammoConsumedPerShotCount>3</ammoConsumedPerShotCount>
			<soundCast>Shot_PlasmaShotgun</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>10</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>15</magazineSize>
			<reloadTime>3.5</reloadTime>
			<ammoSet>AmmoSet_GethShotgun</ammoSet>
		</AmmoUser>

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

		<weaponTags>
			<li>GethPlasmaShotgun</li>
		</weaponTags>
	</Operation>

	<!-- ========== Geth Pulse Rifle ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_GethPulseRifle</defName>
		<statBases>
			<Mass>2.6</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.06</ShotSpread>
			<SwayFactor>1.33</SwayFactor>
			<Bulk>8.03</Bulk>
			<WorkToMake>12500</WorkToMake>
		</statBases>
		<costList>
			<Plasteel>40</Plasteel>
			<ComponentSpacer>2</ComponentSpacer>
		</costList>
		<Properties>
			<recoilAmount>0.9</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_GethRifle</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>52</range>
			<burstShotCount>10</burstShotCount>
			<ticksBetweenBurstShots>3</ticksBetweenBurstShots>
			<soundCast>Shot_PulseRifle</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>3</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>80</magazineSize>
			<reloadTime>5.9</reloadTime>
			<ammoSet>AmmoSet_GethRifle</ammoSet>
		</AmmoUser>

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

		<weaponTags>
			<li>GethPulseRifle</li>
		</weaponTags>
	</Operation>

	<!-- ========== Geth Pulse SMG ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_GethPlasmaSMG</defName>
		<statBases>
			<Mass>1.6</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>0.95</SightsEfficiency>
			<ShotSpread>0.12</ShotSpread>
			<SwayFactor>1.14</SwayFactor>
			<Bulk>3.5</Bulk>
			<WorkToMake>12000</WorkToMake>
		</statBases>
		<costList>
			<Plasteel>30</Plasteel>
			<ComponentSpacer>1</ComponentSpacer>
		</costList>
		<Properties>
			<recoilAmount>0.8</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_GethSMG</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>25</range>
			<burstShotCount>10</burstShotCount>
			<ticksBetweenBurstShots>3</ticksBetweenBurstShots>
			<soundCast>Shot_PlasmaSMG</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>3</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>80</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_GethSMG</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>TRUE</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
			<aimedBurstShotCount>5</aimedBurstShotCount>
		</FireModes>

		<weaponTags>
			<li>GethPlasmaSMG</li>
		</weaponTags>
	</Operation>

	<!-- ========== Geth Spitfire ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_GethSpitfire</defName>
		<statBases>
			<Mass>18</Mass>
			<RangedWeapon_Cooldown>0.56</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.56</SwayFactor>
			<Bulk>22.03</Bulk>
			<WorkToMake>70000</WorkToMake>
		</statBases>
		<costList>
			<Plasteel>150</Plasteel>
			<ComponentSpacer>4</ComponentSpacer>
		</costList>
		<Properties>
			<recoilAmount>0.88</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_GethSpitfire</defaultProjectile>
			<warmupTime>1.35</warmupTime>
			<range>62</range>
			<minRange>1.5</minRange>
			<burstShotCount>40</burstShotCount>
			<ticksBetweenBurstShots>2</ticksBetweenBurstShots>
			<soundCast>Shot_Spitfire</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>

		<AmmoUser>
			<magazineSize>220</magazineSize>
			<reloadTime>7.8</reloadTime>
			<ammoSet>AmmoSet_GethSpitfire</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>False</aiUseBurstMode>
			<aiAimMode>Snapshot</aiAimMode>
			<aimedBurstShotCount>20</aimedBurstShotCount>
		</FireModes>

		<weaponTags>
			<li>GethSpitfire</li>
		</weaponTags>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Gun_GethSpitfire"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.18,1.12</DrawSize>
				<DrawOffset>0.0,0.0</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- ========== Seige Pulse Assault Cannon ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_SiegePulseCannon</defName>
		<statBases>
			<Mass>15</Mass>
			<RangedWeapon_Cooldown>1.5</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.02</ShotSpread>
			<SwayFactor>1.47</SwayFactor>
			<Bulk>20.03</Bulk>
			<WorkToMake>50000</WorkToMake>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_GethCannon</defaultProjectile>
			<warmupTime>3.2</warmupTime>
			<minRange>2.5</minRange>
			<range>78</range>
			<ai_AvoidFriendlyFireRadius>5</ai_AvoidFriendlyFireRadius>
			<soundCast>Shot_Colossus</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>14</muzzleFlashScale>
			<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
		</Properties>

		<AmmoUser>
			<magazineSize>5</magazineSize>
			<reloadTime>6.8</reloadTime>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>False</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>

		<weaponTags>
			<li>SiegePulseAssaultCannon</li>
		</weaponTags>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="Gun_GethJavelin" or
			defName="Gun_GethPlasmaShotgun" or
			defName="Gun_GethSpitfire" or
			defName="Gun_M98Widow" or
			defName="Gun_GethPulseRifle"
			]/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>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="Gun_GethPlasmaSMG"
			]/tools </xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.35</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>2</power>
					<cooldownTime>1.25</cooldownTime>
					<armorPenetrationBlunt>1.630</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>muzzle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>4</power>
					<cooldownTime>1.35</cooldownTime>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="Gun_SiegePulseCannon"
			]/tools </xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>leg</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>43</power>
					<cooldownTime>2.8</cooldownTime>
					<armorPenetrationBlunt>46</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>
</Patch>