class InventoryItemDataWrapper extends IScriptable
{
	var ItemData : InventoryItemData;
	var SortData : InventoryItemSortData;
	var HasSortDataBuilt : Bool;
	default HasSortDataBuilt = false;
}

importonly struct InventoryItemSortData
{
	import var Name : String;
	import var Quality : Int32;
	import var Price : Int32;
	import var Weight : Float;
	import var DPS : Int32;
	import var ItemType : Int32;
	import var QuestItem : Bool;
	import var NewItem : Bool;
	import var DLCAddedItem : Bool;
	import var ChimeraMod : Bool;
	import var IsPlayerFavourite : Bool;
}

import struct InventoryItemData
{
	import var ID : ItemID;
	import var SlotID : TweakDBID;
	import var Name : String;
	import var Quality : CName;
	import var QualityF : Float;
	import var Quantity : Int32;
	import var Ammo : Int32;
	import var Shape : EInventoryItemShape;
	import var ItemShape : EInventoryItemShape;
	import var IconPath : String;
	import var CategoryName : String;
	import var ItemType : gamedataItemType;
	import var LocalizedItemType : String;
	import var Description : String;
	import var AdditionalDescription : String;
	import var GameplayDescription : String;
	import var Price : Float;
	import var BuyPrice : Float;
	import var UnlockProgress : Float;
	import var RequiredLevel : Int32;
	import var ItemLevel : Int32;
	import var DamageType : gamedataDamageType;
	import var EquipmentArea : gamedataEquipmentArea;
	import var ComparedQuality : gamedataQuality;
	import var Empty : Bool;
	import var IsPart : Bool;
	import var IsCraftingMaterial : Bool;
	import var IsEquipped : Bool;
	import var IsNew : Bool;
	import var IsAvailable : Bool;
	import var IsVendorItem : Bool;
	import var IsBroken : Bool;
	import var IsIconic : Bool;
	import var SlotIndex : Int32;
	import var PositionInBackpack : Uint32;
	import var IconGender : ItemIconGender;
	private import var GameItemData : weak< gameItemData >;
	import var HasPlayerSmartGunLink : Bool;
	import var PlayerLevel : Int32;
	import var PlayerStrength : Int32;
	import var PlayerReflexes : Int32;
	import var PlayerStreetCred : Int32;
	import var IsRequirementMet : Bool;
	import var IsEquippable : Bool;
	import var IsVisualsEquipped : Bool;
	import var Requirement : SItemStackRequirementData;
	import var EquipRequirement : SItemStackRequirementData;
	import var EquipRequirements : array< SItemStackRequirementData >;
	import var LootItemType : LootItemType;
	import var Attachments : array< InventoryItemAttachments >;
	import var Abilities : array< InventoryItemAbility >;
	import var PlacementSlots : array< TweakDBID >;
	import var PrimaryStats : array< StatViewData >;
	import var SecondaryStats : array< StatViewData >;
	import var SortData : InventoryItemSortData;
	import var IsPerkRequired : Bool;
	import var PerkRequiredName : String;
	import var IsCrafted : Bool;

	public import static function GetDPS( self : InventoryItemData ) : Int32;
	public import static function GetDPSF( self : InventoryItemData ) : Float;
	public import static function GetArmorF( self : InventoryItemData ) : Float;
	public import static function IsWeapon( self : InventoryItemData ) : Bool;
	public import static function IsGarment( self : InventoryItemData ) : Bool;

	public static function SetEmpty( self : ref< InventoryItemData >, empty : Bool )
	{
		self.Empty = empty;
	}

	public static function IsEmpty( const self : ref< InventoryItemData > ) : Bool
	{
		return self.Empty;
	}

	public static function SetID( self : ref< InventoryItemData >, id : ItemID )
	{
		self.ID = id;
	}

	public static function GetID( const self : ref< InventoryItemData > ) : ItemID
	{
		return self.ID;
	}

	public static function SetSlotID( self : ref< InventoryItemData >, id : TweakDBID )
	{
		self.SlotID = id;
	}

	public static function GetSlotID( const self : ref< InventoryItemData > ) : TweakDBID
	{
		return self.SlotID;
	}

	public static function SetName( self : ref< InventoryItemData >, const Name : ref< String > )
	{
		self.Name = Name;
	}

	public static function GetName( const self : ref< InventoryItemData > ) : String
	{
		return self.Name;
	}

	public static function SetQuality( self : ref< InventoryItemData >, quality : CName )
	{
		self.Quality = quality;
	}

	public static function GetQuality( const self : ref< InventoryItemData > ) : CName
	{
		return self.Quality;
	}

	public static function SetQualityF( self : ref< InventoryItemData >, quality : Float )
	{
		self.QualityF = quality;
	}

	public static function GetQualityF( const self : ref< InventoryItemData > ) : Float
	{
		return self.QualityF;
	}

	public static function SetQuantity( self : ref< InventoryItemData >, quantity : Int32 )
	{
		self.Quantity = quantity;
	}

	public static function GetQuantity( const self : ref< InventoryItemData > ) : Int32
	{
		return self.Quantity;
	}

	public static function SetAmmo( self : ref< InventoryItemData >, ammo : Int32 )
	{
		self.Ammo = ammo;
	}

	public static function GetAmmo( const self : ref< InventoryItemData > ) : Int32
	{
		return self.Ammo;
	}

	public static function SetShape( self : ref< InventoryItemData >, shape : EInventoryItemShape )
	{
		self.Shape = shape;
	}

	public static function GetShape( const self : ref< InventoryItemData > ) : EInventoryItemShape
	{
		return self.Shape;
	}

	public static function SetItemShape( self : ref< InventoryItemData >, shape : EInventoryItemShape )
	{
		self.ItemShape = shape;
	}

	public static function GetItemShape( const self : ref< InventoryItemData > ) : EInventoryItemShape
	{
		return self.ItemShape;
	}

	public static function SetIconPath( self : ref< InventoryItemData >, const iconPath : ref< String > )
	{
		self.IconPath = iconPath;
	}

	public static function GetIconPath( const self : ref< InventoryItemData > ) : String
	{
		return self.IconPath;
	}

	public static function SetCategoryName( self : ref< InventoryItemData >, const categoryName : ref< String > )
	{
		self.CategoryName = categoryName;
	}

	public static function GetCategoryName( const self : ref< InventoryItemData > ) : String
	{
		return self.CategoryName;
	}

	public static function SetItemType( self : ref< InventoryItemData >, itemType : gamedataItemType )
	{
		self.ItemType = itemType;
	}

	public static function GetItemType( const self : ref< InventoryItemData > ) : gamedataItemType
	{
		return self.ItemType;
	}

	public static function SetLocalizedItemType( self : ref< InventoryItemData >, const localizedItemType : ref< String > )
	{
		self.LocalizedItemType = localizedItemType;
	}

	public static function GetLocalizedItemType( const self : ref< InventoryItemData > ) : String
	{
		return self.LocalizedItemType;
	}

	public static function SetDescription( self : ref< InventoryItemData >, const description : ref< String > )
	{
		self.Description = description;
	}

	public static function GetDescription( const self : ref< InventoryItemData > ) : String
	{
		return self.Description;
	}

	public static function SetAdditionalDescription( self : ref< InventoryItemData >, const description : ref< String > )
	{
		self.AdditionalDescription = description;
	}

	public static function GetAdditionalDescription( const self : ref< InventoryItemData > ) : String
	{
		return self.AdditionalDescription;
	}

	public static function SetPrice( self : ref< InventoryItemData >, price : Float )
	{
		self.Price = price;
	}

	public static function GetPrice( const self : ref< InventoryItemData > ) : Float
	{
		return self.Price;
	}

	public static function SetBuyPrice( self : ref< InventoryItemData >, price : Float )
	{
		self.BuyPrice = price;
	}

	public static function GetBuyPrice( const self : ref< InventoryItemData > ) : Float
	{
		return self.BuyPrice;
	}

	public static function SetUnlockProgress( self : ref< InventoryItemData >, unlockProgress : Float )
	{
		self.UnlockProgress = unlockProgress;
	}

	public static function GetUnlockProgress( const self : ref< InventoryItemData > ) : Float
	{
		return self.UnlockProgress;
	}

	public static function SetRequiredLevel( self : ref< InventoryItemData >, requiredLevel : Int32 )
	{
		self.RequiredLevel = requiredLevel;
	}

	public static function GetRequiredLevel( const self : ref< InventoryItemData > ) : Int32
	{
		return self.RequiredLevel;
	}

	public static function SetItemLevel( self : ref< InventoryItemData >, itemLevel : Int32 )
	{
		self.ItemLevel = itemLevel;
	}

	public static function GetItemLevel( const self : ref< InventoryItemData > ) : Int32
	{
		return self.ItemLevel;
	}

	public static function SetDamageType( self : ref< InventoryItemData >, damageType : gamedataDamageType )
	{
		self.DamageType = damageType;
	}

	public static function GetDamageType( const self : ref< InventoryItemData > ) : gamedataDamageType
	{
		return self.DamageType;
	}

	public static function SetEquipmentArea( self : ref< InventoryItemData >, equipmentArea : gamedataEquipmentArea )
	{
		self.EquipmentArea = equipmentArea;
	}

	public static function GetEquipmentArea( const self : ref< InventoryItemData > ) : gamedataEquipmentArea
	{
		return self.EquipmentArea;
	}

	public static function SetComparedQuality( self : ref< InventoryItemData >, comparedQuality : gamedataQuality )
	{
		self.ComparedQuality = comparedQuality;
	}

	public static function GetComparedQuality( const self : ref< InventoryItemData > ) : gamedataQuality
	{
		return self.ComparedQuality;
	}

	public static function SetIsPart( self : ref< InventoryItemData >, isPart : Bool )
	{
		self.IsPart = isPart;
	}

	public static function IsPart( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsPart;
	}

	public static function SetIsCraftingMaterial( self : ref< InventoryItemData >, isCraftingMaterial : Bool )
	{
		self.IsCraftingMaterial = isCraftingMaterial;
	}

	public static function IsCraftingMaterial( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsCraftingMaterial;
	}

	public static function SetIsEquipped( self : ref< InventoryItemData >, isEquipped : Bool )
	{
		self.IsEquipped = isEquipped;
	}

	public static function IsEquipped( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsEquipped;
	}

	public static function SetIsNew( self : ref< InventoryItemData >, isNew : Bool )
	{
		self.IsNew = isNew;
	}

	public static function IsNew( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsNew;
	}

	public static function SetIsAvailable( self : ref< InventoryItemData >, isAvailable : Bool )
	{
		self.IsAvailable = isAvailable;
	}

	public static function IsAvailable( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsAvailable;
	}

	public static function SetIsVendorItem( self : ref< InventoryItemData >, isVendorItem : Bool )
	{
		self.IsVendorItem = isVendorItem;
	}

	public static function IsVendorItem( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsVendorItem;
	}

	public static function SetIsBroken( self : ref< InventoryItemData >, isBroken : Bool )
	{
		self.IsBroken = isBroken;
	}

	public static function IsBroken( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsBroken;
	}

	public static function SetSlotIndex( self : ref< InventoryItemData >, slotIndex : Int32 )
	{
		self.SlotIndex = slotIndex;
	}

	public static function GetSlotIndex( const self : ref< InventoryItemData > ) : Int32
	{
		return self.SlotIndex;
	}

	public static function SetPositionInBackpack( self : ref< InventoryItemData >, positionInBackpack : Uint32 )
	{
		self.PositionInBackpack = positionInBackpack;
	}

	public static function GetPositionInBackpack( const self : ref< InventoryItemData > ) : Uint32
	{
		return self.PositionInBackpack;
	}

	public static function SetIconGender( self : ref< InventoryItemData >, iconGender : ItemIconGender )
	{
		self.IconGender = iconGender;
	}

	public static function GetIconGender( const self : ref< InventoryItemData > ) : ItemIconGender
	{
		return self.IconGender;
	}

	public static function SetGameItemData( self : ref< InventoryItemData >, gameItemData : gameItemData )
	{
		self.GameItemData = gameItemData;
	}

	public static function GetGameItemData( const self : ref< InventoryItemData > ) : gameItemData
	{
		if( !( self.GameItemData ) )
		{
		}
		return self.GameItemData;
	}

	public static function SetHasPlayerSmartGunLink( self : ref< InventoryItemData >, hasPlayerSmartGunLink : Bool )
	{
		self.HasPlayerSmartGunLink = hasPlayerSmartGunLink;
	}

	public static function HasPlayerSmartGunLink( const self : ref< InventoryItemData > ) : Bool
	{
		return self.HasPlayerSmartGunLink;
	}

	public static function SetPlayerLevel( self : ref< InventoryItemData >, playerLevel : Int32 )
	{
		self.PlayerLevel = playerLevel;
	}

	public static function GetPlayerLevel( const self : ref< InventoryItemData > ) : Int32
	{
		return self.PlayerLevel;
	}

	public static function SetPlayerStrength( self : ref< InventoryItemData >, playerStrength : Int32 )
	{
		self.PlayerStrength = playerStrength;
	}

	public static function GetPlayerStrenght( const self : ref< InventoryItemData > ) : Int32
	{
		return self.PlayerStrength;
	}

	public static function SetPlayerReflexes( self : ref< InventoryItemData >, playerReflexes : Int32 )
	{
		self.PlayerReflexes = playerReflexes;
	}

	public static function GetPlayerReflexes( const self : ref< InventoryItemData > ) : Int32
	{
		return self.PlayerReflexes;
	}

	public static function SetPlayerStreetCred( self : ref< InventoryItemData >, playerStreetCred : Int32 )
	{
		self.PlayerStreetCred = playerStreetCred;
	}

	public static function GetPlayerStreetCred( const self : ref< InventoryItemData > ) : Int32
	{
		return self.PlayerStreetCred;
	}

	public static function SetIsRequirementMet( self : ref< InventoryItemData >, isRequirementMet : Bool )
	{
		self.IsRequirementMet = isRequirementMet;
	}

	public static function IsRequirementMet( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsRequirementMet;
	}

	public static function SetRequirement( self : ref< InventoryItemData >, requirement : SItemStackRequirementData )
	{
		self.Requirement = requirement;
	}

	public static function GetRequirement( const self : ref< InventoryItemData > ) : SItemStackRequirementData
	{
		return self.Requirement;
	}

	public static function SetIsEquippable( self : ref< InventoryItemData >, isEquippable : Bool )
	{
		self.IsEquippable = isEquippable;
	}

	public static function IsEquippable( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsEquippable;
	}

	public static function SetEquipRequirement( self : ref< InventoryItemData >, requirement : SItemStackRequirementData )
	{
		self.EquipRequirement = requirement;
	}

	public static function GetEquipRequirement( const self : ref< InventoryItemData > ) : SItemStackRequirementData
	{
		return self.EquipRequirement;
	}

	public static function SetEquipRequirements( self : ref< InventoryItemData >, const requirements : ref< array< SItemStackRequirementData > > )
	{
		self.EquipRequirements = requirements;
	}

	public static function GetEquipRequirements( const self : ref< InventoryItemData > ) : array< SItemStackRequirementData >
	{
		return self.EquipRequirements;
	}

	public static function SetLootItemType( self : ref< InventoryItemData >, lootItemType : LootItemType )
	{
		self.LootItemType = lootItemType;
	}

	public static function GetLootItemType( const self : ref< InventoryItemData > ) : LootItemType
	{
		return self.LootItemType;
	}

	public static function GetAttachmentsSize( const self : ref< InventoryItemData > ) : Int32
	{
		return self.Attachments.Size();
	}

	public static function GetAttachments( const self : ref< InventoryItemData > ) : array< InventoryItemAttachments >
	{
		return self.Attachments;
	}

	public static function GetAttachment( const self : ref< InventoryItemData >, index : Int32 ) : InventoryItemAttachments
	{
		return self.Attachments[ index ];
	}

	public static function SetAttachments( self : ref< InventoryItemData >, const attachments : ref< array< InventoryItemAttachments > > )
	{
		self.Attachments = attachments;
	}

	public static function GetAbilitiesSize( const self : ref< InventoryItemData > ) : Int32
	{
		return self.Abilities.Size();
	}

	public static function GetAbilities( const self : ref< InventoryItemData > ) : array< InventoryItemAbility >
	{
		return self.Abilities;
	}

	public static function GetAbility( const self : ref< InventoryItemData >, index : Int32 ) : InventoryItemAbility
	{
		return self.Abilities[ index ];
	}

	public static function SetAbilities( self : ref< InventoryItemData >, const abilities : ref< array< InventoryItemAbility > > )
	{
		self.Abilities = abilities;
	}

	public static function PlacementSlotsContains( const self : ref< InventoryItemData >, slot : TweakDBID ) : Bool
	{
		return self.PlacementSlots.Contains( slot );
	}

	public static function AddPlacementSlot( self : ref< InventoryItemData >, slot : TweakDBID )
	{
		return self.PlacementSlots.PushBack( slot );
	}

	public static function GetPrimaryStatsSize( const self : ref< InventoryItemData > ) : Int32
	{
		return self.PrimaryStats.Size();
	}

	public static function GetPrimaryStats( const self : ref< InventoryItemData > ) : array< StatViewData >
	{
		return self.PrimaryStats;
	}

	public static function GetPrimaryStat( const self : ref< InventoryItemData >, index : Int32 ) : StatViewData
	{
		return self.PrimaryStats[ index ];
	}

	public static function SetPrimaryStats( self : ref< InventoryItemData >, const primaryStats : ref< array< StatViewData > > )
	{
		self.PrimaryStats = primaryStats;
	}

	public static function GetSecondaryStatsSize( const self : ref< InventoryItemData > ) : Int32
	{
		return self.SecondaryStats.Size();
	}

	public static function GetSecondaryStats( const self : ref< InventoryItemData > ) : array< StatViewData >
	{
		return self.SecondaryStats;
	}

	public static function GetSecondaryStat( const self : ref< InventoryItemData >, index : Int32 ) : StatViewData
	{
		return self.SecondaryStats[ index ];
	}

	public static function SetSecondaryStats( self : ref< InventoryItemData >, const secondaryStats : ref< array< StatViewData > > )
	{
		self.SecondaryStats = secondaryStats;
	}

	public static function GetIsPerkRequired( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsPerkRequired;
	}

	public static function SetIsPerkRequired( self : ref< InventoryItemData >, isRequired : Bool )
	{
		self.IsPerkRequired = isRequired;
	}

	public static function GetPerkRequiredName( const self : ref< InventoryItemData > ) : String
	{
		return self.PerkRequiredName;
	}

	public static function SetPerkRequiredName( self : ref< InventoryItemData >, const perkName : ref< String > )
	{
		self.PerkRequiredName = perkName;
	}

	public static function GetIsCrafted( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsCrafted;
	}

	public static function SetIsCrafted( self : ref< InventoryItemData >, isCrafted : Bool )
	{
		self.IsCrafted = isCrafted;
	}

	public static function SetSortData( self : ref< InventoryItemData >, const sortData : ref< InventoryItemSortData > )
	{
		self.SortData = sortData;
	}

	public static function GetSortData( const self : ref< InventoryItemData > ) : InventoryItemSortData
	{
		return self.SortData;
	}

	public static function UpdateSortData( self : ref< InventoryItemData >, uiScriptableSystem : UIScriptableSystem )
	{
		self.SortData = ItemCompareBuilder.BuildInventoryItemSortData( self, uiScriptableSystem );
	}

	public static function UpdateSortData( self : ref< InventoryItemData >, uiScriptableSystem : UIScriptableSystem, isPlayerFavourite : Bool )
	{
		self.SortData = ItemCompareBuilder.BuildInventoryItemSortData( self, uiScriptableSystem );
		self.SortData.IsPlayerFavourite = isPlayerFavourite;
	}

	public static function IsVisualsEquipped( const self : ref< InventoryItemData > ) : Bool
	{
		return self.IsVisualsEquipped;
	}

	public static function SetIsVisualsEquipped( self : ref< InventoryItemData >, value : Bool )
	{
		self.IsVisualsEquipped = value;
	}

	public static function GetGameplayDescription( const self : ref< InventoryItemData > ) : String
	{
		return self.GameplayDescription;
	}

	public static function SetGameplayDescription( self : ref< InventoryItemData >, value : String )
	{
		self.GameplayDescription = value;
	}

}

