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

Go to the source code of this file.

Data Structures

class  SCR_UniversalInventoryStorageComponentClass
 

Functions

SCR_UniversalInventoryStorageComponentClass UniversalInventoryStorageComponentClass Attribute ("0", UIWidgets.EditBox, "How much weight it can carry")] protected float m_fMaxWeight
 
float GetMaxLoad ()
 Returns how much weight the component can carry. More...
 
private SCR_ItemAttributeCollection GetAttributeCollection (IEntity item)
 
protected InventoryItemComponent GetItemComponent (IEntity pItem)
 
protected bool IsWeightOk (float fWeight)
 
override bool CanStoreItem (IEntity item, int slotID)
 
override bool CanStoreResource (ResourceName resourceName, int slotID)
 
override bool CanReplaceItem (IEntity nextItem, int slotID)
 
override void OnRemovedFromSlot (IEntity item, int slotID)
 
protected override void OnAddedToSlot (IEntity item, int slotID)
 
int GetLinkedStorages (notnull out array< BaseInventoryStorageComponent > linkedStorages)
 
void AddLinkedStorage (BaseInventoryStorageComponent newLinkedStorage)
 
bool IsStorageALinkedChild (notnull BaseInventoryStorageComponent storage)
 
override void OnManagerChanged (InventoryStorageManagerComponent manager)
 
void SCR_UniversalInventoryStorageComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 

Variables

protected ref array< intm_aSlotsToShow
 
protected ref SCR_BaseLinkedStorageLogic m_LinkedStorageLogic
 
protected ref array< BaseInventoryStorageComponent > m_aLinkedStorages
 Storages that will be automatically closed and opened when the parent (this) storage is closed or opened. More...
 
private SCR_ItemAttributeCollection m_Attributes
 
protected float m_fWeight
 
protected SCR_InventoryStorageManagerComponent pInventoryManager
 

Function Documentation

◆ AddLinkedStorage()

void AddLinkedStorage ( BaseInventoryStorageComponent  newLinkedStorage)

Add a linked storage to this storage

Parameters
[in]newLinkedStorageThe storage to link

Definition at line 220 of file SCR_UniversalInventoryStorageComponent.c.

◆ Attribute()

SCR_UniversalInventoryStorageComponentClass UniversalInventoryStorageComponentClass Attribute ( "0"  ,
UIWidgets.  EditBox,
"How much weight it can carry"   
)

Current storage variant allows dynamic scaling of slots and handles Move/Insert/Remove operations it will accept any entity for insertion and will remove/add it's visibility flag when inserted/removed from storage

See also
CharacterInventoryStorageComponent for example of custom storage inheritance from current class

◆ CanReplaceItem()

override bool CanReplaceItem ( IEntity  nextItem,
int  slotID 
)

Definition at line 117 of file SCR_UniversalInventoryStorageComponent.c.

◆ CanStoreItem()

override bool CanStoreItem ( IEntity  item,
int  slotID 
)

Definition at line 65 of file SCR_UniversalInventoryStorageComponent.c.

◆ CanStoreResource()

override bool CanStoreResource ( ResourceName  resourceName,
int  slotID 
)

Definition at line 93 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetAttributeCollection()

private SCR_ItemAttributeCollection GetAttributeCollection ( IEntity  item)

Definition at line 38 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetItemComponent()

protected InventoryItemComponent GetItemComponent ( IEntity  pItem)

Definition at line 48 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetLinkedStorages()

int GetLinkedStorages ( notnull out array< BaseInventoryStorageComponent >  linkedStorages)

Get a list of all linked storages of this storage

Parameters
[out]linkedStoragesLinked storages
Returns
Amount of linked storages

Definition at line 208 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetMaxLoad()

float GetMaxLoad ( )

Returns how much weight the component can carry.

Definition at line 32 of file SCR_UniversalInventoryStorageComponent.c.

◆ IsStorageALinkedChild()

bool IsStorageALinkedChild ( notnull BaseInventoryStorageComponent  storage)

Check if the given storage is a linked child storage

Parameters
[in]storageStorage to check return True if the storage is a linked child of this storage

Definition at line 239 of file SCR_UniversalInventoryStorageComponent.c.

◆ IsWeightOk()

protected bool IsWeightOk ( float  fWeight)

Definition at line 54 of file SCR_UniversalInventoryStorageComponent.c.

◆ SCR_UniversalInventoryStorageComponent()

void SCR_UniversalInventoryStorageComponent ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)
Parameters
[in]src
[in]ent
[in]parent

Definition at line 259 of file SCR_UniversalInventoryStorageComponent.c.

Variable Documentation

◆ m_aLinkedStorages

protected ref array<BaseInventoryStorageComponent> m_aLinkedStorages

Storages that will be automatically closed and opened when the parent (this) storage is closed or opened.

Definition at line 20 of file SCR_UniversalInventoryStorageComponent.c.

◆ m_aSlotsToShow

protected ref array<int> m_aSlotsToShow

Definition at line 14 of file SCR_UniversalInventoryStorageComponent.c.

◆ m_Attributes

private SCR_ItemAttributeCollection m_Attributes

Definition at line 23 of file SCR_UniversalInventoryStorageComponent.c.

◆ m_fWeight

protected float m_fWeight

Definition at line 24 of file SCR_UniversalInventoryStorageComponent.c.

◆ m_LinkedStorageLogic

protected ref SCR_BaseLinkedStorageLogic m_LinkedStorageLogic

Definition at line 17 of file SCR_UniversalInventoryStorageComponent.c.

◆ pInventoryManager

protected SCR_InventoryStorageManagerComponent pInventoryManager

Definition at line 25 of file SCR_UniversalInventoryStorageComponent.c.