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

Go to the source code of this file.

Classes

class  SCR_ItemPlacementComponentClass

Functions

SCR_ItemPlacementComponentClass ScriptComponentClass Attribute ("{56EBF5038622AC95}Assets/Conflict/CanBuild.emat")
void RPC_AskSetPlacementPosition (vector right, vector up, vector forward, vector position, RplId placeableId, RplId characterId)
void RPC_AskPlaceItem (RplId placeableId)
void RPC_AskPlaceItemWithParentChange (RplId placeableId, RplId targetId, int nodeId)
void UnregisterEvents (IEntity from)
void RegisterEvents (IEntity to)
void OnControlledEntityChanged (IEntity from, IEntity to)
 Runs every time the controlled entity has been changed.
void ForcePlaceItem ()
 Callback method triggered by button press.
void StartPlaceItem ()
 Callback method triggered by button press.
void OnPlacingEnded (IEntity item, bool successful, ItemUseParameters animParams)
void AskPlaceItem (RplId placeableId, RplId targetId, int nodeId, bool isBeingAttachedToEntity)
void ValidateTargetEntityExistance ()
void SetPlacedItem (IEntity item)
void SetPreviewEntity (IEntity preview, bool deleteOldPreview=true)
void SetPlaceableItemComponent (SCR_PlaceableItemComponent placeableItemComp)
SCR_PlaceableItemComponent GetPlaceableItemComponent ()
void EnablePlacement (bool enabled)
void DisablePreview ()
void EnablePreview (IEntity weapon)
void OnComparmentEntered (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
void GetOnCompartmentLeft ()
IEntity GetWeaponFromWeaponComponent (BaseWeaponComponent weaponComponent)
void OnWeaponChangeEnded (BaseWeaponComponent newWeaponSlot)
void OnWeaponChanged (BaseWeaponComponent newWeaponSlot)
void OnCharacterDeath (SCR_CharacterControllerComponent characterController, IEntity killerEntity, notnull Instigator killer)
void TogglePreview (IEntity weapon)
override void EOnFrame (IEntity owner, float timeSlice)
void UseXZFixedPlacement (IEntity owner, float maxPlacementDistance, vector cameraMat[4])
bool FilterCallback (IEntity e)
void UseXYZPlacement (IEntity owner, float maxPlacementDistance, vector cameraMat[4])
bool ValidateEntity (notnull IEntity entity)
void ValidatePlacement (vector up, IEntity tracedEntity, BaseWorld world, IEntity character, out ENotification cantPlaceReason)
bool TraceEntitiesCallback (notnull IEntity e, vector start="0 0 0", vector dir="0 0 0")
void OnEditorOpened ()
void OnEditorClosed ()
void RegisterToManagerInvokers (SCR_EditorManagerEntity manager)
override void OnPostInit (IEntity owner)
 Editable Mine.
void InitEditorListeners ()
override void EOnInit (IEntity owner)
void SCR_ItemPlacementComponent (IEntityComponentSource src, IEntity ent, IEntity parent)

Variables

ResourceName m_sCannotBuildMaterial
ResourceName m_sTransparentMaterial
int m_iEquipComplete
int m_iTargetEntityNodeID
bool m_bInEditor
bool m_bIsBeingAttachedToEntity
vector m_vCurrentMat [4]
vector m_aCamDeploymentPosition [4]
IEntity m_PlacedItem
ENotification m_eCantPlaceReason
SCR_PlaceableItemComponent m_PlaceableItem
IEntity m_PreviewEntity
SCR_CompartmentAccessComponent m_CompartmnetAccessComponent
RplId m_TargetId
IEntity m_TargetEntity

Function Documentation

◆ AskPlaceItem()

void AskPlaceItem ( RplId placeableId,
RplId targetId,
int nodeId,
bool isBeingAttachedToEntity )
protected

Client side method for finishing item placement when that item was successfully removed from their inventory

Parameters
[in]placeableIdreplication id of placed item
[in]targetIdreplication id of object to which this item is being attached to
[in]nodeIdnode of the target object to which placed item will be attached to
[in]isBeingAttachedToEntity

Definition at line 374 of file SCR_ItemPlacementComponent.c.

◆ Attribute()

SCR_ItemPlacementComponentClass ScriptComponentClass Attribute ( "{56EBF5038622AC95}Assets/Conflict/CanBuild.emat" )

Definition at line 1 of file SCR_ItemPlacementComponent.c.

◆ DisablePreview()

void DisablePreview ( )
protected

Definition at line 499 of file SCR_ItemPlacementComponent.c.

◆ EnablePlacement()

void EnablePlacement ( bool enabled)
protected

Enable listening for actions and position validation

Parameters
[in]enabledtrue when placement should be enabled, otherwise false

Definition at line 480 of file SCR_ItemPlacementComponent.c.

◆ EnablePreview()

void EnablePreview ( IEntity weapon)
protected

Definition at line 506 of file SCR_ItemPlacementComponent.c.

◆ EOnFrame()

override void EOnFrame ( IEntity owner,
float timeSlice )
protected

Definition at line 589 of file SCR_ItemPlacementComponent.c.

◆ FilterCallback()

bool FilterCallback ( IEntity e)
protected

Definition at line 677 of file SCR_ItemPlacementComponent.c.

◆ ForcePlaceItem()

void ForcePlaceItem ( )
protected

Callback method triggered by button press.

Definition at line 219 of file SCR_ItemPlacementComponent.c.

◆ GetOnCompartmentLeft()

void GetOnCompartmentLeft ( )
protected

Definition at line 527 of file SCR_ItemPlacementComponent.c.

◆ GetPlaceableItemComponent()

SCR_PlaceableItemComponent GetPlaceableItemComponent ( )
protected
Returns
currently used component for placing an item

Definition at line 472 of file SCR_ItemPlacementComponent.c.

◆ GetWeaponFromWeaponComponent()

IEntity GetWeaponFromWeaponComponent ( BaseWeaponComponent weaponComponent)
protected
Parameters
[in]weaponComponent
Returns

Definition at line 535 of file SCR_ItemPlacementComponent.c.

◆ InitEditorListeners()

void InitEditorListeners ( )
protected

Definition at line 963 of file SCR_ItemPlacementComponent.c.

◆ OnCharacterDeath()

void OnCharacterDeath ( SCR_CharacterControllerComponent characterController,
IEntity killerEntity,
notnull Instigator killer )
protected

Definition at line 559 of file SCR_ItemPlacementComponent.c.

◆ OnComparmentEntered()

void OnComparmentEntered ( IEntity targetEntity,
BaseCompartmentManagerComponent manager,
int mgrID,
int slotID,
bool move )
protected

Definition at line 521 of file SCR_ItemPlacementComponent.c.

◆ OnEditorClosed()

void OnEditorClosed ( )
protected

Definition at line 943 of file SCR_ItemPlacementComponent.c.

◆ OnEditorOpened()

void OnEditorOpened ( )
protected

Definition at line 936 of file SCR_ItemPlacementComponent.c.

◆ OnPlacingEnded()

void OnPlacingEnded ( IEntity item,
bool successful,
ItemUseParameters animParams )
protected

Definition at line 299 of file SCR_ItemPlacementComponent.c.

◆ OnWeaponChanged()

void OnWeaponChanged ( BaseWeaponComponent newWeaponSlot)
protected

Definition at line 552 of file SCR_ItemPlacementComponent.c.

◆ OnWeaponChangeEnded()

void OnWeaponChangeEnded ( BaseWeaponComponent newWeaponSlot)
protected

Definition at line 545 of file SCR_ItemPlacementComponent.c.

◆ RegisterEvents()

void RegisterEvents ( IEntity to)
protected

Definition at line 148 of file SCR_ItemPlacementComponent.c.

◆ RegisterToManagerInvokers()

void RegisterToManagerInvokers ( SCR_EditorManagerEntity manager)
protected

Definition at line 950 of file SCR_ItemPlacementComponent.c.

◆ RPC_AskPlaceItem()

void RPC_AskPlaceItem ( RplId placeableId)
protected

placeableId = id of items rpl component

Parameters
[in]placeableId

Definition at line 84 of file SCR_ItemPlacementComponent.c.

◆ RPC_AskPlaceItemWithParentChange()

void RPC_AskPlaceItemWithParentChange ( RplId placeableId,
RplId targetId,
int nodeId )
protected

placeableId = id of items rpl component

Parameters
[in]placeableId
[in]targetIdis an RplId of the owner of the surface to which this item is meant to be attached to
[in]nodeIdis an node id of the surface to which this object is meant to be attached to

Definition at line 104 of file SCR_ItemPlacementComponent.c.

◆ RPC_AskSetPlacementPosition()

void RPC_AskSetPlacementPosition ( vector right,
vector up,
vector forward,
vector position,
RplId placeableId,
RplId characterId )
protected

Client side method for informing the authority about where item should be placed upon removal from their inventory

Parameters
[in]right
[in]up
[in]forward
[in]position
[in]placeableIdreplication id of placed item
[in]characterIdreplication id of the character that placed it there

Definition at line 46 of file SCR_ItemPlacementComponent.c.

◆ SCR_ItemPlacementComponent()

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

Definition at line 999 of file SCR_ItemPlacementComponent.c.

◆ SetPlaceableItemComponent()

void SetPlaceableItemComponent ( SCR_PlaceableItemComponent placeableItemComp)
protected
Parameters
[in]placeableItemComp

Definition at line 464 of file SCR_ItemPlacementComponent.c.

◆ SetPlacedItem()

void SetPlacedItem ( IEntity item)
protected
Parameters
[in]item

Definition at line 444 of file SCR_ItemPlacementComponent.c.

◆ SetPreviewEntity()

void SetPreviewEntity ( IEntity preview,
bool deleteOldPreview = true )
protected
Parameters
[in]preview
[in]deleteOldPreviewtrue if previous preview should be deleted

Definition at line 453 of file SCR_ItemPlacementComponent.c.

◆ StartPlaceItem()

void StartPlaceItem ( )
protected

Callback method triggered by button press.

Definition at line 229 of file SCR_ItemPlacementComponent.c.

◆ TogglePreview()

void TogglePreview ( IEntity weapon)
protected

Definition at line 568 of file SCR_ItemPlacementComponent.c.

◆ TraceEntitiesCallback()

bool TraceEntitiesCallback ( notnull IEntity e,
vector start = "0 0 0",
vector dir = "0 0 0" )
protected
Parameters
[in]e
Returns

Definition at line 924 of file SCR_ItemPlacementComponent.c.

◆ UnregisterEvents()

void UnregisterEvents ( IEntity from)
protected

Definition at line 122 of file SCR_ItemPlacementComponent.c.

◆ UseXYZPlacement()

void UseXYZPlacement ( IEntity owner,
float maxPlacementDistance,
vector cameraMat[4] )
protected
Parameters
[in]owner
[in]maxPlacementDistance
[in]cameraMat

Definition at line 694 of file SCR_ItemPlacementComponent.c.

◆ UseXZFixedPlacement()

void UseXZFixedPlacement ( IEntity owner,
float maxPlacementDistance,
vector cameraMat[4] )
protected
Parameters
[in]owner
[in]maxPlacementDistance
[in]cameraMat

Definition at line 643 of file SCR_ItemPlacementComponent.c.

◆ ValidateEntity()

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

Definition at line 785 of file SCR_ItemPlacementComponent.c.

◆ ValidatePlacement()

void ValidatePlacement ( vector up,
IEntity tracedEntity,
BaseWorld world,
IEntity character,
out ENotification cantPlaceReason )
protected
Parameters
[in]up
[in]tracedEntity
[in]world
[in]character
Returns

Definition at line 833 of file SCR_ItemPlacementComponent.c.

◆ ValidateTargetEntityExistance()

void ValidateTargetEntityExistance ( )
protected

Definition at line 383 of file SCR_ItemPlacementComponent.c.

Variable Documentation

◆ m_aCamDeploymentPosition

vector m_aCamDeploymentPosition[4]
protected

Definition at line 22 of file SCR_ItemPlacementComponent.c.

◆ m_bInEditor

bool m_bInEditor
protected

Definition at line 19 of file SCR_ItemPlacementComponent.c.

◆ m_bIsBeingAttachedToEntity

bool m_bIsBeingAttachedToEntity
protected

Definition at line 20 of file SCR_ItemPlacementComponent.c.

◆ m_CompartmnetAccessComponent

SCR_CompartmentAccessComponent m_CompartmnetAccessComponent
protected

Definition at line 27 of file SCR_ItemPlacementComponent.c.

◆ m_eCantPlaceReason

ENotification m_eCantPlaceReason
protected

Definition at line 24 of file SCR_ItemPlacementComponent.c.

◆ m_iEquipComplete

int m_iEquipComplete
protected

Definition at line 17 of file SCR_ItemPlacementComponent.c.

◆ m_iTargetEntityNodeID

int m_iTargetEntityNodeID
protected

Definition at line 18 of file SCR_ItemPlacementComponent.c.

◆ m_PlaceableItem

SCR_PlaceableItemComponent m_PlaceableItem
protected

Definition at line 25 of file SCR_ItemPlacementComponent.c.

◆ m_PlacedItem

IEntity m_PlacedItem
protected

Definition at line 23 of file SCR_ItemPlacementComponent.c.

◆ m_PreviewEntity

IEntity m_PreviewEntity
protected

Definition at line 26 of file SCR_ItemPlacementComponent.c.

◆ m_sCannotBuildMaterial

ResourceName m_sCannotBuildMaterial
protected

Definition at line 12 of file SCR_ItemPlacementComponent.c.

◆ m_sTransparentMaterial

ResourceName m_sTransparentMaterial
protected

Definition at line 15 of file SCR_ItemPlacementComponent.c.

◆ m_TargetEntity

IEntity m_TargetEntity
protected

Definition at line 29 of file SCR_ItemPlacementComponent.c.

◆ m_TargetId

RplId m_TargetId
protected

Definition at line 28 of file SCR_ItemPlacementComponent.c.

◆ m_vCurrentMat

vector m_vCurrentMat[4]
protected

Definition at line 21 of file SCR_ItemPlacementComponent.c.