import enum InventoryItemAttachmentType
{
	Generic,
	Dedicated,
}

importonly class InventoryItemAttachments extends IScriptable
{
	import var SlotID : TweakDBID;
	import var ItemData : InventoryItemData;
	import var SlotName : String;
	import var SlotType : InventoryItemAttachmentType;
}

importonly struct InventoryItemAbility
{
	import var IconPath : CName;
	import var Title : String;
	import var Description : String;
	import var LocalizationDataPackage : UILocalizationDataPackage;
}

import class UILocalizationDataPackage extends IScriptable
{
	import var floatValues : array< Float >;
	import var intValues : array< Int32 >;
	import var nameValues : array< CName >;
	import var statValues : array< Float >;
	import var statNames : array< CName >;
	private import var paramsCount : Int32;
	private import var textParams : inkTextParams;
	private var notReplacedWorkaroundEnabled : Bool;

	public import static function FromLogicUIDataPackage( uiData : weak< GameplayLogicPackageUIData_Record >, optional item : weak< gameItemData >, optional partItemData : InnerItemData ) : UILocalizationDataPackage;
	public import static function FromPerkUIDataPackage( uiData : weak< PerkLevelUIData_Record > ) : UILocalizationDataPackage;
	public import static function FromNewPerkUIDataPackage( uiData : weak< NewPerkLevelUIData_Record > ) : UILocalizationDataPackage;
	public import static function FromPassiveUIDataPackage( uiData : weak< PassiveProficiencyBonusUIData_Record > ) : UILocalizationDataPackage;

	public function InvalidateTextParams( optional countWorkaroud : Bool )
	{
		var i : Int32;
		textParams = new inkTextParams;
		paramsCount = 0;
		if( notReplacedWorkaroundEnabled )
		{
			textParams.AddString( "__empty__", "" );
			if( countWorkaroud )
			{
				paramsCount += 1;
			}
		}
		for( i = 0; i < floatValues.Size(); i += 1 )
		{
			textParams.AddNumber( "float_" + IntToString( i ), floatValues[ i ] );
		}
		paramsCount += i;
		for( i = 0; i < intValues.Size(); i += 1 )
		{
			textParams.AddNumber( "int_" + IntToString( i ), intValues[ i ] );
		}
		paramsCount += i;
		for( i = 0; i < nameValues.Size(); i += 1 )
		{
			textParams.AddString( "name_" + IntToString( i ), GetLocalizedText( NameToString( nameValues[ i ] ) ) );
		}
		paramsCount += i;
		for( i = 0; i < statValues.Size(); i += 1 )
		{
			textParams.AddNumber( "stat_" + IntToString( i ), statValues[ i ] );
		}
		paramsCount += i;
		if( ( ( statValues.Size() == 0 ) && ( i >= 0 ) ) && ( i < statNames.Size() ) )
		{
			textParams.AddString( "stat_" + IntToString( i ), GetLocalizedText( NameToString( statNames[ i ] ) ) );
		}
		paramsCount += i;
	}

	public function GetParamsCount( optional countWorkaroud : Bool ) : Int32
	{
		if( paramsCount == -1 )
		{
			InvalidateTextParams( countWorkaroud );
		}
		return paramsCount;
	}

	public function GetTextParams( optional countWorkaroud : Bool ) : inkTextParams
	{
		if( paramsCount == -1 )
		{
			InvalidateTextParams();
		}
		return textParams;
	}

	public function EnableNotReplacedWorkaround()
	{
		notReplacedWorkaroundEnabled = true;
	}

	public function IsStringFormatableWith( const str : ref< String > ) : Bool
	{
		if( StrContains( str, "{float_" ) )
		{
			if( floatValues.Size() == 0 )
			{
				return false;
			}
		}
		if( StrContains( str, "{int_" ) )
		{
			if( intValues.Size() == 0 )
			{
				return false;
			}
		}
		if( StrContains( str, "{name_" ) )
		{
			if( nameValues.Size() == 0 )
			{
				return false;
			}
		}
		return true;
	}

}

