Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CharacterInventoryStorageComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_InvEquipCB
 
class  SCR_EquipGearCB
 

Enumerations

enum  EItemType
 

Functions

enum EItemType ComponentEditorProps (category:"GameScripted/Inventory", description:"Inventory 2.0", icon:HYBRID_COMPONENT_ICON)
 
protected override void OnComplete ()
 
protected override void OnFailed ()
 
SCR_EquipGearCB SCR_InvCallBack Attribute ("0", UIWidgets.EditBox, "How much weight the character can carry")] protected float m_fMaxWeight
 
float GetMaxLoad ()
 
BaseInventoryStorageComponent GetWeaponStorage ()
 
InventoryItemComponent GetItemFromLoadoutSlot (LoadoutAreaType eSlot)
 
BaseInventoryStorageComponent GetStorageFromLoadoutSlot (LoadoutAreaType eSlot)
 
protected bool HasStorageComponent (IEntity pEntity)
 
void GetStorages (out notnull array< SCR_UniversalInventoryStorageComponent > storagesInInventory)
 
void GetBlockedSlots (out notnull array< typename > blockedSlots)
 
SCR_UniversalInventoryStorageComponent GetStorageComponentFromEntity (IEntity pEntity)
 
void SetLootStorage (IEntity pOwner)
 
BaseInventoryStorageComponent GetLootStorage ()
 
bool GetIsStorageShown (notnull BaseInventoryStorageComponent pStorage)
 
void SetStorageAsShown (notnull BaseInventoryStorageComponent pStorage)
 
void SetStorageAsHidden (notnull BaseInventoryStorageComponent pStorage)
 
bool ItemBelongsToSlot (int iItemType, int iSlotIndex)
 
int GetLastQuickSlotId (IEntity ent)
 
int GetEntityQuickSlot (IEntity item)
 
bool IsItemAlreadyInQuickSlot (IEntity item)
 
int StoreItemToQuickSlot (notnull IEntity pItem, int iSlotIndex=-1, bool isForced=false)
 
int RemoveItemFromQuickSlot (IEntity pItem)
 
void RemoveItemFromQuickSlotAtIndex (int iIndex)
 
array< IEntity > GetQuickSlotItems ()
 
IEntity GetItemFromQuickSlot (int index)
 
IEntity GetCurrentItem ()
 
IEntity GetSelectedItem ()
 
void UnequipCurrentItem ()
 Unequip currently held item. Not allowed while switching to another item. More...
 
void DropCurrentItem ()
 Drop currently held item. Not allowed while switching to another item. More...
 
protected override void OnAddedToSlot (IEntity item, int slotID)
 
protected override void OnRemovedFromSlot (IEntity item, int slotID)
 
protected void UpdateBlockedSlots (IEntity item, int slotID, bool added)
 
bool IsAreaBlocked (typename areaType)
 
protected void EditArmoredAttributes (IEntity item, int slotID, bool remove=false)
 Take the data from the armor attribute, and store them in map on damagemanager. More...
 
void HandleOnItemAddedToInventory (IEntity item, BaseInventoryStorageComponent storageOwner)
 
void HandleOnItemRemovedFromInventory (IEntity item, BaseInventoryStorageComponent storageOwner)
 
bool CanEquipItem_Inventory (notnull IEntity item)
 
bool CanUseItem_Inventory (notnull IEntity item, ESlotFunction slotFunction=ESlotFunction.TYPE_GENERIC)
 
bool CanUseItem (notnull IEntity item, ESlotFunction slotFunction=ESlotFunction.TYPE_GENERIC)
 
bool UseItem (notnull IEntity item, ESlotFunction slotFunction=ESlotFunction.TYPE_GENERIC)
 
protected bool CanReloadCurrentWeapon (notnull IEntity item)
 
protected bool ReloadCurrentWeapon (IEntity item)
 
protected void GetPlayersWeapons (notnull inout array< IEntity > outWeapons)
 
protected BaseCompartmentSlot GetCurrentCompartment ()
 
protected BaseWeaponComponent GetCurrentTurretWeapon ()
 
void InitAsPlayer (IEntity pOwner, bool pControlled)
 
protected void OnItemUsed (IEntity item, bool successful, ItemUseParameters animParams)
 
