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

	<Operation Class="PatchOperationFindMod">
		<mods>
			<li>Vanilla Factions Expanded - Pirates</li>
		</mods>
		<match Class="PatchOperationSequence">
			<operations>

				<li Class="PatchOperationAddModExtension">
					<xpath>Defs/ThingDef[defName="VFEP_WarcasketGun_CryptoCannon"]</xpath>
					<value>
						<li Class="CombatExtended.GunDrawExtension">
							<DrawSize>1.7,1.7</DrawSize>
							<DrawOffset>0.0,0.0</DrawOffset>
						</li>
					</value>
				</li>

				<!-- === Tools === -->
				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="VFEP_WarcasketGun_CryptoCannon"]/tools</xpath>
					<value>
						<tools>
							<li Class="CombatExtended.ToolCE">
								<label>barrel</label>
								<capacities>
									<li>Blunt</li>
								</capacities>
								<power>35</power>
								<cooldownTime>2.44</cooldownTime>
								<armorPenetrationBlunt>16</armorPenetrationBlunt>
								<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
							</li>
						</tools>
					</value>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>VFEP_WarcasketGun_CryptoCannon</defName>
					<statBases>
						<Bulk>20</Bulk>
						<SwayFactor>2.10</SwayFactor>
						<ShotSpread>3.00</ShotSpread>
						<SightsEfficiency>1.0</SightsEfficiency>
						<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
					</statBases>
					<Properties>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<recoilAmount>0.55</recoilAmount>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_Flamethrower_CryptoCannon</defaultProjectile>
						<burstShotCount>15</burstShotCount>
						<ticksBetweenBurstShots>7</ticksBetweenBurstShots>
						<warmupTime>1.3</warmupTime>
						<range>30</range>
						<minRange>3</minRange>
						<soundCast>HissFlamethrower</soundCast>
						<soundCastTail>GunTail_Light</soundCastTail>
						<muzzleFlashScale>12</muzzleFlashScale>
						<targetParams>
							<canTargetLocations>true</canTargetLocations>
						</targetParams>
						<ai_AvoidFriendlyFireRadius>5</ai_AvoidFriendlyFireRadius>
					</Properties>
					<AmmoUser>
						<magazineSize>200</magazineSize>
						<reloadTime>5.6</reloadTime>
						<ammoSet>AmmoSet_CryptoCannon</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>SuppressFire</aiAimMode>
						<aimedBurstShotCount>5</aimedBurstShotCount>
						<noSingleShot>True</noSingleShot>
					</FireModes>
				</li>

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

</Patch>