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

Public Member Functions

RplId GetParentRplId ()
 
int GetParentNodeId ()
 
void PlaceItem ()
 
void SetPlacementPosition (vector right, vector up, vector forward, vector position, RplId characterRplId)
 Authority method used to change the position at which item will placed when removed from the inventory.
 
override bool OverridePlacementTransform (IEntity caller, out vector computedTransform[4])
 Override final transformation of dropped item, return true in case transformation should be applied.
 
void PlaceItemWithParentChange (RplId newParentRplId, int nodeId=-1)
 Same as PlaceItem but with params that allow attaching the object to new parent entity.
 
void SetNewParent (RplId parentId=RplId.Invalid(), int nodeId=-1)
 Method for updating parent when proxy streams in placeable item.
 
override void OnDelete (IEntity owner)
 
- 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 ()
 

Static Public Member Functions

static ScriptInvokerItemPlaced GetOnPlacementDoneInvoker ()
 

Protected Member Functions

void PlacementDone (notnull ChimeraCharacter user)
 
void RPC_DoPlaceItem (RplId placingCharacterRplId)
 
bool ValidateEntity (notnull IEntity entity)
 
bool FilterCallback (notnull IEntity e)
 
void PlayPlacedSound (vector up, vector position)
 
void RPC_DoPlaceItemWithParentChange (RplId newParentRplId, int nodeId, RplId placingCharacterRplId)
 
void AttachToNewParentWhenUnlocked (bool nowLocked)
 Method that will try to find new parent entity and make this entity a child of it.
 
void AttachToNewParent ()
 Method that will try to find new parent entity and make this entity a child of it.
 
void OnParentDamageStateChanged (SCR_HitZone hitZone)
 Method that is meant to be added to the parent default hit zone in order to detect when it is destroyed.
 
void DetachFromParent ()
 Removes this entity from its parent hierarchy and places it on the ground.
 
void StartWatchingParentSlots ()
 Callback method triggered when item will finish its transfer to new parent when it is being attached to it.
 
void StopWatchingParentSlots ()
 Callback method when item is being transfered (f.e. picked up) after it was attached to some object.
 
- Protected Member Functions inherited from InventoryItemComponent
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

vector m_vMat [4]
 
bool m_bUseTransform = false
 
RplId m_ParentRplId = RplId.Invalid()
 
RplId m_PlacingCharacterRplId = RplId.Invalid()
 
int m_iParentNodeId
 
IEntity m_Parent
 
IEntity m_RootParent
 

Static Protected Attributes

static ref ScriptInvokerItemPlaced s_OnPlacementDoneInvoker
 

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

◆ AttachToNewParent()

void SCR_PlaceableInventoryItemComponent.AttachToNewParent ( )
protected

Method that will try to find new parent entity and make this entity a child of it.

◆ AttachToNewParentWhenUnlocked()

void SCR_PlaceableInventoryItemComponent.AttachToNewParentWhenUnlocked ( bool  nowLocked)
protected

Method that will try to find new parent entity and make this entity a child of it.

Parameters
[in]nowLocked

◆ DetachFromParent()

void SCR_PlaceableInventoryItemComponent.DetachFromParent ( )
protected

Removes this entity from its parent hierarchy and places it on the ground.

◆ FilterCallback()

bool SCR_PlaceableInventoryItemComponent.FilterCallback ( notnull IEntity  e)
protected
Parameters
[in]e
Returns

◆ GetOnPlacementDoneInvoker()

static ScriptInvokerItemPlaced SCR_PlaceableInventoryItemComponent.GetOnPlacementDoneInvoker ( )
static
Returns

◆ GetParentNodeId()

int SCR_PlaceableInventoryItemComponent.GetParentNodeId ( )
Returns

◆ GetParentRplId()

RplId SCR_PlaceableInventoryItemComponent.GetParentRplId ( )
Returns

◆ OnDelete()

override void SCR_PlaceableInventoryItemComponent.OnDelete ( IEntity  owner)

◆ OnParentDamageStateChanged()

