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

	<ThingCategoryDef>
		<defName>AmmoPlasmaCellPistol</defName>
		<label>Plasma Pistol Power Cell</label>
		<parent>AmmoAdvanced</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberPlasmaSmall</iconPath>
	</ThingCategoryDef>

	<!-- ==================== AmmoSet ========================== -->

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_PlasmaCellPistol</defName>
		<label>Plasma Pistol Power Cell</label>
		<ammoTypes>
			<Ammo_PlasmaCellPistol>Bullet_PlasmaCellPistol</Ammo_PlasmaCellPistol>
		</ammoTypes>
	</CombatExtended.AmmoSetDef>

	<!-- ==================== Ammo ========================== -->

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="SpacerSmallAmmoBase">
		<defName>Ammo_PlasmaCellPistol</defName>
		<label>plasma pistol power cell</label>
		<description>Plasma containment power cell optimized for pistols</description>
		<statBases>
			<Mass>0.014</Mass>
			<Bulk>0.01</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_FabricationBench</li>
			<!-- Plasma ammo can't be handloaded, and the containment cell must be precision-machined anyway -->
		</tradeTags>
		<thingCategories>
			<li>AmmoPlasmaCellPistol</li>
		</thingCategories>
		<graphicData>
			<texPath>Things/Ammo/PlasmaCell/Pistol</texPath>
			<graphicClass>CombatExtended.Graphic_StackCountRanged</graphicClass>
		</graphicData>
		<ammoClass>Plasma</ammoClass>
		<comps>
			<!-- Arbitarily defined cookoff explosive stats; represents a plasma containment system failing -->
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>15</damageAmountBase>
				<explosiveDamageType>Bomb</explosiveDamageType>
				<explosiveRadius>0.25</explosiveRadius>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>2</Fragment_Large>
					<Fragment_Small>4</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<!-- ================== Projectiles ================== -->

	<ThingDef ParentName="BaseExplosiveBullet">
		<defName>Bullet_PlasmaCellPistol</defName>
		<label>Plasma Bolt</label>
		<graphicData>
			<texPath>Things/Projectile/Charged/ChargeShot</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>137</speed>
			<damageDef>Bomb</damageDef>
			<damageAmountBase>2</damageAmountBase>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			<secondaryDamage>
				<li>
					<def>Flame_Secondary</def>
					<amount>9</amount>
				</li>
			</secondaryDamage>
			<screenShakeFactor>0</screenShakeFactor>
		</projectile>
	</ThingDef>

	<!-- ==================== Recipes ========================== -->

	<RecipeDef ParentName="ChargeAmmoRecipeBase">
		<defName>MakeAmmo_PlasmaCellPistol</defName>
		<label>make Plasma Pistol Power Cells</label>
		<description>Craft 500 shots' worth of Plasma Pistol Power Cells.</description>
		<jobString>Making Plasma Pistol Power Cells.</jobString>
		<workAmount>3400</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>14</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Plasteel</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Plasteel</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_PlasmaCellPistol>500</Ammo_PlasmaCellPistol>
		</products>
	</RecipeDef>

</Defs>