Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
InventoryItemComponent Interface Reference
Inheritance diagram for InventoryItemComponent:
[legend]

Public Member Functions

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 ()
 

Public Attributes

ref ScriptInvoker< bool > m_OnLockedStateChangedInvoker = new ScriptInvoker<bool>()
 
ref ScriptInvoker< InventoryStorageSlot, InventoryStorageSlotm_OnParentSlotChangedInvoker = new ScriptInvoker<InventoryStorageSlot, InventoryStorageSlot>()
 

Protected Member Functions

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.
 

Member Function Documentation

◆ ActivateOwner()

proto external void InventoryItemComponent.ActivateOwner ( bool  active)

Enable/Disable entity active state.

◆ CreatePreviewEntity()

proto external IEntity InventoryItemComponent.CreatePreviewEntity ( BaseWorld  world,
int  camera 
)

Creates preview entity in the provided world.

◆ DisablePhysics()

proto external void InventoryItemComponent.DisablePhysics ( )

Disable owners physical interactions.

◆ EnablePhysics()

proto external void InventoryItemComponent.EnablePhysics ( )

Enable owners physical interactions.

◆ FindAttribute()

proto external BaseItemAttributeData InventoryItemComponent.FindAttribute ( TypeName  typeName)

Convinience method Finds first occurance of the coresponding attribute data object in owned PrefabData AttributeCollection.

Parameters
typeNametype of the component

◆ GetAdditionalVolume()

proto external float InventoryItemComponent.GetAdditionalVolume ( )

Returns the current additional volume.

◆ GetAdditionalWeight()

proto external float InventoryItemComponent.GetAdditionalWeight ( )

Returns the current additional weight.

◆ GetAttributes()

proto external ItemAttributeCollection InventoryItemComponent.GetAttributes ( )

◆ GetOwner()

proto external IEntity InventoryItemComponent.GetOwner ( )

Returns Entity owner of current component instance.

◆ GetParentSlot()

proto external InventoryStorageSlot InventoryItemComponent.GetParentSlot ( )

◆ GetTotalVolume()

proto external float InventoryItemComponent.GetTotalVolume ( )

Returns the volume + the additional volume.

◆ GetTotalWeight()

proto external float InventoryItemComponent.GetTotalWeight ( )

Returns the weight + the additional weight.

◆ GetUIInfo()

proto external UIInfo InventoryItemComponent.GetUIInfo ( )

Returns UI info of this item.

◆ HideOwner()

proto external void InventoryItemComponent.HideOwner ( )

Hide owner entity.

◆ IsHiddenInVicnity()

proto external bool InventoryItemComponent.IsHiddenInVicnity ( )

returns true if item should be hidden

◆ IsLocked()

proto external bool InventoryItemComponent.IsLocked ( )

Returns locked state of item (for both user and system locks)

◆ IsSystemLocked()

proto external bool InventoryItemComponent.IsSystemLocked ( )

◆ IsUserLocked()

proto external bool InventoryItemComponent.IsUserLocked ( )

◆ OnDelete()

void InventoryItemComponent.OnDelete ( IEntity  owner)

◆ OverridePlacementTransform()

bool InventoryItemComponent.OverridePlacementTransform ( IEntity  caller,
out vector  computedTransform[4] 
)
protected

Override final transformation of dropped item, return true in case transformation should be applied.

Implemented in SCR_PlaceableInventoryItemComponent.

◆ PlaceOnGround()

proto external void InventoryItemComponent.PlaceOnGround ( IEntity  callerEntity = null)

IMPORTANT* This function is heavy in performance because of the multiple traces used inside the function.

Place the item on the ground

Parameters
callerEntityThe entity used for the rotation calculation. Should be kept to null per default

◆ RequestUserLock()

proto external bool InventoryItemComponent.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)

◆ SetAdditionalVolume()

proto external void InventoryItemComponent.SetAdditionalVolume ( float  additionalVolume)

IMPORTANT* Could only be called on the master.

Set the additional volume of the item

Parameters
additionalVolumeadditional volume in cm3

◆ SetAdditionalWeight()

proto external void InventoryItemComponent.SetAdditionalWeight ( float  additionalWeight)

IMPORTANT* Could only be called on the master.

Set the additional weight of the item

Parameters
additionalWeightadditional weight in kg

◆ SetTraceable()

proto external void InventoryItemComponent.SetTraceable ( bool  traceable)

Set the entity to be traceable or not.

◆ ShouldHideInVicinity()

bool InventoryItemComponent.ShouldHideInVicinity ( )
protected

◆ ShowOwner()

proto external void InventoryItemComponent.ShowOwner ( )

Show owner entity.

Member Data Documentation

◆ m_OnLockedStateChangedInvoker

ref ScriptInvoker<bool> InventoryItemComponent.m_OnLockedStateChangedInvoker = new ScriptInvoker<bool>()

◆ m_OnParentSlotChangedInvoker

ref ScriptInvoker<InventoryStorageSlot, InventoryStorageSlot> InventoryItemComponent.m_OnParentSlotChangedInvoker = new ScriptInvoker<InventoryStorageSlot, InventoryStorageSlot>()

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