Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_HandSlotStorageComponent Interface Reference
Inheritance diagram for SCR_HandSlotStorageComponent:
SCR_UniversalInventoryStorageComponent UniversalInventoryStorageComponent BaseUniversalInventoryStorageComponent ScriptedBaseInventoryStorageComponent BaseInventoryStorageComponent InventoryItemComponent GameComponent

Public Member Functions

override bool CanStoreItem (IEntity item, int slotID)
 Implemented logics for can insert here, Manager will provide slotID of -1 in case slot is irrelevant.
 
override bool CanStoreResource (ResourceName resourceName, int slotID)
 Implemented logics for can insert here, Manager will provide slotID of -1 in case slot is irrelevant.
 
override bool CanReplaceItem (IEntity nextItem, int slotID)
 Implemented logics for can replace to nextItem at slotID,.
 
IEntity GetHandSlotItem ()
 
void SkipAnimation_S ()
 Authority method used to inform others that this entity should skip the wait for the pick up animation.
 
void SkipAnimation ()
 When animation is not used then this will remove itself from animation event script invoker and continue the proces of handling hand slot item.
 
override void OnManagerChanged (InventoryStorageManagerComponent manager)
 Will be called when manager is changed, manager can be null if there is no manager in hierarchy (item drop in world).
 
- Public Member Functions inherited from SCR_UniversalInventoryStorageComponent
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 IsAdditionalWeightOk (float fWeight)
 
int GetLinkedStorages (notnull out array< BaseInventoryStorageComponent > linkedStorages)
 Get a list of all linked storages of this storage.
 
void AddLinkedStorage (BaseInventoryStorageComponent newLinkedStorage)
 Add a linked storage to this storage.
 
bool IsStorageALinkedChild (notnull BaseInventoryStorageComponent storage)
 Check if the given storage is a linked child storage.
 
int GetNonRefundableItemCount ()
 
void SetNonRefundableItemCount (int refundableItemCount)
 
void SCR_UniversalInventoryStorageComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
- Public Member Functions inherited from BaseInventoryStorageComponent
proto external bool Contains (IEntity item)
 Check if an item is inside this storage.
 
proto external InventoryStorageSlot FindItemSlot (IEntity item)
 Find the item slot.
 
proto external int GetSlotsCount ()
 Returns the number of slots in this storage.
 
proto external InventoryStorageSlot GetSlot (int slotID)
 Return slot for specified id.
 
proto external IEntity Get (int slotID)
 Get item at slot ID.
 
proto external int GetAll (out notnull array< IEntity > outItems)
 
proto external int GetPriority ()
 
proto external EStoragePurpose GetPurpose ()
 
proto external InventoryStorageSlot FindSuitableSlotForItem (IEntity item)
 
proto external bool IsCompartment ()
 does current storage serves as a compartment of other storage
 
proto external void GetOwnedItems (out notnull array< InventoryItemComponent > outItemsComponents)
 Fills array with attached items including items from storage compartments.
 
proto external bool GetOwnedStorages (out notnull array< BaseInventoryStorageComponent > outStorages, int depth, bool includeHierarchy)
 Fills array with attached storages up to provided hierarchy depth for every top level storage depth with even number will reach compartments level and odd will reach storages attached to slots (including compartment slots)
 
proto external float GetWeightFromResource (ResourceName resourceName)
 Get the weight of a prefab.
 
proto external vector GetMaxDimensionCapacity ()
 
proto external float GetMaxVolumeCapacity ()
 
proto external float GetOccupiedSpace ()
 Returns amount of space occupied by attached items.
 
proto external bool PerformDimensionValidation (IEntity item)
 Performs dimension validation.
 
proto external bool PerformVolumeValidation (IEntity item, bool includeDimensionValidation=true)
 Performs item volume and (optionally) dimension validation.
 