import enum EInventoryItemShape : Uint8
{
	SingleSlot,
	DoubleSlot,
}

import enum ItemIconGender : Uint8
{
	Female,
	Male,
}

abstract class UIGenderHelper
{

	public static function GetIconGender( playerPuppet : weak< PlayerPuppet > ) : ItemIconGender
	{
		if( playerPuppet )
		{
			return ( ( playerPuppet.GetResolvedGenderName() == 'Male' ) ? ( ItemIconGender.Male ) : ( ItemIconGender.Female ) );
		}
		else
		{
			return ItemIconGender.Female;
		}
	}

}

abstract class InventoryGPRestrictionHelper
{

	public static function CanUse( const itemData : ref< InventoryItemData >, playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var canUse : Bool;
		var bb : IBlackboard;
		canUse = CanInteractByEquipmentArea( itemData, playerPuppet );
		if( itemData.ItemType == gamedataItemType.Prt_Program || itemData.EquipmentArea == gamedataEquipmentArea.Consumable )
		{
			bb = GameInstance.GetBlackboardSystem( playerPuppet.GetGame() ).GetLocalInstanced( playerPuppet.GetEntityID(), GetAllBlackboardDefs().PlayerStateMachine );
			if( bb.GetInt( GetAllBlackboardDefs().PlayerStateMachine.Combat ) == ( ( Int32 )( gamePSMCombat.InCombat ) ) )
			{
				canUse = false;
			}
		}
		return canUse;
	}

