<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TR_Base_HMG" or defName="TR_Base_HMGSB"]/thingClass</xpath>
		<value>
			<thingClass>CombatExtended.Building_TurretGunCE</thingClass>
		</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="TR_Base_HMG" or defName="TR_Base_HMGSB"]/comps/li[@Class="CompProperties_Refuelable"]</xpath>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="TR_Base_HMG" or defName="TR_Base_HMGSB"]/tradeTags</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="TR_Base_HMG" or defName="TR_Base_HMGSB"]</xpath>
			<value>
				<tradeTags />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="TR_Base_HMG" or defName="TR_Base_HMGSB"]/tradeTags</xpath>
		<value>
			<li>CE_Turret</li>
		</value>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>TR_Gun_HMG</defName>
		<statBases>
			<RangedWeapon_Cooldown>4</RangedWeapon_Cooldown>
			<Mass>12</Mass>
			<Bulk>10.00</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.6</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_762x51mmNATO_FMJ</defaultProjectile>
			<warmupTime>3</warmupTime>
			<range>75</range>
			<ticksBetweenBurstShots>2</ticksBetweenBurstShots>
			<burstShotCount>24</burstShotCount>
			<soundCast>TR_HMG_Fire</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>20</muzzleFlashScale>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>100</magazineSize>
			<reloadTime>7.8</reloadTime>
			<ammoSet>AmmoSet_762x51mmNATO</ammoSet>
		</AmmoUser>
	</Operation>
</Patch>