proto external bool PerformVolumeValidationForResource (ResourceName resourceName, bool includeDimensionValidation=true)
 Performs prefab volume and (optionally) dimension validation.
 
proto external int GetEstimatedCountFitForItem (IEntity item)
 Get an estimate of how many times the item can fit in the inventory.
 
proto external int GetEstimatedCountFitForResource (ResourceName resourceName)
 Get an estimate of how many times the resource can fit in the inventory.
 
bool OnOverrideCanStoreItem ()
 It should return true or false depending if the scripter wants to override the behavior of the C++ function or not.
 
bool OnOverrideCanStoreResource ()
 It should return true or false depending if the scripter wants to override the behavior of the C++ function or not.
 
bool OnOverrideCanRemoveItem ()
 It should return true or false depending if the scripter wants to override the behavior of the C++ function or not.
 
bool OnOverrideCanReplaceItem ()
 It should return true or false depending if the scripter wants to override the behavior of the C++ function or not.
 
bool CanRemoveItem (IEntity item)
 Implemented logics for can remove here,.
 
- Public Member Functions inherited from InventoryItemComponent
proto external IEntity GetOwner ()
 Returns Entity owner of current component instance.
 
proto external bool IsLocked ()
 Returns locked state of item (for both user and system locks)
 
proto external bool IsUserLocked ()
 
proto external bool IsSystemLocked ()
 
proto external InventoryStorageSlot GetParentSlot ()
 
proto external ItemAttributeCollection GetAttributes ()
 
proto external void HideOwner ()
 Hide owner entity.
 
proto external void ShowOwner ()
 Show owner entity.
 
proto external void SetTraceable (bool traceable)
 Set the entity to be traceable or not.
 
proto external void DisablePhysics ()
 Disable owners physical interactions.
 
proto external void EnablePhysics ()
 Enable owners physical interactions.
 
proto external void ActivateOwner (bool active)
 Enable/Disable entity active state.
 
proto external float GetAdditionalWeight ()
 Returns the current additional weight.
 
proto external void SetAdditionalWeight (float additionalWeight)
 IMPORTANT* Could only be called on the master.
 
proto external float GetTotalWeight ()
 Returns the weight + the additional weight.
 
proto external float GetAdditionalVolume ()
 Returns the current additional volume.
 
proto external void SetAdditionalVolume (float additionalVolume)
 IMPORTANT* Could only be called on the master.
 
proto external float GetTotalVolume ()
 Returns the volume + the additional volume.
 
proto external void PlaceOnGround (IEntity callerEntity=null)
 IMPORTANT* This function is heavy in performance because of the multiple traces used inside the function.
 
proto external bool IsHiddenInVicnity ()
 returns true if item should be hidden
 
proto external UIInfo GetUIInfo ()
 Returns UI info of this item.
 
proto external bool RequestUserLock (IEntity caller, bool locked)
 Set external lock on item optional caller is entity that manipulates with item and has inventory manager present (usually character)
 
proto external BaseItemAttributeData FindAttribute (TypeName typeName)
 Convinience method Finds first occurance of the coresponding attribute data object in owned PrefabData AttributeCollection.
 
proto external IEntity CreatePreviewEntity (BaseWorld world, int camera)
 Creates preview entity in the provided world.
 
void OnDelete (IEntity owner)
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Member Functions

override InventoryStorageSlot GetEmptySlotForItem (IEntity item)
 Usually any slot that item can be inserted to.
 
override void OnAddedToSlot (IEntity item, int slotID)
 Will be called when item is added to slot.
 
void DelayedOnAddedToSlot (IEntity item)
 
void RPC_DoSkipAnimation ()
 
void OnAnimationEvent (AnimationEventID animEventType, AnimationEventID animUserString, int intParam, float timeFromStart, float timeToEnd)
 Callback called when animation event happens.
 
override void OnRemovedFromSlot (IEntity item, int slotID)
 Will be called when item is removed from slot IMPORTANT* This is called after the C++ event.
 