void SCR_PlaceableInventoryItemComponent.OnParentDamageStateChanged ( SCR_HitZone  hitZone)
protected

Method that is meant to be added to the parent default hit zone in order to detect when it is destroyed.

Parameters
[in]hitZone

◆ OverridePlacementTransform()

override bool SCR_PlaceableInventoryItemComponent.OverridePlacementTransform ( IEntity  caller,
out vector  computedTransform[4] 
)

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

Implements InventoryItemComponent.

◆ PlaceItem()

void SCR_PlaceableInventoryItemComponent.PlaceItem ( )

◆ PlaceItemWithParentChange()

void SCR_PlaceableInventoryItemComponent.PlaceItemWithParentChange ( RplId  newParentRplId,
int  nodeId = -1 
)

Same as PlaceItem but with params that allow attaching the object to new parent entity.

◆ PlacementDone()

void SCR_PlaceableInventoryItemComponent.PlacementDone ( notnull ChimeraCharacter  user)
protected
Parameters
[in]userthat placed this item

Implemented in SCR_MineInventoryItemComponent.

◆ PlayPlacedSound()

void SCR_PlaceableInventoryItemComponent.PlayPlacedSound ( vector  up,
vector  position 
)
protected
Parameters
[in]up
[in]position

◆ RPC_DoPlaceItem()

void SCR_PlaceableInventoryItemComponent.RPC_DoPlaceItem ( RplId  placingCharacterRplId)
protected

◆ RPC_DoPlaceItemWithParentChange()

void SCR_PlaceableInventoryItemComponent.RPC_DoPlaceItemWithParentChange ( RplId  newParentRplId,
int  nodeId,
RplId  placingCharacterRplId 
)
protected
Parameters
[in]newParentRplId
[in]nodeId

◆ SetNewParent()

void SCR_PlaceableInventoryItemComponent.SetNewParent ( RplId  parentId = RplId::Invalid(),
int  nodeId = -1 
)

Method for updating parent when proxy streams in placeable item.

Parameters
[in]parentIdreplication id of a entity to which this item should be attached
[in]nodeIdid of a node to which this item will be attached to

◆ SetPlacementPosition()

void SCR_PlaceableInventoryItemComponent.SetPlacementPosition ( vector  right,
vector  up,
vector  forward,
vector  position,
RplId  characterRplId 
)

Authority method used to change the position at which item will placed when removed from the inventory.

◆ StartWatchingParentSlots()

void SCR_PlaceableInventoryItemComponent.StartWatchingParentSlots ( )
protected

Callback method triggered when item will finish its transfer to new parent when it is being attached to it.

◆ StopWatchingParentSlots()

void SCR_PlaceableInventoryItemComponent.StopWatchingParentSlots ( )
protected

Callback method when item is being transfered (f.e. picked up) after it was attached to some object.

◆ ValidateEntity()

bool SCR_PlaceableInventoryItemComponent.ValidateEntity ( notnull IEntity  entity)
protected
Parameters
[in]entity
Returns

Member Data Documentation

◆ m_bUseTransform

bool SCR_PlaceableInventoryItemComponent.m_bUseTransform = false
protected

◆ m_iParentNodeId

int SCR_PlaceableInventoryItemComponent.m_iParentNodeId
protected

◆ m_Parent

IEntity SCR_PlaceableInventoryItemComponent.m_Parent
protected

◆ m_ParentRplId

RplId SCR_PlaceableInventoryItemComponent.m_ParentRplId = RplId.Invalid()
protected

◆ m_PlacingCharacterRplId

RplId SCR_PlaceableInventoryItemComponent.m_PlacingCharacterRplId = RplId.Invalid()
protected

◆ m_RootParent

IEntity SCR_PlaceableInventoryItemComponent.m_RootParent
protected

◆ m_vMat

vector SCR_PlaceableInventoryItemComponent.m_vMat[4]
protected

◆ s_OnPlacementDoneInvoker

ref ScriptInvokerItemPlaced SCR_PlaceableInventoryItemComponent.s_OnPlacementDoneInvoker
staticprotected

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