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

	<Operation Class="PatchOperationFindMod">
		<mods>
			<li>Vanilla Weapons Expanded - Heavy Weapons</li>
		</mods>

		<match Class="PatchOperationSequence">
			<operations>

				<!-- === Tools === -->

				<li Class="PatchOperationReplace">
					<xpath>
						Defs/ThingDef[defName="VWEFT_Gun_HandheldGatlingGun"]/tools
					</xpath>
					<value>
						<tools>
							<li Class="CombatExtended.ToolCE">
								<label>barrels</label>
								<capacities>
									<li>Blunt</li>
								</capacities>
								<power>10</power>
								<cooldownTime>2.44</cooldownTime>
								<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
								<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
							</li>
						</tools>
					</value>
				</li>

				<!-- === Handheld Gatling Gun === -->
				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="VWEFT_Gun_HandheldGatlingGun"]/costList/ComponentIndustrial</xpath>
					<value>
						<ComponentIndustrial>14</ComponentIndustrial>
					</value>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>VWEFT_Gun_HandheldGatlingGun</defName>
					<statBases>
						<Mass>77</Mass>
						<Bulk>22</Bulk>
						<SwayFactor>8.78</SwayFactor>
						<ShotSpread>0.01</ShotSpread>
						<SightsEfficiency>0.60</SightsEfficiency>
						<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
					</statBases>
					<Properties>
						<recoilAmount>0.66</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>True</hasStandardCommand>
						<defaultProjectile>Bullet_4570GovHR_FMJ</defaultProjectile>
						<burstShotCount>10</burstShotCount>
						<ticksBetweenBurstShots>9</ticksBetweenBurstShots>
						<warmupTime>2.1</warmupTime>
						<range>46</range>
						<minRange>2</minRange>
						<soundCast>Shot_Minigun</soundCast>
						<soundCastTail>GunTail_Medium</soundCastTail>
						<muzzleFlashScale>12</muzzleFlashScale>
					</Properties>
					<AmmoUser>
						<magazineSize>40</magazineSize>
						<reloadTime>7.8</reloadTime>
						<ammoSet>AmmoSet_4570GovHR</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>SuppressFire</aiAimMode>
						<aiUseBurstMode>True</aiUseBurstMode>
						<aimedBurstShotCount>5</aimedBurstShotCount>
						<noSingleShot>true</noSingleShot>
					</FireModes>
					<AllowWithRunAndGun>false</AllowWithRunAndGun>
				</li>

				<li Class="PatchOperationAddModExtension">
					<xpath>Defs/ThingDef[defName="VWEFT_Gun_HandheldGatlingGun"]</xpath>
					<value>
						<li Class="CombatExtended.GunDrawExtension">
							<DrawSize>1.3,1.3</DrawSize>
							<DrawOffset>0.10,-0.22</DrawOffset>
						</li>
					</value>
				</li>

			</operations>
		</match>
	</Operation>

</Patch>