	public static function CanUse( itemData : weak< UIInventoryItem >, playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var canUse : Bool;
		var bb : IBlackboard;
		canUse = CanInteractByEquipmentArea( itemData, playerPuppet );
		if( itemData.GetItemType() == gamedataItemType.Prt_Program || itemData.GetItemRecord().ItemCategory().Type() == gamedataItemCategory.Consumable )
		{
			bb = GameInstance.GetBlackboardSystem( playerPuppet.GetGame() ).GetLocalInstanced( playerPuppet.GetEntityID(), GetAllBlackboardDefs().PlayerStateMachine );
			if( bb.GetInt( GetAllBlackboardDefs().PlayerStateMachine.Combat ) == ( ( Int32 )( gamePSMCombat.InCombat ) ) )
			{
				canUse = false;
			}
		}
		return canUse;
	}

	public static function CanEquip( const itemData : ref< InventoryItemData >, playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var canEquip : Bool;
		var bb : IBlackboard;
		if( !( itemData.IsRequirementMet ) )
		{
			return false;
		}
		canEquip = CanInteractByEquipmentArea( itemData, playerPuppet );
		if( itemData.ItemType == gamedataItemType.Prt_Program )
		{
			bb = GameInstance.GetBlackboardSystem( playerPuppet.GetGame() ).GetLocalInstanced( playerPuppet.GetEntityID(), GetAllBlackboardDefs().PlayerStateMachine );
			if( bb.GetInt( GetAllBlackboardDefs().PlayerStateMachine.Combat ) == ( ( Int32 )( gamePSMCombat.InCombat ) ) )
			{
				canEquip = false;
			}
		}
		return canEquip;
	}

