<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			@Name="FedHarvester" or
			@Name="Harmonizer"
			]/thingClass</xpath>
		<value>
			<thingClass>CombatExtended.Building_TurretGunCE</thingClass>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="Turret_FedHarvester" or
			defName="Turret_PB"
			]/building/turretBurstCooldownTime</xpath>
		<value>
			<turretBurstCooldownTime>0.4</turretBurstCooldownTime>
		</value>
	</Operation>

	<!-- ==========  Harvester Cannon  =========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_FedHarvester</defName>
		<statBases>
			<SightsEfficiency>1.0</SightsEfficiency>
			<ShotSpread>0.12</ShotSpread>
			<SwayFactor>0.80</SwayFactor>
			<Bulk>22.00</Bulk>
			<Mass>18.50</Mass>
			<RangedWeapon_Cooldown>0.4</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>0.54</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_HarvesterCannon</defaultProjectile>
			<warmupTime>1.55</warmupTime>
			<ticksBetweenBurstShots>20</ticksBetweenBurstShots>
			<burstShotCount>13</burstShotCount>
			<range>75</range>
			<soundCast>RS_ShotCR</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>65</magazineSize>
			<reloadTime>8</reloadTime>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>5</aimedBurstShotCount>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<!-- ==========  Plasma Bombard  =========== -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_PB"]</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_Charges">
					<chargeSpeeds>
						<li>15</li>
						<li>25</li>
						<li>35</li>
						<li>45</li>
					</chargeSpeeds>
				</li>
				<li Class="CombatExtended.CompProperties_AmmoUser">
					<magazineSize>1</magazineSize>
					<reloadTime>20</reloadTime>
				</li>
			</comps>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_PB"]/statBases</xpath>
		<value>
			<ShotSpread>0.4</ShotSpread>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_PB"]/verbs</xpath>
		<value>
			<verbs>
				<li Class="CombatExtended.VerbPropertiesCE">
					<verbClass>CombatExtended.Verb_ShootMortarCE</verbClass>
					<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
					<hasStandardCommand>true</hasStandardCommand>
					<defaultProjectile>Bullet_PlasmaTurretBombard</defaultProjectile>
					<warmupTime>3.55</warmupTime>
					<range>900</range>
					<minRange>25</minRange>
					<burstShotCount>1</burstShotCount>
					<soundCast>RS_ShotHarmonizer</soundCast>
					<soundCastTail>GunTail_Heavy</soundCastTail>
					<muzzleFlashScale>26</muzzleFlashScale>
					<circularError>1.5</circularError>
					<indirectFirePenalty>0.3</indirectFirePenalty>
					<targetParams>
						<canTargetLocations>true</canTargetLocations>
					</targetParams>
				</li>
			</verbs>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_PB"]</xpath>
		<value>
			<weaponTags>
				<li>Artillery</li>
				<li>TurretGun</li>
				<li>Artillery_BaseDestroyer</li>
			</weaponTags>
		</value>
	</Operation>
</Patch>