- Protected Member Functions inherited from SCR_UniversalInventoryStorageComponent
bool CheckParentWeightLimit (float weight)
 Checks if parent container will allow for storing provided amount of additional weight.
 
InventoryItemComponent GetItemComponent (IEntity pItem)
 
- Protected Member Functions inherited from ScriptedBaseInventoryStorageComponent
override void UpdateUI ()
 Virtual method for updating the UI when an item is removed/added.
 
- Protected Member Functions inherited from BaseInventoryStorageComponent
proto external void SetupSlotHooks (InventoryStorageSlot ownedSlot, int slotID)
 IMPORTANT* Should be called upon initialization of slot instance provide newly created slot and desired slot ID.
 
proto external void ReleaseSlotHooks (InventoryStorageSlot ownedSlot)
 IMPORTANT* Should be called before transfering ownership of holded slot instance In majority of cases should be unnecessary (when storage manages creation and destruction of slots on its own)
 
int GetSlotsCountScr ()
 Should Return slots count.
 
InventoryStorageSlot GetSlotScr (int slotID)
 Should Return slot for specified id.
 
ref BaseInventoryTask RemoveItem (IEntity item)
 Called locally per instance, implement remove logics here.
 
ref BaseInventoryTask InsertItem (IEntity item, int slotID)
 Called locally per instance, implement insertion logics here, Manager will provide slotID of -1 in case slot is irrelevant.
 
bool ShouldPreviewAttachedItems ()
 Will be called to estimate if storage children has to be included in preview.
 
- Protected Member Functions inherited from InventoryItemComponent
bool ShouldChangeVisibilityOfHierarchy ()
 
bool ShouldHideInVicinity ()
 implement custom visibility behavior in vicinity
 
bool OverridePlacementTransform (IEntity caller, out vector computedTransform[4])
 Override final transformation of dropped item, return true in case transformation should be applied.
 

Protected Attributes

bool m_bSkipNextWaitForAnimation
 
IEntity m_HandSlotItem
 
RplComponent m_RplComponent
 
AnimationEventID m_iGestureAnimationEndEvent = -1
 
SCR_CharacterInventoryStorageComponent m_CharacterInventory
 
- Protected Attributes inherited from SCR_UniversalInventoryStorageComponent
float m_fMaxWeight
 
ref array< int > m_aSlotsToShow
 
ref SCR_BaseLinkedStorageLogic m_LinkedStorageLogic
 
ref array< BaseInventoryStorageComponentm_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
 

Static Protected Attributes

static const string ANIM_EVENT_NAME_FIRE = "Character_RefreshIK"
 
static const string VAR_CAN_BE_HELD_NAME = "m_bCanBeHeld"
 
- Static Protected Attributes inherited from SCR_UniversalInventoryStorageComponent
static const int MIN_VOLUME_TO_SHOW_ITEM_IN_SLOT = 200000
 in cm^3
 

Additional Inherited Members

- Public Attributes inherited from InventoryItemComponent
ref ScriptInvoker< bool > m_OnLockedStateChangedInvoker = new ScriptInvoker<bool>()
 
ref ScriptInvoker< InventoryStorageSlot, InventoryStorageSlotm_OnParentSlotChangedInvoker = new ScriptInvoker<InventoryStorageSlot, InventoryStorageSlot>()
 

Member Function Documentation

◆ CanReplaceItem()

override bool SCR_HandSlotStorageComponent.CanReplaceItem ( IEntity nextItem,
int slotID )

Implemented logics for can replace to nextItem at slotID,.

Implements SCR_UniversalInventoryStorageComponent.

◆ CanStoreItem()

override bool SCR_HandSlotStorageComponent.CanStoreItem ( IEntity item,
int slotID )

Implemented logics for can insert here, Manager will provide slotID of -1 in case slot is irrelevant.

Implements SCR_UniversalInventoryStorageComponent.

