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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="OuterRimBase_DroidWeapon"]/tools</xpath>
		<value>
			<tools>
				<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="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>OuterRim_DroidWeapon_WristBlaster</defName>
		<statBases>
			<SightsEfficiency>0.95</SightsEfficiency>
			<ShotSpread>0.16</ShotSpread>
			<SwayFactor>1.2</SwayFactor>
			<Bulk>1.00</Bulk>
			<Mass>1.00</Mass>
			<RangedWeapon_Cooldown>0.5</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.2</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_BlasterRifle_Red</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>55</range>
			<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
			<burstShotCount>3</burstShotCount>
			<soundCast>OuterRim_Shot_BlasterBolt</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<ammoConsumedPerShotCount>2</ammoConsumedPerShotCount>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<AmmoUser>
			<magazineSize>200</magazineSize>
			<reloadTime>3</reloadTime>
			<ammoSet>AmmoSet_PlasmaGasCartridgeRed_Rifle</ammoSet>
		</AmmoUser>
	</Operation>

	<!-- Ion variant isn't needed, since we can change ammo types. -->
	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="OuterRim_DroidWeapon_WristBlasterIon"]</xpath>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="OuterRim_GNKDroid"]/modExtensions/li[@Class="Asimov.DefModExt_AutomatonApparel"]/apparelWhitelist/li[.="OuterRim_DroidWeapon_WristBlasterIon"]</xpath>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>OuterRim_DroidWeapon_TwinWristBlaster</defName>
		<statBases>
			<SightsEfficiency>0.95</SightsEfficiency>
			<ShotSpread>0.16</ShotSpread>
			<SwayFactor>0.75</SwayFactor>
			<Bulk>1.00</Bulk>
			<Mass>1.00</Mass>
			<RangedWeapon_Cooldown>0.5</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.2</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_BlasterBolt_DualShot</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>44</range>
			<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
			<burstShotCount>4</burstShotCount>
			<soundCast>OuterRim_Shot_BlasterBolt</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<ammoConsumedPerShotCount>4</ammoConsumedPerShotCount>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
			<aimedBurstShotCount>2</aimedBurstShotCount>
		</FireModes>
		<AmmoUser>
			<magazineSize>200</magazineSize>
			<reloadTime>3</reloadTime>
			<ammoSet>AmmoSet_PlasmaGasCartridge_DualShot</ammoSet>
		</AmmoUser>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>OuterRim_DroidWeapon_BlasterCannon</defName>
		<statBases>
			<SightsEfficiency>2.5</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>2.25</SwayFactor>
			<Bulk>1.00</Bulk>
			<Mass>1.00</Mass>
			<RangedWeapon_Cooldown>0.5</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.5</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_BlasterSniper_Red</defaultProjectile>
			<warmupTime>2.0</warmupTime>
			<range>75</range>
			<soundCast>OuterRim_Shot_DLT19DBlasterBolt</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
			<ammoConsumedPerShotCount>3</ammoConsumedPerShotCount>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<AmmoUser>
			<magazineSize>120</magazineSize>
			<reloadTime>3</reloadTime>
			<ammoSet>AmmoSet_PlasmaGasCartridgeRed_Sniper</ammoSet>
		</AmmoUser>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>OuterRim_DroidWeapon_WristRocket</defName>
		<statBases>
			<Mass>1.0</Mass>
			<RangedWeapon_Cooldown>0.39</RangedWeapon_Cooldown>
			<SightsEfficiency>1.10</SightsEfficiency>
			<ShotSpread>0.08</ShotSpread>
			<SwayFactor>1.20</SwayFactor>
			<Bulk>1.00</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.45</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_OR_WristRocket</defaultProjectile>
			<warmupTime>3.0</warmupTime>
			<range>75</range>
			<soundCast>OuterRim_Shot_RocketLauncher</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<reloadTime>3</reloadTime>
			<ammoSet>AmmoSet_OuterRimMiniRockets</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

</Patch>