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

	<!-- ========== Base Drones ========== -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[@Name="BaseDrone"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>QuadrupedLow</bodyShape>
			</li>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="BaseDrone"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>3</ArmorRating_Blunt>
			<SmokeSensitivity>0</SmokeSensitivity>
			<NightVisionEfficiency>0.60</NightVisionEfficiency>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="BaseDrone"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>2</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="BaseDrone"]/statBases/ArmorRating_Heat</xpath>
		<value>
			<ArmorRating_Heat>0.00</ArmorRating_Heat>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="BaseDrone"]/statBases</xpath>
		<value>
			<CarryWeight>50</CarryWeight>
			<CarryBulk>20</CarryBulk>
			<MeleeDodgeChance>0.1</MeleeDodgeChance>
			<MeleeCritChance>0.04</MeleeCritChance>
			<MeleeParryChance>0.04</MeleeParryChance>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="BaseDrone"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>shell spike</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>8</power>
					<cooldownTime>2.6</cooldownTime>
					<linkedBodyPartsGroup>SpikedShellAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>6</armorPenetrationSharp>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Hunter Drone ========== -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Drone_Hunter"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>36</Fragment_Small>
				</fragments>
			</li>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>262</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
		</value>
	</Operation>

	<!-- ========== Wasp Drone ========== -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Drone_Wasp"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					 <label>stinger</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2.6</cooldownTime>
					<linkedBodyPartsGroup>SpikedShellAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>16</armorPenetrationSharp>
					<armorPenetrationBlunt>8</armorPenetrationBlunt>
					<extraMeleeDamages>
						<li>
							<def>Stun</def>
							<amount>3</amount>
						</li>
					</extraMeleeDamages>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="Drone_Wasp"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="Drone_Wasp"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Drone_Wasp"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>150</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
		</value>
	</Operation>
	
	<!-- ========== Sentry Drone ========== -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Drone_Sentry"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Drone_Sentry"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>3</ArmorRating_Blunt>
			<SmokeSensitivity>0</SmokeSensitivity>
			<NightVisionEfficiency>0.80</NightVisionEfficiency>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Drone_Sentry"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>2</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Drone_Sentry"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_Inventory" />
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="Drone_Sentry"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="Drone_Sentry"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Drone_Sentry"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>575</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
		</value>
	</Operation>

</Patch>