◆ CanStoreResource()

override bool SCR_HandSlotStorageComponent.CanStoreResource ( ResourceName resourceName,
int slotID )

Implemented logics for can insert here, Manager will provide slotID of -1 in case slot is irrelevant.

Implements SCR_UniversalInventoryStorageComponent.

◆ DelayedOnAddedToSlot()

void SCR_HandSlotStorageComponent.DelayedOnAddedToSlot ( IEntity item)
protected

◆ GetEmptySlotForItem()

override InventoryStorageSlot SCR_HandSlotStorageComponent.GetEmptySlotForItem ( IEntity item)
protected

Usually any slot that item can be inserted to.

Implements BaseInventoryStorageComponent.

◆ GetHandSlotItem()

IEntity SCR_HandSlotStorageComponent.GetHandSlotItem ( )

◆ OnAddedToSlot()

override void SCR_HandSlotStorageComponent.OnAddedToSlot ( IEntity item,
int slotID )
protected

Will be called when item is added to slot.

IMPORTANT* This is called after the C++ event.

Implements SCR_UniversalInventoryStorageComponent.

◆ OnAnimationEvent()

void SCR_HandSlotStorageComponent.OnAnimationEvent ( AnimationEventID animEventType,
AnimationEventID animUserString,
int intParam,
float timeFromStart,
float timeToEnd )
protected

Callback called when animation event happens.

Parameters
[in]animEventTypeID of animation event.
[in]animUserStringString parameter of animation event
[in]intParamint parameter of animation event
[in]timeFromStarttime from Start of animation event
[in]timeToEndtime to end of animation event

◆ OnManagerChanged()

override void SCR_HandSlotStorageComponent.OnManagerChanged ( InventoryStorageManagerComponent manager)

Will be called when manager is changed, manager can be null if there is no manager in hierarchy (item drop in world).

IMPORTANT* This is called after the C++ event.

Implements SCR_UniversalInventoryStorageComponent.

◆ OnRemovedFromSlot()

override void SCR_HandSlotStorageComponent.OnRemovedFromSlot ( IEntity item,
int slotID )
protected

Will be called when item is removed from slot IMPORTANT* This is called after the C++ event.

Implements SCR_UniversalInventoryStorageComponent.

◆ RPC_DoSkipAnimation()

void SCR_HandSlotStorageComponent.RPC_DoSkipAnimation ( )
protected

◆ SkipAnimation()

void SCR_HandSlotStorageComponent.SkipAnimation ( )

When animation is not used then this will remove itself from animation event script invoker and continue the proces of handling hand slot item.

◆ SkipAnimation_S()

void SCR_HandSlotStorageComponent.SkipAnimation_S ( )

Authority method used to inform others that this entity should skip the wait for the pick up animation.

Member Data Documentation

◆ ANIM_EVENT_NAME_FIRE

const string SCR_HandSlotStorageComponent.ANIM_EVENT_NAME_FIRE = "Character_RefreshIK"
staticprotected

◆ m_bSkipNextWaitForAnimation

bool SCR_HandSlotStorageComponent.m_bSkipNextWaitForAnimation
protected

◆ m_CharacterInventory

SCR_CharacterInventoryStorageComponent SCR_HandSlotStorageComponent.m_CharacterInventory
protected

◆ m_HandSlotItem

IEntity SCR_HandSlotStorageComponent.m_HandSlotItem
protected

◆ m_iGestureAnimationEndEvent

AnimationEventID SCR_HandSlotStorageComponent.m_iGestureAnimationEndEvent = -1
protected

◆ m_RplComponent

RplComponent SCR_HandSlotStorageComponent.m_RplComponent
protected

◆ VAR_CAN_BE_HELD_NAME

const string SCR_HandSlotStorageComponent.VAR_CAN_BE_HELD_NAME = "m_bCanBeHeld"
staticprotected

The documentation for this interface was generated from the following file: