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

	<ThingCategoryDef>
		<defName>Ammo25x59mmGrenades</defName>
		<label>25x59mm Grenade</label>
		<parent>AmmoGrenades</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberGrenade</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_25x59mmGrenade</defName>
		<label>25x59mm Grenades</label>
		<ammoTypes>
			<Ammo_25x59mmGrenade_HE>Bullet_25x59mmGrenade_HE</Ammo_25x59mmGrenade_HE>
			<Ammo_25x59mmGrenade_HE_TFuzed>Bullet_25x59mmGrenade_HE_TFuzed</Ammo_25x59mmGrenade_HE_TFuzed>
			<Ammo_25x59mmGrenade_HEDP>Bullet_25x59mmGrenade_HEDP</Ammo_25x59mmGrenade_HEDP>
			<Ammo_25x59mmGrenade_EMP>Bullet_25x59mmGrenade_EMP</Ammo_25x59mmGrenade_EMP>
			<Ammo_25x59mmGrenade_Smoke>Bullet_25x59mmGrenade_Smoke</Ammo_25x59mmGrenade_Smoke>
		</ammoTypes>
		<similarTo>AmmoSet_LauncherGrenade</similarTo>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="25x59mmGrenadeBase" ParentName="MediumAmmoBase" Abstract="True">
		<description>Specialized high-velocity grenade developed anti-materiel purposes.</description>
		<statBases>
			<Mass>0.29</Mass>
			<Bulk>0.2</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo25x59mmGrenades</li>
		</thingCategories>
		<stackLimit>2000</stackLimit>
		<cookOffFlashScale>20</cookOffFlashScale>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="25x59mmGrenadeBase">
		<defName>Ammo_25x59mmGrenade_HE</defName>
		<label>25x59mm grenade (HE)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHE</ammoClass>
		<detonateProjectile>Bullet_25x59mmGrenade_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="25x59mmGrenadeBase">
		<defName>Ammo_25x59mmGrenade_HE_TFuzed</defName>
		<label>25x59mm grenade (HE Time-Fuzed)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/AIR</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHETF</ammoClass>
		<detonateProjectile>Bullet_25x59mmGrenade_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="25x59mmGrenadeBase">
		<defName>Ammo_25x59mmGrenade_HEDP</defName>
		<label>25x59mm grenade (HEDP)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHEDP</ammoClass>
		<detonateProjectile>Bullet_25x59mmGrenade_HEDP</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="25x59mmGrenadeBase">
		<defName>Ammo_25x59mmGrenade_EMP</defName>
		<label>25x59mm grenade (EMP)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/EMP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeEMP</ammoClass>
		<generateAllowChance>0.5</generateAllowChance>
		<detonateProjectile>Bullet_25x59mmGrenade_EMP</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="25x59mmGrenadeBase">
		<defName>Ammo_25x59mmGrenade_Smoke</defName>
		<label>25x59mm grenade (Smoke)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/SMK</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>Smoke</ammoClass>
		<generateAllowChance>0</generateAllowChance>
		<detonateProjectile>Bullet_25x59mmGrenade_Smoke</detonateProjectile>
	</ThingDef>

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

	<ThingDef Name="Base25x59mmGrenadeBullet" ParentName="BaseExplosiveBullet" Abstract="true">
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<graphicData>
			<texPath>Things/Projectile/LauncherShot</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<drawSize>(0.35,0.35)</drawSize>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>94</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base25x59mmGrenadeBullet">
		<defName>Bullet_25x59mmGrenade_HE</defName>
		<label>25x59mm grenade</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>19</damageAmountBase>
			<explosionRadius>1</explosionRadius>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>24</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base25x59mmGrenadeBullet">
		<defName>Bullet_25x59mmGrenade_HE_TFuzed</defName>
		<label>25x59mm grenade (HE Time-Fuzed)</label>
		<thingClass>CombatExtended.ProjectileCE_Bursting</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>19</damageAmountBase>
			<explosionRadius>1</explosionRadius>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			<aimHeightOffset>1.4</aimHeightOffset>
			<armingDelay>2</armingDelay>
			<airburstDistanceOffset>-3</airburstDistanceOffset>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>24</Fragment_Small>
				</fragments>
				<fragAngleRange>-60~-2</fragAngleRange>
				<fragXZAngleRange>-45~45</fragXZAngleRange>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base25x59mmGrenadeBullet">
		<defName>Bullet_25x59mmGrenade_HEDP</defName>
		<label>25x59mm grenade</label>
		<thingClass>CombatExtended.BulletCE</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>30</damageAmountBase>
			<armorPenetrationSharp>50</armorPenetrationSharp>
			<armorPenetrationBlunt>4.818</armorPenetrationBlunt>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>16</damageAmountBase>
				<explosiveDamageType>Bomb</explosiveDamageType>
				<explosiveRadius>0.5</explosiveRadius>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>9</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base25x59mmGrenadeBullet">
		<defName>Bullet_25x59mmGrenade_EMP</defName>
		<label>25x59mm grenade</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>EMP</damageDef>
			<damageAmountBase>19</damageAmountBase>
			<explosionRadius>1.5</explosionRadius>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base25x59mmGrenadeBullet">
		<defName>Bullet_25x59mmGrenade_Smoke</defName>
		<label>25x59mm 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_25x59mmGrenade_HE</defName>
		<label>make 25x59mm HE grenades x100</label>
		<description>Craft 100 25x59mm HE grenades.</description>
		<jobString>Making 25x59mm HE grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>58</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_25x59mmGrenade_HE>100</Ammo_25x59mmGrenade_HE>
		</products>
		<workAmount>9800</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_25x59mmGrenade_HE_TFuzed</defName>
		<label>make 25x59mm HE Time-Fuzed grenades x100</label>
		<description>Craft 100 25x59mm HE Time-Fuzed grenades.</description>
		<jobString>Making 25x59mm HE Time-Fuzed grenades.</jobString>
		<researchPrerequisite>CE_AdvancedLaunchers</researchPrerequisite>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>58</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>7</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>5</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_25x59mmGrenade_HE_TFuzed>100</Ammo_25x59mmGrenade_HE_TFuzed>
		</products>
		<workAmount>11600</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_25x59mmGrenade_HEDP</defName>
		<label>make 25x59mm HEDP grenades x100</label>
		<description>Craft 100 25x59mm HEDP grenades.</description>
		<jobString>Making 25x59mm HEDP grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>58</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_25x59mmGrenade_HEDP>100</Ammo_25x59mmGrenade_HEDP>
		</products>
		<workAmount>9000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_25x59mmGrenade_EMP</defName>
		<label>make 25x59mm EMP grenades x100</label>
		<description>Craft 100 25x59mm EMP grenades.</description>
		<jobString>Making 25x59mm EMP grenades.</jobString>
		<researchPrerequisites>
			<li>MicroelectronicsBasics</li>
			<li>CE_Launchers</li>
		</researchPrerequisites>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>58</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_25x59mmGrenade_EMP>100</Ammo_25x59mmGrenade_EMP>
		</products>
		<workAmount>11200</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_25x59mmGrenade_Smoke</defName>
		<label>make 25x59mm smoke grenades x100</label>
		<description>Craft 100 25x59mm smoke grenades.</description>
		<jobString>Making 25x59mm smoke grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>58</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</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>Prometheum</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_25x59mmGrenade_Smoke>100</Ammo_25x59mmGrenade_Smoke>
		</products>
		<workAmount>7800</workAmount>
	</RecipeDef>

</Defs>