	public static function CanDrop( const itemData : ref< InventoryItemData >, playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var canDrop : Bool;
		var bb : IBlackboard;
		canDrop = true;
		if( itemData.EquipmentArea == gamedataEquipmentArea.Consumable )
		{
			bb = GameInstance.GetBlackboardSystem( playerPuppet.GetGame() ).GetLocalInstanced( playerPuppet.GetEntityID(), GetAllBlackboardDefs().PlayerStateMachine );
			if( bb.GetInt( GetAllBlackboardDefs().PlayerStateMachine.Combat ) == ( ( Int32 )( gamePSMCombat.InCombat ) ) )
			{
				canDrop = false;
			}
		}
		return canDrop;
	}

	public static function CanDrop( itemData : weak< UIInventoryItem >, playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var canDrop : Bool;
		var bb : IBlackboard;
		canDrop = true;
		if( itemData.GetEquipmentArea() == gamedataEquipmentArea.Consumable )
		{
			bb = GameInstance.GetBlackboardSystem( playerPuppet.GetGame() ).GetLocalInstanced( playerPuppet.GetEntityID(), GetAllBlackboardDefs().PlayerStateMachine );
			if( bb.GetInt( GetAllBlackboardDefs().PlayerStateMachine.Combat ) == ( ( Int32 )( gamePSMCombat.InCombat ) ) )
			{
				canDrop = false;
			}
		}
		return canDrop;
	}

