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

	<ThingCategoryDef>
		<defName>Ammo20mmFliegerfaust</defName>
		<label>20mm Fliegerfaust</label>
		<parent>AmmoRockets</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberRocket</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_20mmFliegerfaust</defName>
		<label>20mm Fliegerfaust</label>
		<ammoTypes>
			<Ammo_20mmFliegerfaust_HE>Bullet_20mmFliegerfaust_HE</Ammo_20mmFliegerfaust_HE>
		</ammoTypes>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="20mmFliegerfaustBase" ParentName="MediumAmmoBase" Abstract="True">
		<description>Outdated 20mm rocket designed to be fired in volleys at airplanes.</description>
		<statBases>
			<MaxHitPoints>150</MaxHitPoints>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo20mmFliegerfaust</li>
		</thingCategories>
		<stackLimit>4000</stackLimit>
		<cookOffFlashScale>25</cookOffFlashScale>
		<cookOffSound>MortarBomb_Explode</cookOffSound>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="20mmFliegerfaustBase">
		<defName>Ammo_20mmFliegerfaust_HE</defName>
		<label>20mm Fliegerfaust (HE)</label>
		<graphicData>
			<texPath>Things/Ammo/RPG/Frag</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>0.12</Mass>
			<Bulk>0.16</Bulk>
		</statBases>
		<ammoClass>GrenadeHE</ammoClass>
		<detonateProjectile>Bullet_20mmFliegerfaust_HE</detonateProjectile>
	</ThingDef>

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

	<ThingDef Name="Base20mmFliegerfaust" ParentName="BaseExplosiveBullet" Abstract="true">
		<graphicData>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>81</speed>
			<soundAmbient>RocketPropelledLoop_Small</soundAmbient>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ProjectileFleck">
				<FleckDatas>
					<li>
						<fleck>Fleck_CERocketFlame</fleck>
						<emissionsPerTick>10</emissionsPerTick>
						<flecksPerEmission>4</flecksPerEmission>
						<scale>0.7</scale>
						<cutoffTickRange>25~30</cutoffTickRange>
						<originOffset>0.4</originOffset>
					</li>
					<li>
						<fleck>Fleck_CERocketSmokeTrail</fleck>
						<emissionsPerTick>2</emissionsPerTick>
						<rotation>0~360</rotation>
						<flecksPerEmission>1</flecksPerEmission>
					</li>
					<li>
						<fleck>Fleck_CERocketSmoke</fleck>
						<emissionsPerTick>4</emissionsPerTick>
						<rotation>0~360</rotation>
						<flecksPerEmission>2</flecksPerEmission>
						<scale>0.5</scale>
						<cutoffTickRange>25~60</cutoffTickRange>
					</li>
				</FleckDatas>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base20mmFliegerfaust">
		<defName>Bullet_20mmFliegerfaust_HE</defName>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<label>20mm Fliegerfaust rocket (HE)</label>
		<graphicData>
			<texPath>Things/Projectile/RPG/Frag</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>16</damageAmountBase>
			<explosionRadius>0.5</explosionRadius>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>1</Fragment_Large>
					<Fragment_Small>1</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

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

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_20mmFliegerfaust_HE</defName>
		<label>make 20mmFliegerfaust (HE) rockets x10</label>
		<description>Craft 10 20mmFliegerfaust (HE) rockets.</description>
		<jobString>Making 20mmFliegerfaust (HE) rockets.</jobString>
		<workAmount>3200</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>4</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>1</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>4</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_20mmFliegerfaust_HE>10</Ammo_20mmFliegerfaust_HE>
		</products>
	</RecipeDef>

</Defs>