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

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Gun_MissileLauncher" or defName="Gun_AutoCannon"]/statBases/MarketValue</xpath>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_MissileLauncher" or defName="Gun_AutoCannon"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>2.02</cooldownTime>
					<armorPenetrationBlunt>1.630</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>muzzle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_AutoCannon"]/graphicData</xpath>
		<value>
			<drawSize>(1.5, 1)</drawSize>
		</value>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_MissileLauncher</defName>
		<statBases>
			<Mass>5.80</Mass>
			<RangedWeapon_Cooldown>1.6</RangedWeapon_Cooldown>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>0.5</SwayFactor>
			<Bulk>9.0</Bulk>
			<SightsEfficiency>1.4</SightsEfficiency>
			<WorkToMake>56000</WorkToMake>
		</statBases>
		<costList>
			<Steel>45</Steel>
			<Plasteel>55</Plasteel>
			<Teseum>25</Teseum>
			<ComponentIndustrial>8</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>0.5</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_BaseAriadnanMicroMissile_HE</defaultProjectile>
			<warmupTime>1.5</warmupTime>
			<range>55</range>
			<soundCast>ShotMissileLauncher</soundCast>
			<muzzleFlashScale>9</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<reloadTime>4.5</reloadTime>
			<ammoSet>AmmoSet_AriadnanMicroMissile</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_AI_AOE</li>
			<li>AdvancedGun</li>
			<li>GunHeavy</li>
		</weaponTags>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_AutoCannon</defName>
		<statBases>
			<Mass>25.80</Mass>
			<RangedWeapon_Cooldown>2.5</RangedWeapon_Cooldown>
			<ShotSpread>0.1</ShotSpread>
			<SwayFactor>2.5</SwayFactor>
			<Bulk>29.0</Bulk>
			<SightsEfficiency>1.4</SightsEfficiency>
			<WorkToMake>88000</WorkToMake>
		</statBases>
		<costList>
			<Steel>60</Steel>
			<Plasteel>85</Plasteel>
			<Teseum>50</Teseum>
			<ComponentIndustrial>15</ComponentIndustrial>
		</costList>
		<Properties>
			<recoilAmount>2.5</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_20x99mmRShVAK_Teseum</defaultProjectile>
			<warmupTime>2.5</warmupTime>
			<range>55</range>
			<burstShotCount>5</burstShotCount>
			<ticksBetweenBurstShots>10</ticksBetweenBurstShots>
			<soundCast>ShotAutoCannon</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>16</muzzleFlashScale>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>25</magazineSize>
			<reloadTime>12.5</reloadTime>
			<ammoSet>AmmoSet_TeseumAutocannon</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>3</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>Bipod_ATR</li>
			<li>AdvancedGun</li>
			<li>GunHeavy</li>
		</weaponTags>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Gun_AutoCannon"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.5,1</DrawSize>
				<DrawOffset>0.05,0.0</DrawOffset>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_MissileLauncher"]</xpath>
		<value>
			<recipeMaker>
				<workSpeedStat>GeneralLaborSpeed</workSpeedStat>
				<workSkill>Crafting</workSkill>
				<effectWorking>Smith</effectWorking>
				<soundWorking>Recipe_Smith</soundWorking>
				<recipeUsers>
					<li>TableMachining</li>
				</recipeUsers>
				<unfinishedThingDef>UnfinishedGun</unfinishedThingDef>
				<researchPrerequisite>CE_Launchers</researchPrerequisite>
			</recipeMaker>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_AutoCannon"]</xpath>
		<value>
			<recipeMaker>
				<workSpeedStat>GeneralLaborSpeed</workSpeedStat>
				<workSkill>Crafting</workSkill>
				<effectWorking>Smith</effectWorking>
				<soundWorking>Recipe_Smith</soundWorking>
				<recipeUsers>
					<li>TableMachining</li>
				</recipeUsers>
				<unfinishedThingDef>UnfinishedGun</unfinishedThingDef>
				<researchPrerequisite>CE_TurretHeavyWeapons</researchPrerequisite>
			</recipeMaker>
		</value>
	</Operation>
</Patch>