protected void OnCompartmentEntered (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
protected void OnCompartmentLeft (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
protected void RemoveItemsFromWeaponQuickSlots ()
 
protected int GetTurretWeaponsList (BaseCompartmentSlot compartment, out array< IEntity > weaponsList)
 
protected int GetTurretWeaponSlots (BaseCompartmentSlot compartment, out array< WeaponSlotComponent > weaponSlots)
 

Variables

 IT_NONE = 16385
 
SCR_InvEquipCB m_InvMan
 
protected float m_fMaxVolume
 
private BaseInventoryStorageComponent m_LootStorage
 
protected ref array< IEntity > m_aQuickSlots = { null, null, null, null, null, null, null, null, null, null }
 
protected ref map< IEntity, intm_mSlotHistory = new map<IEntity, int>()
 
protected ref array< IEntity > m_aWeaponQuickSlotsStorage = {}
 
protected ref array< intm_aQuickSlotsHistory = {}
 
protected ref array< typename > m_aBlockedSlots = {}
 
protected ref array< BaseInventoryStorageComponent > m_aStoragesInStorageList = {}
 
protected SCR_CompartmentAccessComponent m_CompartmentAcessComp
 
protected BaseInventoryStorageComponent m_WeaponStorage
 
protected ref SCR_InvEquipCB m_Callback = new SCR_InvEquipCB()
 

Enumeration Type Documentation

◆ EItemType

enum EItemType

Definition at line 1 of file SCR_CharacterInventoryStorageComponent.c.

Function Documentation

◆ Attribute()

SCR_EquipGearCB SCR_InvCallBack Attribute ( "0"  ,
UIWidgets.  EditBox,
"How much weight the character can carry"   
)

◆ CanEquipItem_Inventory()

bool CanEquipItem_Inventory ( notnull IEntity  item)

Definition at line 684 of file SCR_CharacterInventoryStorageComponent.c.

◆ CanReloadCurrentWeapon()

protected bool CanReloadCurrentWeapon ( notnull IEntity  item)

Definition at line 1013 of file SCR_CharacterInventoryStorageComponent.c.

◆ CanUseItem()

bool CanUseItem ( notnull IEntity  item,
ESlotFunction  slotFunction = ESlotFunction.TYPE_GENERIC 
)
Parameters
[in]item
[in]slotFunction
Returns

Definition at line 780 of file SCR_CharacterInventoryStorageComponent.c.

◆ CanUseItem_Inventory()

bool CanUseItem_Inventory ( notnull IEntity  item,
ESlotFunction  slotFunction = ESlotFunction.TYPE_GENERIC 
)

Definition at line 713 of file SCR_CharacterInventoryStorageComponent.c.

◆ ComponentEditorProps()

enum EItemType ComponentEditorProps ( category:"GameScripted/Inventory"  ,
description:"Inventory 2.0"  ,
icon:HYBRID_COMPONENT_ICON   
)

Definition at line 6 of file SCR_CharacterInventoryStorageComponent.c.

◆ DropCurrentItem()

void DropCurrentItem ( )

Drop currently held item. Not allowed while switching to another item.

Definition at line 505 of file SCR_CharacterInventoryStorageComponent.c.

◆ EditArmoredAttributes()

protected void EditArmoredAttributes ( IEntity  item,
int  slotID,
bool  remove = false 
)

Take the data from the armor attribute, and store them in map on damagemanager.

Definition at line 646 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetBlockedSlots()

void GetBlockedSlots ( out notnull array< typename >  blockedSlots)
Parameters
[out]blockedSlots

Definition at line 182 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetCurrentCompartment()

protected BaseCompartmentSlot GetCurrentCompartment ( )

Definition at line 1086 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetCurrentItem()

IEntity GetCurrentItem ( )
Returns
currently held item. If character holds gadget, gadget is returned, otherwise current weapon.

Definition at line 446 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetCurrentTurretWeapon()

protected BaseWeaponComponent GetCurrentTurretWeapon ( )

Definition at line 1100 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetEntityQuickSlot()

int GetEntityQuickSlot ( IEntity  item)
Parameters
[in]item
Returns

Definition at line 297 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetIsStorageShown()

bool GetIsStorageShown ( notnull BaseInventoryStorageComponent  pStorage)
Parameters
[in]pStorage
Returns
the visibility state of the adequate UI container - if the storage was previously shown in the inventory

Definition at line 221 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetItemFromLoadoutSlot()

InventoryItemComponent GetItemFromLoadoutSlot ( LoadoutAreaType  eSlot)
Parameters
[in]eSlot
Returns

Definition at line 133 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetItemFromQuickSlot()

IEntity GetItemFromQuickSlot ( int  index)
Parameters
[in]index
Returns

Definition at line 436 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetLastQuickSlotId()

int GetLastQuickSlotId ( IEntity  ent)
Parameters
[in]ent
Returns

Definition at line 287 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetLootStorage()

BaseInventoryStorageComponent GetLootStorage ( )
Returns

Definition at line 213 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetMaxLoad()

float GetMaxLoad ( )
Returns

Definition at line 115 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetPlayersWeapons()

protected void GetPlayersWeapons ( notnull inout array< IEntity >  outWeapons)

Definition at line 1070 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetQuickSlotItems()

array<IEntity> GetQuickSlotItems ( )
Returns

Definition at line 428 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetSelectedItem()

IEntity GetSelectedItem ( )
Returns
selected item. If there is no active switching, currently held item is returned instead.

Definition at line 473 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetStorageComponentFromEntity()

SCR_UniversalInventoryStorageComponent GetStorageComponentFromEntity ( IEntity  pEntity)
Parameters
[in]pEntity
Returns
the item inventory component

Definition at line 190 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetStorageFromLoadoutSlot()

BaseInventoryStorageComponent GetStorageFromLoadoutSlot ( LoadoutAreaType  eSlot)
Parameters
[in]eSlot
Returns

Definition at line 152 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetStorages()

void GetStorages ( out notnull array< SCR_UniversalInventoryStorageComponent storagesInInventory)
Parameters
[out]storagesInInventory
Returns
all topmost storages

Definition at line 166 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetTurretWeaponsList()

protected int GetTurretWeaponsList ( BaseCompartmentSlot  compartment,
out array< IEntity >  weaponsList 
)

Definition at line 1360 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetTurretWeaponSlots()

protected int GetTurretWeaponSlots ( BaseCompartmentSlot  compartment,
out array< WeaponSlotComponent weaponSlots 
)

Definition at line 1374 of file SCR_CharacterInventoryStorageComponent.c.

◆ GetWeaponStorage()

BaseInventoryStorageComponent GetWeaponStorage ( )
Returns

Definition at line 122 of file SCR_CharacterInventoryStorageComponent.c.

◆ HandleOnItemAddedToInventory()

void HandleOnItemAddedToInventory ( IEntity  item,
BaseInventoryStorageComponent  storageOwner 
)
Parameters
[in]item
[in]storageOwner

Definition at line 666 of file SCR_CharacterInventoryStorageComponent.c.

◆ HandleOnItemRemovedFromInventory()

void HandleOnItemRemovedFromInventory ( IEntity  item,
BaseInventoryStorageComponent  storageOwner 
)
Parameters
[in]item
[in]storageOwner

Definition at line 677 of file SCR_CharacterInventoryStorageComponent.c.

◆ HasStorageComponent()

protected bool HasStorageComponent ( IEntity  pEntity)

Definition at line 158 of file SCR_CharacterInventoryStorageComponent.c.

◆ InitAsPlayer()

void InitAsPlayer ( IEntity  pOwner,
bool  pControlled 
)
Parameters
[in]pOwner
[in]pControlled

Definition at line 1121 of file SCR_CharacterInventoryStorageComponent.c.

◆ IsAreaBlocked()

bool IsAreaBlocked ( typename areaType  )
Parameters
[in]areaType
Returns

Definition at line 639 of file SCR_CharacterInventoryStorageComponent.c.

◆ IsItemAlreadyInQuickSlot()

bool IsItemAlreadyInQuickSlot ( IEntity  item)
Parameters
[in]item
Returns

Definition at line 312 of file SCR_CharacterInventoryStorageComponent.c.

◆ ItemBelongsToSlot()

bool ItemBelongsToSlot ( int  iItemType,
int  iSlotIndex 
)
Parameters
[in]iItemType
[in]iSlotIndex
Returns

Definition at line 279 of file SCR_CharacterInventoryStorageComponent.c.

◆ OnComplete()

protected override void OnComplete ( )

Definition at line 34 of file SCR_CharacterInventoryStorageComponent.c.

◆ OnFailed()

protected override void OnFailed ( )

Definition at line 43 of file SCR_CharacterInventoryStorageComponent.c.

◆ OnItemUsed()

protected void OnItemUsed ( IEntity  item,
bool  successful,
ItemUseParameters  animParams 
)

Definition at line 1202 of file SCR_CharacterInventoryStorageComponent.c.

◆ ReloadCurrentWeapon()

protected bool ReloadCurrentWeapon ( IEntity  item)

Definition at line 1053 of file SCR_CharacterInventoryStorageComponent.c.

◆ RemoveItemFromQuickSlot()

int RemoveItemFromQuickSlot ( IEntity  pItem)
Parameters
[in]pItem
Returns

Definition at line 408 of file SCR_CharacterInventoryStorageComponent.c.

◆ RemoveItemFromQuickSlotAtIndex()

void RemoveItemFromQuickSlotAtIndex ( int  iIndex)
Parameters
[in]iIndex

Definition at line 420 of file SCR_CharacterInventoryStorageComponent.c.

◆ RemoveItemsFromWeaponQuickSlots()

protected void RemoveItemsFromWeaponQuickSlots ( )

Definition at line 1351 of file SCR_CharacterInventoryStorageComponent.c.

◆ SetLootStorage()

void SetLootStorage ( IEntity  pOwner)
Parameters
[in]pOwner

Definition at line 200 of file SCR_CharacterInventoryStorageComponent.c.

◆ SetStorageAsHidden()

void SetStorageAsHidden ( notnull BaseInventoryStorageComponent  pStorage)
Parameters
[in]pStorage

Definition at line 236 of file SCR_CharacterInventoryStorageComponent.c.

◆ SetStorageAsShown()

void SetStorageAsShown ( notnull BaseInventoryStorageComponent  pStorage)
Parameters
[in]pStorage

Definition at line 228 of file SCR_CharacterInventoryStorageComponent.c.

◆ StoreItemToQuickSlot()

int StoreItemToQuickSlot ( notnull IEntity  pItem,
int  iSlotIndex = -1,
bool  isForced = false 
)
Parameters
[in]pItem
[in]iSlotIndex
[in]isForced
Returns

Definition at line 331 of file SCR_CharacterInventoryStorageComponent.c.

◆ UnequipCurrentItem()

void UnequipCurrentItem ( )

Unequip currently held item. Not allowed while switching to another item.

Definition at line 484 of file SCR_CharacterInventoryStorageComponent.c.

◆ UpdateBlockedSlots()

protected void UpdateBlockedSlots ( IEntity  item,
int  slotID,
bool  added 
)

Definition at line 607 of file SCR_CharacterInventoryStorageComponent.c.

◆ UseItem()

bool UseItem ( notnull IEntity  item,
ESlotFunction  slotFunction = ESlotFunction.TYPE_GENERIC 
)
Parameters
[in]item
[in]slotFunction
Returns

Definition at line 843 of file SCR_CharacterInventoryStorageComponent.c.

Variable Documentation

◆ IT_NONE

IT_NONE = 16385

Definition at line 2 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_aBlockedSlots

protected ref array<typename> m_aBlockedSlots = {}

Definition at line 101 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_aQuickSlots

protected ref array<IEntity> m_aQuickSlots = { null, null, null, null, null, null, null, null, null, null }

Definition at line 74 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_aQuickSlotsHistory

protected ref array< int > m_aQuickSlotsHistory = {}

Definition at line 77 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_aStoragesInStorageList

protected ref array<BaseInventoryStorageComponent> m_aStoragesInStorageList = {}

Definition at line 102 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_aWeaponQuickSlotsStorage

protected ref array<IEntity> m_aWeaponQuickSlotsStorage = {}

Definition at line 76 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_Callback

protected ref SCR_InvEquipCB m_Callback = new SCR_InvEquipCB()

Definition at line 106 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_CompartmentAcessComp

protected SCR_CompartmentAccessComponent m_CompartmentAcessComp

Definition at line 103 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_fMaxVolume

protected float m_fMaxVolume

Definition at line 69 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_InvMan

SCR_InvEquipCB m_InvMan

◆ m_LootStorage

private BaseInventoryStorageComponent m_LootStorage

Definition at line 73 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_mSlotHistory

protected ref map<IEntity, int> m_mSlotHistory = new map<IEntity, int>()

Definition at line 75 of file SCR_CharacterInventoryStorageComponent.c.

◆ m_WeaponStorage

protected BaseInventoryStorageComponent m_WeaponStorage

Definition at line 104 of file SCR_CharacterInventoryStorageComponent.c.