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

	<!-- === verbClass === -->
	<Operation Class="PatchOperationReplace">
		<xpath>
			Defs/ThingDef[
			defName="VWE_Gun_Autocannon" or
			defName="VWE_Gun_HandheldMortar" or
			defName="VWE_Gun_HeavyFlamer" or
			defName="VWE_Gun_SwarmMissileLauncher" or
			defName="VWE_Gun_UraniumSlugRifle"
			]/verbs/li/verbClass
		</xpath>
		<value>
			<verbClass>Verb_Shoot</verbClass>
		</value>
	</Operation>

	<!-- === Tools === -->
	<Operation Class="PatchOperationReplace">
		<xpath>
			Defs/ThingDef[
			defName="VWE_Gun_Autocannon" or
			defName="VWE_Gun_HandheldMortar" or
			defName="VWE_Gun_HeavyFlamer" or
			defName="VWE_Gun_SwarmMissileLauncher" or
			defName="VWE_Gun_UraniumSlugRifle"
			]/tools
		</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2.44</cooldownTime>
					<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Autocannon === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VWE_Gun_Autocannon</defName>
		<statBases>
			<Mass>55</Mass>
			<Bulk>22</Bulk>
			<SwayFactor>8.80</SwayFactor>
			<ShotSpread>0.01</ShotSpread>
			<SightsEfficiency>0.66</SightsEfficiency>
			<RangedWeapon_Cooldown>0.37</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.72</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_20x102mmNATO_AP</defaultProjectile>
			<burstShotCount>10</burstShotCount>
			<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
			<warmupTime>1</warmupTime>
			<range>56</range>
			<minRange>2</minRange>
			<soundCast>Shot_Autocannon</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>50</magazineSize>
			<reloadTime>6.5</reloadTime>
			<ammoSet>AmmoSet_20x102mmNATO</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
			<aiUseBurstMode>True</aiUseBurstMode>
			<aimedBurstShotCount>5</aimedBurstShotCount>
		</FireModes>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VWE_Gun_Autocannon"]/recipeMaker/researchPrerequisite</xpath>
		<value>
			<researchPrerequisite>CE_TurretHeavyWeapons</researchPrerequisite>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VWE_Gun_Autocannon"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.3,1.3</DrawSize>
				<DrawOffset>0.10,-0.22</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- === Handheld Mortar === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VWE_Gun_HandheldMortar</defName>
		<statBases>
			<Bulk>20</Bulk>
			<SwayFactor>1.24</SwayFactor>
			<ShotSpread>0.10</ShotSpread>
			<SightsEfficiency>0.5</SightsEfficiency>
			<RangedWeapon_Cooldown>1.5</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>5.0</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootMortarCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_60mmMortarShell_HE</defaultProjectile>
			<warmupTime>3.5</warmupTime>
			<range>126</range>
			<minRange>16</minRange>
			<soundCast>Mortar_LaunchA</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>16</muzzleFlashScale>
			<circularError>1.1</circularError>
			<indirectFirePenalty>0.3</indirectFirePenalty>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<reloadTime>5.2</reloadTime>
			<ammoSet>AmmoSet_60mmMortarShell</ammoSet>
		</AmmoUser>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="VWE_Gun_HandheldMortar"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_Charges">
				<chargeSpeeds>
					<li>30</li>
					<li>50</li>
					<li>70</li>
					<li>90</li>
				</chargeSpeeds>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VWE_Gun_HandheldMortar"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.3,1.3</DrawSize>
				<DrawOffset>0.10,-0.20</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- === Slug Rifle === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VWE_Gun_UraniumSlugRifle</defName>
		<statBases>
			<Mass>60</Mass>
			<Bulk>22.5</Bulk>
			<SwayFactor>9.85</SwayFactor>
			<ShotSpread>0.01</ShotSpread>
			<SightsEfficiency>2.20</SightsEfficiency>
			<RangedWeapon_Cooldown>0.40</RangedWeapon_Cooldown>
			<NightVisionEfficiency_Weapon>0.4</NightVisionEfficiency_Weapon>
		</statBases>
		<Properties>
			<recoilAmount>3.0</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_30x173mmNATO_AP</defaultProjectile>
			<warmupTime>4.6</warmupTime>
			<range>86</range>
			<minRange>9</minRange>
			<soundCast>Shot_TurretSniper</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>10</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>5</magazineSize>
			<reloadTime>6.6</reloadTime>
			<ammoSet>AmmoSet_30x173mmNATO</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VWE_Gun_UraniumSlugRifle"]/recipeMaker/researchPrerequisite</xpath>
		<value>
			<researchPrerequisite>CE_TurretHeavyWeapons</researchPrerequisite>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VWE_Gun_UraniumSlugRifle"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.4,1.4</DrawSize>
				<DrawOffset>0.15,-0.22</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- === Heavy Flamer === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VWE_Gun_HeavyFlamer</defName>
		<statBases>
			<Bulk>18</Bulk>
			<SwayFactor>7.10</SwayFactor>
			<ShotSpread>0.5</ShotSpread>
			<SightsEfficiency>0.60</SightsEfficiency>
			<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<recoilAmount>0.85</recoilAmount>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_Flamethrower_Prometheum</defaultProjectile>
			<burstShotCount>40</burstShotCount>
			<ticksBetweenBurstShots>1</ticksBetweenBurstShots>
			<warmupTime>1</warmupTime>
			<range>26</range>
			<minRange>3</minRange>
			<soundCast>HissFlamethrower</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
		</Properties>
		<AmmoUser>
			<magazineSize>200</magazineSize>
			<reloadTime>5.6</reloadTime>
			<ammoSet>AmmoSet_Flamethrower</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>SuppressFire</aiAimMode>
			<aimedBurstShotCount>20</aimedBurstShotCount>
			<noSingleShot>True</noSingleShot>
		</FireModes>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VWE_Gun_HeavyFlamer"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.3,1.3</DrawSize>
				<DrawOffset>0.10,-0.20</DrawOffset>
			</li>
		</value>
	</Operation>

	<!-- === Missile Launcher === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VWE_Gun_SwarmMissileLauncher</defName>
		<statBases>
			<Mass>40</Mass>
			<Bulk>22</Bulk>
			<SwayFactor>3.54</SwayFactor>
			<ShotSpread>0.10</ShotSpread>
			<SightsEfficiency>0.66</SightsEfficiency>
			<RangedWeapon_Cooldown>1.40</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.72</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_M73_HE</defaultProjectile>
			<burstShotCount>8</burstShotCount>
			<ticksBetweenBurstShots>10</ticksBetweenBurstShots>
			<warmupTime>3.5</warmupTime>
			<range>68</range>
			<soundCast>InfernoCannon_Fire</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<onlyManualCast>true</onlyManualCast>
			<stopBurstWithoutLos>false</stopBurstWithoutLos>
			<muzzleFlashScale>12</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>8</magazineSize>
			<reloadOneAtATime>true</reloadOneAtATime>
			<reloadTime>2</reloadTime>
			<ammoSet>AmmoSet_M73</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
			<aimedBurstShotCount>4</aimedBurstShotCount>
		</FireModes>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VWE_Gun_SwarmMissileLauncher"]/recipeMaker/researchPrerequisite</xpath>
		<value>
			<researchPrerequisite>CE_AdvancedLaunchers</researchPrerequisite>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="VWE_Gun_SwarmMissileLauncher"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.3,1.3</DrawSize>
				<DrawOffset>0.10,-0.20</DrawOffset>
			</li>
		</value>
	</Operation>

</Patch>