<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!--
		RGD5
		RGN
		RGO
		F-1
		RKG-3 AT
	-->

	<!-- ======== Setting Grenade attributes ======== -->
	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="Weapon_RGD5Grenade"
			or defName="Weapon_RGNGrenade"
			or defName="Weapon_RGOGrenade"
			or defName="Weapon_F1Grenade"
			or defName="Weapon_RKGATGrenade"] </xpath>
		<attribute>ParentName</attribute>
		<value>BaseWeapon</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Weapon_RGD5Grenade"
			or defName="Weapon_RGNGrenade"
			or defName="Weapon_RGOGrenade"
			or defName="Weapon_F1Grenade"
			or defName="Weapon_RKGATGrenade"] </xpath>
		<value>
			<thingClass>CombatExtended.AmmoThing</thingClass>
			<stackLimit>75</stackLimit>
			<resourceReadoutPriority>First</resourceReadoutPriority>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Weapon_RGD5Grenade"]/comps</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_ExplosiveCE">
					<damageAmountBase>56</damageAmountBase>
					<explosiveDamageType>Bomb</explosiveDamageType>
					<explosiveRadius>1.5</explosiveRadius>
				</li>
			</comps>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Weapon_RGNGrenade"]/comps</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_ExplosiveCE">
					<damageAmountBase>56</damageAmountBase>
					<explosiveDamageType>Bomb</explosiveDamageType>
					<explosiveRadius>1.5</explosiveRadius>
				</li>
			</comps>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Weapon_RGOGrenade"]/comps</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_ExplosiveCE">
					<damageAmountBase>56</damageAmountBase>
					<explosiveDamageType>Bomb</explosiveDamageType>
					<explosiveRadius>1.5</explosiveRadius>
				</li>
			</comps>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Weapon_F1Grenade"]/comps</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_ExplosiveCE">
					<damageAmountBase>56</damageAmountBase>
					<explosiveDamageType>Bomb</explosiveDamageType>
					<explosiveRadius>1.5</explosiveRadius>
				</li>
			</comps>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Weapon_RKGATGrenade"]/comps</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_ExplosiveCE">
					<damageAmountBase>56</damageAmountBase>
					<explosiveDamageType>Bomb</explosiveDamageType>
					<explosiveRadius>1.5</explosiveRadius>
				</li>
			</comps>
		</value>
	</Operation>

	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="Weapon_F1Grenade"]</xpath>
		<attribute>Class</attribute>
		<value>CombatExtended.AmmoDef</value>
	</Operation>

	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="Weapon_RKGATGrenade"]</xpath>
		<attribute>Class</attribute>
		<value>CombatExtended.AmmoDef</value>
	</Operation>

	<!-- ======== Throwing data ======== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Weapon_RGD5Grenade</defName>
		<statBases>
			<Mass>0.31</Mass>
			<Bulk>1.5</Bulk>
			<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
		</statBases>
		<Properties>
			<label>throw grenade</label>
			<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<range>11</range>
			<minRange>1.5</minRange>
			<warmupTime>0.6</warmupTime>
			<noiseRadius>4</noiseRadius>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
			<soundCast>ThrowGrenade</soundCast>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<defaultProjectile>RD_Proj_RGD5Grenade</defaultProjectile>
			<onlyManualCast>true</onlyManualCast>
			<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
		</Properties>
		<weaponTags>
			<li>CE_AI_Grenade</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Weapon_RGNGrenade</defName>
		<statBases>
			<Mass>0.29</Mass>
			<Bulk>1.5</Bulk>
			<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
		</statBases>
		<Properties>
			<label>throw grenade</label>
			<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<range>12</range>
			<minRange>1.5</minRange>
			<warmupTime>0.6</warmupTime>
			<noiseRadius>4</noiseRadius>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
			<soundCast>ThrowGrenade</soundCast>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<defaultProjectile>RD_Proj_RGNGrenade</defaultProjectile>
			<onlyManualCast>true</onlyManualCast>
			<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
		</Properties>
		<weaponTags>
			<li>CE_AI_Grenade</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Weapon_RGOGrenade</defName>
		<statBases>
			<Mass>0.53</Mass>
			<Bulk>1.5</Bulk>
			<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
		</statBases>
		<Properties>
			<label>throw grenade</label>
			<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<range>10</range>
			<minRange>1.5</minRange>
			<warmupTime>0.9</warmupTime>
			<noiseRadius>4</noiseRadius>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
			<soundCast>ThrowGrenade</soundCast>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<defaultProjectile>RD_Proj_RGOGrenade</defaultProjectile>
			<onlyManualCast>true</onlyManualCast>
			<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
		</Properties>
		<weaponTags>
			<li>CE_AI_Grenade</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Weapon_F1Grenade</defName>
		<statBases>
			<Mass>0.31</Mass>
			<Bulk>1.5</Bulk>
			<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
		</statBases>
		<Properties>
			<label>throw grenade</label>
			<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<range>10</range>
			<minRange>1.5</minRange>
			<warmupTime>0.8</warmupTime>
			<noiseRadius>4</noiseRadius>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
			<soundCast>ThrowGrenade</soundCast>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<defaultProjectile>RD_Proj_F1Grenade</defaultProjectile>
			<onlyManualCast>true</onlyManualCast>
			<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
		</Properties>
		<weaponTags>
			<li>CE_AI_Grenade</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Weapon_RKGATGrenade</defName>
		<statBases>
			<Mass>1.07</Mass>
			<Bulk>1.5</Bulk>
			<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
		</statBases>
		<Properties>
			<label>throw an AT grenade</label>
			<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<range>7</range>
			<minRange>1.5</minRange>
			<warmupTime>0.8</warmupTime>
			<noiseRadius>4</noiseRadius>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
			<soundCast>ThrowGrenade</soundCast>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<defaultProjectile>RD_Proj_RKGATGrenade</defaultProjectile>
			<onlyManualCast>true</onlyManualCast>
			<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
		</Properties>
		<weaponTags>
			<li>CE_AI_Grenade</li>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<!-- ========== Remove cost========== -->

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Weapon_RGD5Grenade" or
			defName="Weapon_RGNGrenade" or
			defName="Weapon_RGOGrenade" or
			defName="Weapon_F1Grenade" or
			defName="Weapon_RKGATGrenade"
			]/costList </xpath>
	</Operation>

</Patch>