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

	<ThingCategoryDef>
		<defName>Ammo762x539mmR</defName>
		<label>76.2x539mmR Cannon shell</label>
		<parent>AmmoShells</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberAutocannonLarge</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_762x539mmR</defName>
		<label>76.2x539mmR Cannon shells</label>
		<ammoTypes>
			<Ammo_762x539mmR_AP>Bullet_762x539mmR_AP</Ammo_762x539mmR_AP>
			<Ammo_762x539mmR_HE>Bullet_762x539mmR_HE</Ammo_762x539mmR_HE>
			<Ammo_762x539mmR_APCR>Bullet_762x539mmR_APCR</Ammo_762x539mmR_APCR>
		</ammoTypes>
		<similarTo>AmmoSet_LightCannon</similarTo>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="762x539mmRShellBase" ParentName="AmmoBase" Abstract="True">
		<description>Medium-velocity cannon shell fired by tank destroyer guns.</description>
		<thingCategories>
			<li>Ammo762x539mmR</li>
		</thingCategories>
		<stackLimit>25</stackLimit>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<statBases>
			<MaxHitPoints>150</MaxHitPoints>
			<Mass>10.8</Mass>
			<Bulk>10.99</Bulk>
		</statBases>
		<cookOffFlashScale>20</cookOffFlashScale>
		<cookOffSound>MortarBomb_Explode</cookOffSound>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="762x539mmRShellBase">
		<defName>Ammo_762x539mmR_AP</defName>
		<label>76.2x539mmR cannon shell (AP)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/APHE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>ArmorPiercing</ammoClass>
		<detonateProjectile>Bullet_762x539mmR_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="762x539mmRShellBase">
		<defName>Ammo_762x539mmR_HE</defName>
		<label>76.2x539mmR cannon shell (HE)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHE</ammoClass>
		<detonateProjectile>Bullet_762x539mmR_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="762x539mmRShellBase">
		<defName>Ammo_762x539mmR_APCR</defName>
		<label>76.2x539mmR cannon shell (APCR)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/APCR</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>7.885</Mass>
		</statBases>
		<ammoClass>CompositeRigidAP</ammoClass>
		<detonateProjectile>Bullet_762x539mmR_APCR</detonateProjectile>
	</ThingDef>

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

	<ThingDef Name="Base762x539mmRBullet" ParentName="BaseExplosiveBullet" Abstract="true">
		<graphicData>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>154</speed>
			<flyOverhead>false</flyOverhead>
			<dropsCasings>true</dropsCasings>
			<casingMoteDefname>Fleck_BigShell</casingMoteDefname>
			<casingFilthDefname>Filth_CannonAmmoCasings</casingFilthDefname>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base762x539mmRBullet">
		<defName>Bullet_762x539mmR_AP</defName>
		<label>76.2x539mmR cannon shell (AP)</label>
		<graphicData>
			<texPath>Things/Projectile/Cannon/AP</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>259</damageAmountBase>
			<soundExplode>MortarBomb_Explode</soundExplode>
			<armorPenetrationSharp>132</armorPenetrationSharp>
			<armorPenetrationBlunt>45723.2</armorPenetrationBlunt>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base762x539mmRBullet">
		<defName>Bullet_762x539mmR_HE</defName>
		<label>76.2x539mmR cannon shell (HE)</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<graphicData>
			<texPath>Things/Projectile/Cannon/HEFS</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>75</damageAmountBase>
			<explosionRadius>2</explosionRadius>
			<soundExplode>MortarBomb_Explode</soundExplode>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>24</Fragment_Large>
					<Fragment_Small>8</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base762x539mmRBullet">
		<defName>Bullet_762x539mmR_APCR</defName>
		<label>75x350mmR cannon shell (APCR)</label>
		<graphicData>
			<texPath>Things/Projectile/Cannon/APCR</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>247</damageAmountBase>
			<armorPenetrationSharp>231</armorPenetrationSharp>
			<armorPenetrationBlunt>58776.16</armorPenetrationBlunt>
			<speed>208</speed>
		</projectile>
	</ThingDef>

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

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_762x539mmR_AP</defName>
		<label>make 76.2x539mmR (AP) cannon shells x5</label>
		<description>Craft 5 76.2x539mmR (AP) cannon shells.</description>
		<jobString>Making 76.2x539mmR (AP) cannon shells.</jobString>
		<workAmount>12960</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>108</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_762x539mmR_AP>5</Ammo_762x539mmR_AP>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_762x539mmR_HE</defName>
		<label>make 76.2x539mmR (HE) cannon shells x5</label>
		<description>Craft 5 76.2x539mmR (HE) cannon shells.</description>
		<jobString>Making 76.2x539mmR (HE) cannon shells.</jobString>
		<workAmount>13200</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>108</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</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>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_762x539mmR_HE>5</Ammo_762x539mmR_HE>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_762x539mmR_APCR</defName>
		<label>make 76.2x539mmR (APCR) cannon shells x5</label>
		<description>Craft 5 76.2x539mmR (APCR) cannon shells.</description>
		<jobString>Making 76.2x539mmR (APCR) cannon shells.</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>CE_TurretHeavyWeapons</li>
			<li>CE_AdvancedAmmo</li>
		</researchPrerequisites>
		<workAmount>14000</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>80</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Uranium</li>
					</thingDefs>
				</filter>
				<count>20</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Uranium</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_762x539mmR_APCR>5</Ammo_762x539mmR_APCR>
		</products>
	</RecipeDef>

</Defs>