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

	<ThingCategoryDef>
		<defName>Ammo35x32mmSRGrenades</defName>
		<label>35x32mmSR Grenade</label>
		<parent>AmmoGrenades</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberGrenade</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_35x32mmSRGrenade</defName>
		<label>35x32mmSR Grenades</label>
		<ammoTypes>
			<Ammo_35x32mmSRGrenade_HE>Bullet_35x32mmSRGrenade_HE</Ammo_35x32mmSRGrenade_HE>
			<Ammo_35x32mmSRGrenade_HEDP>Bullet_35x32mmSRGrenade_HEDP</Ammo_35x32mmSRGrenade_HEDP>
			<Ammo_35x32mmSRGrenade_EMP>Bullet_35x32mmSRGrenade_EMP</Ammo_35x32mmSRGrenade_EMP>
			<Ammo_35x32mmSRGrenade_Smoke>Bullet_35x32mmSRGrenade_Smoke</Ammo_35x32mmSRGrenade_Smoke>
		</ammoTypes>
		<similarTo>AmmoSet_LauncherGrenade</similarTo>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="35x32mmSRGrenadeBase" ParentName="MediumAmmoBase" Abstract="True">
		<description>High velocity grenade fired from handheld grenade launchers.</description>
		<statBases>
			<Mass>0.25</Mass>
			<Bulk>0.35</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo35x32mmSRGrenades</li>
		</thingCategories>
		<stackLimit>750</stackLimit>
		<cookOffFlashScale>20</cookOffFlashScale>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="35x32mmSRGrenadeBase">
		<defName>Ammo_35x32mmSRGrenade_HE</defName>
		<label>35x32mmSR grenade (HE)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHE</ammoClass>
		<detonateProjectile>Bullet_35x32mmSRGrenade_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="35x32mmSRGrenadeBase">
		<defName>Ammo_35x32mmSRGrenade_HEDP</defName>
		<label>35x32mmSR grenade (HEDP)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/DP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHEDP</ammoClass>
		<detonateProjectile>Bullet_35x32mmSRGrenade_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="35x32mmSRGrenadeBase">
		<defName>Ammo_35x32mmSRGrenade_EMP</defName>
		<label>35x32mmSR grenade (EMP)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/EMP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeEMP</ammoClass>
		<generateAllowChance>0.5</generateAllowChance>
		<detonateProjectile>Bullet_35x32mmSRGrenade_EMP</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="35x32mmSRGrenadeBase">
		<defName>Ammo_35x32mmSRGrenade_Smoke</defName>
		<label>35x32mmSR grenade (Smoke)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/SMK</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>Smoke</ammoClass>
		<generateAllowChance>0</generateAllowChance>
		<detonateProjectile>Bullet_35x32mmSRGrenade_Smoke</detonateProjectile>
	</ThingDef>

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

	<ThingDef Name="Base35x32mmSRGrenadeBullet" ParentName="BaseExplosiveBullet" Abstract="true">
		<graphicData>
			<texPath>Things/Projectile/LauncherShot</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<drawSize>(0.45,0.45)</drawSize>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>52</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base35x32mmSRGrenadeBullet">
		<defName>Bullet_35x32mmSRGrenade_HE</defName>
		<label>35x32mmSR grenade (HE)</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>20</damageAmountBase>
			<explosionRadius>1</explosionRadius>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>20</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base35x32mmSRGrenadeBullet">
		<defName>Bullet_35x32mmSRGrenade_HEDP</defName>
		<thingClass>CombatExtended.BulletCE</thingClass>
		<label>35x32mmSR grenade (HEDP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>31</damageAmountBase>
			<armorPenetrationSharp>55</armorPenetrationSharp>
			<armorPenetrationBlunt>4.961</armorPenetrationBlunt>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>17</damageAmountBase>
				<explosiveDamageType>Bomb</explosiveDamageType>
				<explosiveRadius>0.5</explosiveRadius>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>8</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base35x32mmSRGrenadeBullet">
		<defName>Bullet_35x32mmSRGrenade_EMP</defName>
		<label>35x32mmSR grenade (EMP)</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>EMP</damageDef>
			<damageAmountBase>20</damageAmountBase>
			<explosionRadius>1.5</explosionRadius>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base35x32mmSRGrenadeBullet">
		<defName>Bullet_35x32mmSRGrenade_Smoke</defName>
		<label>35x32mmSR grenade (Smoke)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Smoke</damageDef>
			<explosionRadius>2</explosionRadius>
			<suppressionFactor>0.0</suppressionFactor>
			<dangerFactor>0.0</dangerFactor>
			<postExplosionGasType>BlindSmoke</postExplosionGasType>
			<preExplosionSpawnChance>1</preExplosionSpawnChance>
		</projectile>
	</ThingDef>

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

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_35x32mmSRGrenade_HE</defName>
		<label>make 35x32mmSR HE grenades x100</label>
		<description>Craft 100 35x32mmSR HE grenades.</description>
		<jobString>Making 35x32mmSR HE grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>50</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>7</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_35x32mmSRGrenade_HE>100</Ammo_35x32mmSRGrenade_HE>
		</products>
		<workAmount>9000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_35x32mmSRGrenade_HEDP</defName>
		<label>make 35x32mmSR HEDP grenades x100</label>
		<description>Craft 100 35x32mmSR HEDP grenades.</description>
		<jobString>Making 35x32mmSR HEDP grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>50</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>5</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_35x32mmSRGrenade_HEDP>100</Ammo_35x32mmSRGrenade_HEDP>
		</products>
		<workAmount>8200</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_35x32mmSRGrenade_EMP</defName>
		<label>make 35x32mmSR EMP grenades x100</label>
		<description>Craft 100 35x32mmSR EMP grenades.</description>
		<jobString>Making 35x32mmSR EMP grenades.</jobString>
		<researchPrerequisites>
			<li>MicroelectronicsBasics</li>
			<li>CE_Launchers</li>
		</researchPrerequisites>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>50</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>9</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_35x32mmSRGrenade_EMP>100</Ammo_35x32mmSRGrenade_EMP>
		</products>
		<workAmount>10400</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_35x32mmSRGrenade_Smoke</defName>
		<label>make 35x32mmSR smoke grenades x100</label>
		<description>Craft 100 35x32mmSR smoke grenades.</description>
		<jobString>Making 35x32mmSR smoke grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>50</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</li>
					</thingDefs>
				</filter>
				<count>3</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Prometheum</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_35x32mmSRGrenade_Smoke>100</Ammo_35x32mmSRGrenade_Smoke>
		</products>
		<workAmount>7400</workAmount>
	</RecipeDef>

</Defs>