package Items
using RTDB

ItemWeaponRoot : Item
{
	bool isSingleInstance = false;
	CName[] tags += 
	[
		"parentPart"
	];
	fk< ParentAttachmentType > parentAttachmentType = "ParentAttachmentType.Slot";
}

ItemWeaponChild : Item
{
	bool isSingleInstance = false;
	bool isPart = true;
	CName[] tags += 
	[
		"itemPart"
	];
	fk< ParentAttachmentType > parentAttachmentType = "ParentAttachmentType.Animated";
}

BarrelBase : ItemWeaponChild
{
	fk< ItemType > itemType = "ItemType.Prt_Muzzle";
	buyPrice = [];
	sellPrice = [];
}

ReceiverBase : ItemWeaponChild
{
	fk< ItemType > itemType = "ItemType.Prt_Receiver";
	buyPrice = [];
	sellPrice = [];
}

[ notQueryable ]
WeaponMagazineBase : ItemWeaponChild
{
	buyPrice = [];
	sellPrice = [];
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Magazine"
	];
	fk< ItemType > itemType = "ItemType.Prt_Magazine";
	displayName = "Standard";
}

WeaponMagazineBaseEmpty : ItemWeaponChild
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Magazine"
	];
	fk< ItemType > itemType = "ItemType.Prt_Magazine";
	buyPrice = [];
	sellPrice = [];
}

WeaponRifleReceiverBase : ReceiverBase
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Receiver"
	];
}

WeaponRifleBarrelBase : BarrelBase
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Barrel"
	];
}

WeaponStockBase : ItemWeaponChild
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Stock"
	];
	fk< ItemType > itemType = "ItemType.Prt_Stock";
}

WeaponScopeRailBase : ItemWeaponChild
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.ScopeRail"
	];
	fk< ItemType > itemType = "ItemType.Prt_ScopeRail";
	iconPath = "scope_rail_generic";
}

WeaponHandgunReceiverBase : ReceiverBase
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Receiver"
	];
}

WeaponHandgunBarrelBase : BarrelBase
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Barrel"
	];
}

WeaponShotgunBarrelBase : BarrelBase
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Barrel"
	];
}

WeaponShotgunReceiverBase : ReceiverBase
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Receiver"
	];
}

[ notQueryable ]
WeaponMuzzleBase : ItemWeaponChild
{
	buyPrice = 
	[
		"Price.Muzzle", "Price.ItemQualityMultiplier", "Price.BuyPrice_StreetCred_Discount"
	];
	sellPrice = 
	[
		"Price.Muzzle", "Price.ItemQualityMultiplier", "Price.SellMultiplier"
	];
	tags += 
	[
		"WeaponMod"
	];
	quality = "Quality.Random";
	iconPath = "muzzle_generic";
	powerLevelDeterminedByParent = true;
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.PowerModule"
	];
	statModifierGroups += 
	[
		"Items.QualityRandomization_Attachments"
	];
}

WeaponTargetingSystemBase : ItemWeaponChild
{
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Targeting"
	];
	fk< ItemType > itemType = "ItemType.Prt_TargetingSystem";
}

[ notQueryable ]
WeaponScopeBase : ItemWeaponChild
{
	buyPrice = 
	[
		"Price.Scope", "Price.ItemQualityMultiplier", "Price.BuyPrice_StreetCred_Discount"
	];
	sellPrice = 
	[
		"Price.Scope", "Price.ItemQualityMultiplier", "Price.SellMultiplier"
	];
	iconPath = "scope_generic";
	tags += 
	[
		"WeaponMod"
	];
	quality = "Quality.Random";
	powerLevelDeterminedByParent = true;
	fk< AttachmentSlot >[] placementSlots = 
	[
		"AttachmentSlots.Scope"
	];
	statModifiers += 
	[
		{
			statType = "BaseStats.EffectiveRange";
			modifierType = "AdditiveMultiplier";
			refStat = "BaseStats.EffectiveRangeBonus";
			opSymbol = "*";
			value = 0.01f;
		} : CombinedStatModifier
	];
	statModifierGroups += 
	[
		"Items.QualityRandomization_Attachments"
	];
}

WeaponCapacitorBase : ItemWeaponChild
{
	fk< ItemType > itemType = "ItemType.Prt_Capacitor";
}

