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

	<ThingCategoryDef>
		<defName>Ammo545x39mmSoviet</defName>
		<label>5.45x39mm Soviet</label>
		<parent>AmmoRifles</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberRifle</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_545x39mmSoviet</defName>
		<label>5.45x39mm Soviet</label>
		<ammoTypes>
			<Ammo_545x39mmSoviet_FMJ>Bullet_545x39mmSoviet_FMJ</Ammo_545x39mmSoviet_FMJ>
			<Ammo_545x39mmSoviet_AP>Bullet_545x39mmSoviet_AP</Ammo_545x39mmSoviet_AP>
			<Ammo_545x39mmSoviet_HP>Bullet_545x39mmSoviet_HP</Ammo_545x39mmSoviet_HP>
			<Ammo_545x39mmSoviet_Incendiary>Bullet_545x39mmSoviet_Incendiary</Ammo_545x39mmSoviet_Incendiary>
			<Ammo_545x39mmSoviet_HE>Bullet_545x39mmSoviet_HE</Ammo_545x39mmSoviet_HE>
			<Ammo_545x39mmSoviet_Sabot>Bullet_545x39mmSoviet_Sabot</Ammo_545x39mmSoviet_Sabot>
		</ammoTypes>
		<similarTo>AmmoSet_RifleIntermediate</similarTo>
	</CombatExtended.AmmoSetDef>

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_545x39mmSoviet_SB</defName>
		<label>5.45x39mm Soviet</label>
		<ammoTypes>
			<Ammo_545x39mmSoviet_FMJ>Bullet_545x39mmSoviet_FMJ_SB</Ammo_545x39mmSoviet_FMJ>
			<Ammo_545x39mmSoviet_AP>Bullet_545x39mmSoviet_AP_SB</Ammo_545x39mmSoviet_AP>
			<Ammo_545x39mmSoviet_HP>Bullet_545x39mmSoviet_HP_SB</Ammo_545x39mmSoviet_HP>
			<Ammo_545x39mmSoviet_Incendiary>Bullet_545x39mmSoviet_Incendiary_SB</Ammo_545x39mmSoviet_Incendiary>
			<Ammo_545x39mmSoviet_HE>Bullet_545x39mmSoviet_HE_SB</Ammo_545x39mmSoviet_HE>
			<Ammo_545x39mmSoviet_Sabot>Bullet_545x39mmSoviet_Sabot_SB</Ammo_545x39mmSoviet_Sabot>
		</ammoTypes>
		<similarTo>AmmoSet_RifleIntermediate</similarTo>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="545x39mmSovietBase" ParentName="SmallAmmoBase" Abstract="True">
		<description>Small, high-velocity rifle bullet used in a variety of assault rifles.</description>
		<statBases>
			<Mass>0.011</Mass>
			<Bulk>0.02</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo545x39mmSoviet</li>
		</thingCategories>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="545x39mmSovietBase">
		<defName>Ammo_545x39mmSoviet_FMJ</defName>
		<label>5.45x39mm Soviet (FMJ)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Soviet/FMJ</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>FullMetalJacket</ammoClass>
		<cookOffProjectile>Bullet_545x39mmSoviet_FMJ</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="545x39mmSovietBase">
		<defName>Ammo_545x39mmSoviet_AP</defName>
		<label>5.45x39mm Soviet (AP)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Soviet/AP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>ArmorPiercing</ammoClass>
		<cookOffProjectile>Bullet_545x39mmSoviet_AP</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="545x39mmSovietBase">
		<defName>Ammo_545x39mmSoviet_HP</defName>
		<label>5.45x39mm Soviet (HP)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Soviet/HP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>HollowPoint</ammoClass>
		<cookOffProjectile>Bullet_545x39mmSoviet_HP</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="545x39mmSovietBase">
		<defName>Ammo_545x39mmSoviet_Incendiary</defName>
		<label>5.45x39mm Soviet (AP-I)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Soviet/Incendiary</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>IncendiaryAP</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_545x39mmSoviet_Incendiary</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="545x39mmSovietBase">
		<defName>Ammo_545x39mmSoviet_HE</defName>
		<label>5.45x39mm Soviet (AP-HE)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Soviet/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>ExplosiveAP</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_545x39mmSoviet_HE</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="545x39mmSovietBase">
		<defName>Ammo_545x39mmSoviet_Sabot</defName>
		<label>5.45x39mm Soviet (Sabot)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Soviet/Sabot</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>0.01</Mass>
		</statBases>
		<ammoClass>Sabot</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_545x39mmSoviet_Sabot</cookOffProjectile>
	</ThingDef>

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

	<ThingDef Name="Base545x39mmSovietBullet" ParentName="BaseBulletCE" Abstract="True">
		<graphicData>
			<texPath>Things/Projectile/Bullet_Small</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<speed>162</speed>
			<dropsCasings>true</dropsCasings>
			<casingMoteDefname>Fleck_RifleAmmoCasings_Steel</casingMoteDefname>
			<casingFilthDefname>Filth_RifleAmmoCasings_Steel</casingFilthDefname>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_FMJ</defName>
		<label>5.45mm Soviet bullet (FMJ)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>13</damageAmountBase>
			<armorPenetrationSharp>5.5</armorPenetrationSharp>
			<armorPenetrationBlunt>28.04</armorPenetrationBlunt>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_AP</defName>
		<label>5.45mm Soviet bullet (AP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>8</damageAmountBase>
			<armorPenetrationSharp>11</armorPenetrationSharp>
			<armorPenetrationBlunt>28.04</armorPenetrationBlunt>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_HP</defName>
		<label>5.45mm Soviet bullet (HP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>16</damageAmountBase>
			<armorPenetrationSharp>3</armorPenetrationSharp>
			<armorPenetrationBlunt>28.04</armorPenetrationBlunt>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_Incendiary</defName>
		<label>5.45mm Soviet bullet (AP-I)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>8</damageAmountBase>
			<armorPenetrationSharp>11</armorPenetrationSharp>
			<armorPenetrationBlunt>28.04</armorPenetrationBlunt>
			<secondaryDamage>
				<li>
					<def>Flame_Secondary</def>
					<amount>3</amount>
				</li>
			</secondaryDamage>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_HE</defName>
		<label>5.45mm Soviet bullet (AP-HE)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>13</damageAmountBase>
			<armorPenetrationSharp>5.5</armorPenetrationSharp>
			<armorPenetrationBlunt>28.04</armorPenetrationBlunt>
			<secondaryDamage>
				<li>
					<def>Bomb_Secondary</def>
					<amount>4</amount>
				</li>
			</secondaryDamage>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_Sabot</defName>
		<label>5.45mm Soviet bullet (Sabot)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>7</damageAmountBase>
			<armorPenetrationSharp>19.25</armorPenetrationSharp>
			<armorPenetrationBlunt>36.6</armorPenetrationBlunt>
			<speed>219</speed>
		</projectile>
	</ThingDef>

	<!-- Short barrel -->

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_FMJ_SB</defName>
		<label>5.45mm Soviet bullet (FMJ)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>11</damageAmountBase>
			<armorPenetrationSharp>5</armorPenetrationSharp>
			<armorPenetrationBlunt>19.56</armorPenetrationBlunt>
			<speed>142</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_AP_SB</defName>
		<label>5.45mm Soviet bullet (AP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>7</damageAmountBase>
			<armorPenetrationSharp>10</armorPenetrationSharp>
			<armorPenetrationBlunt>19.56</armorPenetrationBlunt>
			<speed>142</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_HP_SB</defName>
		<label>5.45mm Soviet bullet (HP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>14</damageAmountBase>
			<armorPenetrationSharp>3</armorPenetrationSharp>
			<armorPenetrationBlunt>19.56</armorPenetrationBlunt>
			<speed>142</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_Incendiary_SB</defName>
		<label>5.45mm Soviet bullet (AP-I)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>7</damageAmountBase>
			<armorPenetrationSharp>10</armorPenetrationSharp>
			<armorPenetrationBlunt>19.56</armorPenetrationBlunt>
			<secondaryDamage>
				<li>
					<def>Flame_Secondary</def>
					<amount>3</amount>
				</li>
			</secondaryDamage>
			<speed>142</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_HE_SB</defName>
		<label>5.45mm Soviet bullet (AP-HE)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>11</damageAmountBase>
			<armorPenetrationSharp>5</armorPenetrationSharp>
			<armorPenetrationBlunt>19.56</armorPenetrationBlunt>
			<secondaryDamage>
				<li>
					<def>Bomb_Secondary</def>
					<amount>4</amount>
				</li>
			</secondaryDamage>
			<speed>142</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base545x39mmSovietBullet">
		<defName>Bullet_545x39mmSoviet_Sabot_SB</defName>
		<label>5.45mm Soviet bullet (Sabot)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>6</damageAmountBase>
			<armorPenetrationSharp>17.5</armorPenetrationSharp>
			<armorPenetrationBlunt>25.5</armorPenetrationBlunt>
			<speed>192</speed>
		</projectile>
	</ThingDef>

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

	<RecipeDef ParentName="AmmoRecipeBase">
		<defName>MakeAmmo_545x39mmSoviet_FMJ</defName>
		<label>make 5.45x39mm Soviet (FMJ) cartridge x500</label>
		<description>Craft 500 5.45x39mm Soviet (FMJ) cartridges.</description>
		<jobString>Making 5.45x39mm Soviet (FMJ) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>12</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_545x39mmSoviet_FMJ>500</Ammo_545x39mmSoviet_FMJ>
		</products>
		<workAmount>1200</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AmmoRecipeBase">
		<defName>MakeAmmo_545x39mmSoviet_AP</defName>
		<label>make 5.45x39mm Soviet (AP) cartridge x500</label>
		<description>Craft 500 5.45x39mm Soviet (AP) cartridges.</description>
		<jobString>Making 5.45x39mm Soviet (AP) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>12</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_545x39mmSoviet_AP>500</Ammo_545x39mmSoviet_AP>
		</products>
		<workAmount>1440</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AmmoRecipeBase">
		<defName>MakeAmmo_545x39mmSoviet_HP</defName>
		<label>make 5.45x39mm Soviet (HP) cartridge x500</label>
		<description>Craft 500 5.45x39mm Soviet (HP) cartridges.</description>
		<jobString>Making 5.45x39mm Soviet (HP) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>12</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_545x39mmSoviet_HP>500</Ammo_545x39mmSoviet_HP>
		</products>
		<workAmount>1200</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_545x39mmSoviet_Incendiary</defName>
		<label>make 5.45x39mm Soviet (AP-I) cartridge x500</label>
		<description>Craft 500 5.45x39mm Soviet (AP-I) cartridges.</description>
		<jobString>Making 5.45x39mm Soviet (AP-I) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>12</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</li>
					</thingDefs>
				</filter>
				<count>1</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Prometheum</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_545x39mmSoviet_Incendiary>500</Ammo_545x39mmSoviet_Incendiary>
		</products>
		<workAmount>1600</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_545x39mmSoviet_HE</defName>
		<label>make 5.45x39mm Soviet (AP-HE) cartridge x500</label>
		<description>Craft 500 5.45x39mm Soviet (AP-HE) cartridges.</description>
		<jobString>Making 5.45x39mm Soviet (AP-HE) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>12</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>4</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_545x39mmSoviet_HE>500</Ammo_545x39mmSoviet_HE>
		</products>
		<workAmount>2800</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_545x39mmSoviet_Sabot</defName>
		<label>make 5.45x39mm Soviet (Sabot) cartridge x500</label>
		<description>Craft 500 5.45x39mm Soviet (Sabot) cartridges.</description>
		<jobString>Making 5.45x39mm Soviet (Sabot) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>8</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Uranium</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Chemfuel</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Uranium</li>
				<li>Chemfuel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_545x39mmSoviet_Sabot>500</Ammo_545x39mmSoviet_Sabot>
		</products>
		<workAmount>2000</workAmount>
	</RecipeDef>

</Defs>