<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[
			defName="ADE_Turret_HMGT" or
			defName="ADE_Turret_HST" or
			defName="ADE_Turret_GLT"
			]/comps/li[@Class="CompProperties_Refuelable"] </xpath>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="ADE_Turret_HMGT" or
			defName="ADE_Turret_HST" or
			defName="ADE_Turret_GLT"
			]/thingClass </xpath>
		<value>
			<thingClass>CombatExtended.Building_TurretGunCE</thingClass>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="ADE_Turret_HMGT" or
			defName="ADE_Turret_HST" or
			defName="ADE_Turret_GLT"
			]/fillPercent </xpath>
		<value>
			<fillPercent>0.85</fillPercent>
		</value>
	</Operation>
	<!-- adding power requirement -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[
			defName="ADE_Turret_HMGT" or
			defName="ADE_Turret_HST" or
			defName="ADE_Turret_GLT"
			]/comps </xpath>
		<value>
			<li Class="CompProperties_Power">
				<compClass>CompPowerTrader</compClass>
				<basePowerConsumption>350</basePowerConsumption>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="ADE_Turret_HMGT" or
			defName="ADE_Turret_HST" or
			defName="ADE_Turret_GLT"
			]/statBases/ShootingAccuracyTurret </xpath>
		<value>
			<AimingAccuracy>1</AimingAccuracy>
			<ShootingAccuracyTurret>1</ShootingAccuracyTurret>
		</value>
	</Operation>
	<!-- ========== HMG  Turret ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>ADE_Gun_HMGT</defName>
		<statBases>
			<RangedWeapon_Cooldown>0.18</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.02</ShotSpread>
			<SwayFactor>1.13</SwayFactor>
			<Bulk>37.08</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.09</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_762x51mmNATO_FMJ</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>54</range>
			<ticksBetweenBurstShots>3</ticksBetweenBurstShots>
			<burstShotCount>20</burstShotCount>
			<soundCast>Shot_AssaultRifle</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>500</magazineSize>
			<reloadTime>15.6</reloadTime>
			<ammoSet>AmmoSet_762x51mmNATO</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
			<noSnapshot>true</noSnapshot>
			<noSingleShot>true</noSingleShot>
		</FireModes>
	</Operation>

	<!-- ========== Grenade Launcher Turret ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>ADE_Gun_GLT</defName>
		<statBases>
			<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.14</ShotSpread>
			<SwayFactor>2.02</SwayFactor>
			<Bulk>10.66</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>0.34</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_40x53mmGrenade_HE</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>55</range>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<burstShotCount>5</burstShotCount>
			<soundCast>AGS</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>18</muzzleFlashScale>
			<recoilPattern>Mounted</recoilPattern>
			<requireLineOfSight>false</requireLineOfSight>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>40</magazineSize>
			<reloadTime>10.9</reloadTime>
			<ammoSet>AmmoSet_40x53mmGrenade</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiUseBurstMode>TRUE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
			<noSnapshot>true</noSnapshot>
			<noSingleShot>true</noSingleShot>
		</FireModes>
	</Operation>

	<!-- ========== Anti Aircraft Precision ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>ADE_Gun_HST</defName>
		<statBases>
			<RangedWeapon_Cooldown>0.37</RangedWeapon_Cooldown>
			<SightsEfficiency>1.2</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>1.32</SwayFactor>
			<Bulk>28.72</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.80</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_20x128mmOerlikon_AP</defaultProjectile>
			<warmupTime>1.4</warmupTime>
			<range>65</range>
			<soundCast>autocannon_slow</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<muzzleFlashScale>45</muzzleFlashScale>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>150</magazineSize>
			<reloadTime>7.8</reloadTime>
			<ammoSet>AmmoSet_20x128mmOerlikon</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
			<noSnapshot>true</noSnapshot>
		</FireModes>
	</Operation>
</Patch>