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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_Molotok" or defName="Gun_Hishchnik"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>2.02</cooldownTime>
					<armorPenetrationBlunt>1.630</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>muzzle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!--Compact, thus low weight, low bulk, but high recoil and spread-->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Molotok</defName>
		<statBases>
			<Mass>6.12</Mass>
			<RangedWeapon_Cooldown>0.56</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.17</ShotSpread>
			<SwayFactor>1.83</SwayFactor>
			<Bulk>10.03</Bulk>
			<WorkToMake>64000</WorkToMake>
		</statBases>
		<costList>
			<Steel>80</Steel>
			<Plasteel>20</Plasteel>
			<ComponentIndustrial>7</ComponentIndustrial>
			<Teseum>20</Teseum>
		</costList>
		<Properties>
			<recoilAmount>1.8</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_545x39mmSoviet_Teseum</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>72</range>
			<burstShotCount>10</burstShotCount>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<soundCast>ShotMolotok</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>50</magazineSize>
			<reloadTime>4.9</reloadTime>
			<ammoSet>AmmoSet_TeseumRifleIntermediate</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>5</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>SuppressFire</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_MachineGun</li>
			<li>CE_AI_LMG</li>
			<li>Bipod_LMG</li>
		</weaponTags>
		<researchPrerequisite>GasOperation</researchPrerequisite>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Gun_Molotok"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.16,1.25</DrawSize>
				<DrawOffset>0.05,-0.07</DrawOffset>
			</li>
		</value>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Hishchnik</defName>
		<statBases>
			<Mass>12.5</Mass>
			<RangedWeapon_Cooldown>0.56</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.05</ShotSpread>
			<SwayFactor>1.53</SwayFactor>
			<Bulk>16.7</Bulk>
			<WorkToMake>58000</WorkToMake>
		</statBases>
		<costList>
			<Steel>150</Steel>
			<ComponentIndustrial>12</ComponentIndustrial>
			<Teseum>30</Teseum>
		</costList>
		<Properties>
			<recoilAmount>1.5</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_762x54mmR_Teseum</defaultProjectile>
			<warmupTime>1.8</warmupTime>
			<range>62</range>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<burstShotCount>15</burstShotCount>
			<soundCast>Shot_Minigun</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>100</magazineSize>
			<reloadTime>7.8</reloadTime>
			<ammoSet>AmmoSet_TeseumRifleFullPower</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>5</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>SuppressFire</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_MachineGun</li>
			<li>CE_AI_LMG</li>
			<li>Bipod_LMG</li>
			<li>AdvancedGun</li>
			<li>GunHeavy</li>
		</weaponTags>
		<researchPrerequisite>GasOperation</researchPrerequisite>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Gun_Hishchnik"]</xpath>
		<value>
			<li Class="CombatExtended.GunDrawExtension">
				<DrawSize>1.35,1.18</DrawSize>
				<DrawOffset>0.13,-0.03</DrawOffset>
			</li>
		</value>
	</Operation>
</Patch>