	private static function CanInteractByEquipmentArea( const itemData : ref< InventoryItemData >, playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var equipmentSystem : weak< EquipmentSystem >;
		var canInteract : Bool;
		equipmentSystem = ( ( EquipmentSystem )( GameInstance.GetScriptableSystemsContainer( playerPuppet.GetGame() ).Get( 'EquipmentSystem' ) ) );
		switch( itemData.EquipmentArea )
		{
			case gamedataEquipmentArea.Consumable:
				canInteract = !( StatusEffectSystem.ObjectHasStatusEffectWithTag( playerPuppet, 'FistFight' ) );
			break;
			case gamedataEquipmentArea.Weapon:
				canInteract = !( ( ( StatusEffectSystem.ObjectHasStatusEffectWithTag( playerPuppet, 'VehicleScene' ) || StatusEffectSystem.ObjectHasStatusEffectWithTag( playerPuppet, 'FirearmsNoSwitch' ) ) || BlockedBySceneTier( playerPuppet ) ) || !( equipmentSystem.GetPlayerData( playerPuppet ).IsEquippable( InventoryItemData.GetGameItemData( itemData ) ) ) );
			break;
			default:
				canInteract = true;
			break;
		}
		return canInteract;
	}

	private static function CanInteractByEquipmentArea( itemData : weak< UIInventoryItem >, playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var equipmentSystem : weak< EquipmentSystem >;
		var canInteract : Bool;
		equipmentSystem = ( ( EquipmentSystem )( GameInstance.GetScriptableSystemsContainer( playerPuppet.GetGame() ).Get( 'EquipmentSystem' ) ) );
		switch( itemData.GetEquipmentArea() )
		{
			case gamedataEquipmentArea.Consumable:
				canInteract = !( StatusEffectSystem.ObjectHasStatusEffectWithTag( playerPuppet, 'FistFight' ) );
			break;
			case gamedataEquipmentArea.Weapon:
				canInteract = !( ( ( StatusEffectSystem.ObjectHasStatusEffectWithTag( playerPuppet, 'VehicleScene' ) || StatusEffectSystem.ObjectHasStatusEffectWithTag( playerPuppet, 'FirearmsNoSwitch' ) ) || BlockedBySceneTier( playerPuppet ) ) || !( equipmentSystem.GetPlayerData( playerPuppet ).IsEquippable( itemData.GetItemData() ) ) );
			break;
			default:
				canInteract = true;
			break;
		}
		return canInteract;
	}

	public static function BlockedBySceneTier( playerPuppet : weak< PlayerPuppet > ) : Bool
	{
		var blackboardSystem : BlackboardSystem;
		var blackboard : IBlackboard;
		var value : Int32;
		blackboardSystem = GameInstance.GetBlackboardSystem( playerPuppet.GetGame() );
		blackboard = blackboardSystem.GetLocalInstanced( playerPuppet.GetEntityID(), GetAllBlackboardDefs().PlayerStateMachine );
		value = blackboard.GetInt( GetAllBlackboardDefs().PlayerStateMachine.HighLevel );
		return ( value > ( ( Int32 )( gamePSMHighLevel.SceneTier2 ) ) ) && ( value <= ( ( Int32 )( gamePSMHighLevel.SceneTier5 ) ) );
	}

}

import enum LootItemType : Uint8
{
	Default,
	Quest,
	Shard,
}

