Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_UniversalInventoryStorageComponent.c File Reference

Go to the source code of this file.

Classes

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.
int GetEstimatedCountFitForResourceWeight (ResourceName prefab)
 Get an estimate of how many times the resource can fit in in this storage.
bool CheckParentWeightLimit (float weight)
InventoryItemComponent GetItemComponent (IEntity pItem)
bool IsAdditionalWeightOk (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)
override void OnAddedToSlot (IEntity item, int slotID)
int GetLinkedStorages (notnull out array< BaseInventoryStorageComponent > linkedStorages)
void AddLinkedStorage (BaseInventoryStorageComponent newLinkedStorage)
bool IsStorageALinkedChild (notnull BaseInventoryStorageComponent storage)
int GetNonRefundableItemCount ()
void SetNonRefundableItemCount (int refundableItemCount)
override void OnManagerChanged (InventoryStorageManagerComponent manager)
void SCR_UniversalInventoryStorageComponent (IEntityComponentSource src, IEntity ent, IEntity parent)

Variables

ref array< intm_aSlotsToShow
ref SCR_BaseLinkedStorageLogic m_LinkedStorageLogic
ref array< BaseInventoryStorageComponent > m_aLinkedStorages
 Storages that will be automatically closed and opened when the parent (this) storage is closed or opened.
float m_fWeight
SCR_InventoryStorageManagerComponent pInventoryManager
int m_iNrOfNonRefundableItems = 0

Function Documentation

◆ AddLinkedStorage()

void AddLinkedStorage ( BaseInventoryStorageComponent newLinkedStorage)
protected

Add a linked storage to this storage

Parameters
[in]newLinkedStorageThe storage to link

Definition at line 284 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 )
protected

Definition at line 168 of file SCR_UniversalInventoryStorageComponent.c.

◆ CanStoreItem()

override bool CanStoreItem ( IEntity item,
int slotID )
protected

Definition at line 97 of file SCR_UniversalInventoryStorageComponent.c.

◆ CanStoreResource()

override bool CanStoreResource ( ResourceName resourceName,
int slotID )
protected

Definition at line 137 of file SCR_UniversalInventoryStorageComponent.c.

◆ CheckParentWeightLimit()

bool CheckParentWeightLimit ( float weight)
protected

Checks if parent container will allow for storing provided amount of additional weight

Parameters
[in]weight

Definition at line 56 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetEstimatedCountFitForResourceWeight()

int GetEstimatedCountFitForResourceWeight ( ResourceName prefab)
protected

Get an estimate of how many times the resource can fit in in this storage.

Definition at line 41 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetItemComponent()

InventoryItemComponent GetItemComponent ( IEntity pItem)
protected

Definition at line 80 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetLinkedStorages()

int GetLinkedStorages ( notnull out array< BaseInventoryStorageComponent > linkedStorages)
protected

Get a list of all linked storages of this storage

Parameters
[out]linkedStoragesLinked storages
Returns
Amount of linked storages

Definition at line 272 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetMaxLoad()

float GetMaxLoad ( )
protected

Returns how much weight the component can carry.

Definition at line 34 of file SCR_UniversalInventoryStorageComponent.c.

◆ GetNonRefundableItemCount()

int GetNonRefundableItemCount ( )
protected

Definition at line 309 of file SCR_UniversalInventoryStorageComponent.c.

◆ IsAdditionalWeightOk()

bool IsAdditionalWeightOk ( float fWeight)
protected

Definition at line 86 of file SCR_UniversalInventoryStorageComponent.c.

◆ IsStorageALinkedChild()

bool IsStorageALinkedChild ( notnull BaseInventoryStorageComponent storage)
protected

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 303 of file SCR_UniversalInventoryStorageComponent.c.

◆ SCR_UniversalInventoryStorageComponent()

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

Definition at line 335 of file SCR_UniversalInventoryStorageComponent.c.

◆ SetNonRefundableItemCount()

void SetNonRefundableItemCount ( int refundableItemCount)
protected

Definition at line 315 of file SCR_UniversalInventoryStorageComponent.c.

Variable Documentation

◆ m_aLinkedStorages

ref array<BaseInventoryStorageComponent> m_aLinkedStorages
protected

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

ref array<int> m_aSlotsToShow
protected

Definition at line 14 of file SCR_UniversalInventoryStorageComponent.c.

◆ m_fWeight

float m_fWeight
protected

Definition at line 24 of file SCR_UniversalInventoryStorageComponent.c.

◆ m_iNrOfNonRefundableItems

int m_iNrOfNonRefundableItems = 0
protected

Definition at line 28 of file SCR_UniversalInventoryStorageComponent.c.

◆ m_LinkedStorageLogic

ref SCR_BaseLinkedStorageLogic m_LinkedStorageLogic
protected

Definition at line 17 of file SCR_UniversalInventoryStorageComponent.c.

◆ pInventoryManager

SCR_InventoryStorageManagerComponent pInventoryManager
protected

Definition at line 25 of file SCR_UniversalInventoryStorageComponent.c.