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

Go to the source code of this file.

Classes

class  SCR_DetonatorGadgetComponentClass

Functions

SCR_DetonatorGadgetComponentClass SCR_GadgetComponentClass RplProp (onRplName:"OnNumberOfConnectedChargesChanged")
float GetmaxDetonationRange ()
void OnNumberOfConnectedChargesChanged ()
int GetNumberOfConnectedCharges ()
array< RplIdGetConnectedCharges ()
bool IsAttachedToTheDetonator (SCR_ExplosiveChargeComponent explosiveChargeComp)
bool IsAttachedToTheDetonator (RplId explosiveChargeCompId)
bool IsChargeInRange (vector pos, SCR_ExplosiveChargeComponent explosiveChargeComp)
bool IsChargeInRange (vector pos, RplId explosiveChargeCompId)
override void ToggleActive (bool state, SCR_EUseContext context)
override void OnToggleActive (bool state)
void OnAnimationEvent (AnimationEventID animEventType, AnimationEventID animUserString, int intParam, float timeFromStart, float timeToEnd)
void OnAnimationEnded (IEntity item, bool successful, ItemUseParameters animParams)
void DetonateExplosiveCharge ()
 Trigger detonation of explosive charge if there is some connected and in range.
void ActivateAction (notnull IEntity pUserEntity)
 Method meant for client side triggering of the action from outside of the gadget toggle mechanic.
override void ActivateAction ()
 Action listener callback.
void PlaySound (string soundName)
void ConnectNewCharge (RplId explosiveChargeCompId, bool shouldReplicate=true)
 Add new charge to the list of connected charges.
void RemoveChargeFromTheList (RplId chargeCompToDisconnect, bool shouldReplicate=true)
 Remove provided charge from the listed of connected charges.
void ReplaceChargeFromTheList (RplId chargeCompToReplace, RplId replaceWith=RplId.Invalid())
void RemoveAllChargesFromTheList ()
 Remove all charges from the listed of connected charges.
void UpdateWiresVisibility (bool visible=false)
 Change visibility of sloted wires.
void ShowConnectedWiresForChargesInRange ()
 Checks if there are any charges in range and if so then will show connected wires.
void OnDeployedStateChanged (bool newState, SCR_BaseDeployableInventoryItemComponent component)
override EGadgetType GetType ()
override bool CanBeRaised ()
override void ModeSwitch (EGadgetMode mode, IEntity charOwner)
override void ModeClear (EGadgetMode mode)
override void ActivateGadgetUpdate ()
override void DeactivateGadgetUpdate ()
override void Update (float timeSlice)
override void EOnInit (IEntity owner)
override void OnPostInit (IEntity owner)
 Editable Mine.
override bool RplSave (ScriptBitWriter writer)
override bool RplLoad (ScriptBitReader reader)

Variables

float m_fMaxDetonationRange
float m_fVisibilityCheckDelay
RplComponent m_RplComp
ChimeraCharacter m_User
AnimationEventID m_iDetonatorTriggeredEventID = -1
const string TRIGGER_ANIMATION_EVENT_NAME = "DetonatorTriggered"
const string ANIMATION_BIND_COMMAND = "CMD_Item_Action"
const int UPDATE_WIRES_VISIBILITY_DELAY = 500

Function Documentation

◆ ActivateAction() [1/2]

override void ActivateAction ( )
protected

Action listener callback.

Definition at line 284 of file SCR_DetonatorGadgetComponent.c.

◆ ActivateAction() [2/2]

void ActivateAction ( notnull IEntity pUserEntity)
protected

Method meant for client side triggering of the action from outside of the gadget toggle mechanic.

Definition at line 276 of file SCR_DetonatorGadgetComponent.c.

◆ ActivateGadgetUpdate()

override void ActivateGadgetUpdate ( )
protected

Definition at line 476 of file SCR_DetonatorGadgetComponent.c.

◆ CanBeRaised()

override bool CanBeRaised ( )
protected

Gadget has a raised animation version

Returns
Returns true if raisable

Definition at line 449 of file SCR_DetonatorGadgetComponent.c.

◆ ConnectNewCharge()

void ConnectNewCharge ( RplId explosiveChargeCompId,
bool shouldReplicate = true )
protected

Add new charge to the list of connected charges.

Definition at line 304 of file SCR_DetonatorGadgetComponent.c.

◆ DeactivateGadgetUpdate()

override void DeactivateGadgetUpdate ( )
protected

Definition at line 488 of file SCR_DetonatorGadgetComponent.c.

◆ DetonateExplosiveCharge()

void DetonateExplosiveCharge ( )
protected

Trigger detonation of explosive charge if there is some connected and in range.

Definition at line 233 of file SCR_DetonatorGadgetComponent.c.

◆ GetConnectedCharges()

array< RplId > GetConnectedCharges ( )
protected
Returns

Definition at line 45 of file SCR_DetonatorGadgetComponent.c.

◆ GetmaxDetonationRange()

float RplProp::GetmaxDetonationRange ( )
protected

Definition at line 20 of file SCR_DetonatorGadgetComponent.c.

◆ GetNumberOfConnectedCharges()

int GetNumberOfConnectedCharges ( )
protected
Returns

Definition at line 38 of file SCR_DetonatorGadgetComponent.c.

◆ GetType()

override EGadgetType GetType ( )
protected

Get gadget type

Returns
Returns gadget type

Definition at line 441 of file SCR_DetonatorGadgetComponent.c.

◆ IsAttachedToTheDetonator() [1/2]

bool IsAttachedToTheDetonator ( RplId explosiveChargeCompId)
protected
Parameters
[in]explosiveChargeCompId
Returns

Definition at line 61 of file SCR_DetonatorGadgetComponent.c.

◆ IsAttachedToTheDetonator() [2/2]

bool IsAttachedToTheDetonator ( SCR_ExplosiveChargeComponent explosiveChargeComp)
protected
Parameters
[in]explosiveChargeComp
Returns

Definition at line 53 of file SCR_DetonatorGadgetComponent.c.

◆ IsChargeInRange() [1/2]

bool IsChargeInRange ( vector pos,
RplId explosiveChargeCompId )
protected

Validates if provided charge is on the list and in usable range of that detonator

Parameters
[in]posposition from which distance will be measured
[in]explosiveChargeCompIdreplication id of the explosive charge component of the object to which distance will be checked
Returns
true if explosive charge can be detonated from that position in case that detonators' range is set to -1 then it will always be true

Definition at line 99 of file SCR_DetonatorGadgetComponent.c.

◆ IsChargeInRange() [2/2]

bool IsChargeInRange ( vector pos,
SCR_ExplosiveChargeComponent explosiveChargeComp )
protected

Validates if provided charge is on the list and in usable range of that detonator

Parameters
[in]posposition from which distance will be measured
[in]explosiveChargeCompexplosive charge component of the object to which distance will be checked
Returns
true if explosive charge can be detonated from that position in case that detonators' range is set to -1 then it will always be true

Definition at line 71 of file SCR_DetonatorGadgetComponent.c.

◆ ModeClear()

override void ModeClear ( EGadgetMode mode)
protected

Clear gadget mode

Parameters
[in]modeis the mode being cleared

Definition at line 468 of file SCR_DetonatorGadgetComponent.c.

◆ ModeSwitch()

override void ModeSwitch ( EGadgetMode mode,
IEntity charOwner )
protected

Set gadget mode

Parameters
[in]modeis the target mode being switched to
[in]charOwner

Definition at line 458 of file SCR_DetonatorGadgetComponent.c.

◆ OnAnimationEnded()

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

Callback called when animation of using the item ends

Parameters
[in]itemanimated item
[in]successfulif animation was able to finish or was interrupted
[in]animParamsparameters that were used to play this animation

Definition at line 219 of file SCR_DetonatorGadgetComponent.c.

◆ OnDeployedStateChanged()

void OnDeployedStateChanged ( bool newState,
SCR_BaseDeployableInventoryItemComponent component )
protected
Parameters
[in]deployed

Definition at line 433 of file SCR_DetonatorGadgetComponent.c.

◆ OnNumberOfConnectedChargesChanged()

void OnNumberOfConnectedChargesChanged ( )
protected

Definition at line 31 of file SCR_DetonatorGadgetComponent.c.

◆ OnToggleActive()

override void OnToggleActive ( bool state)
protected

Definition at line 165 of file SCR_DetonatorGadgetComponent.c.

◆ PlaySound()

void PlaySound ( string soundName)
protected

Play local sound from this entity

Parameters
[in]soundName

Definition at line 292 of file SCR_DetonatorGadgetComponent.c.

◆ RemoveAllChargesFromTheList()

void RemoveAllChargesFromTheList ( )
protected

Remove all charges from the listed of connected charges.

Definition at line 350 of file SCR_DetonatorGadgetComponent.c.

◆ RemoveChargeFromTheList()

void RemoveChargeFromTheList ( RplId chargeCompToDisconnect,
bool shouldReplicate = true )
protected

Remove provided charge from the listed of connected charges.

Definition at line 319 of file SCR_DetonatorGadgetComponent.c.

◆ ReplaceChargeFromTheList()

void ReplaceChargeFromTheList ( RplId chargeCompToReplace,
RplId replaceWith = RplId.Invalid() )
protected

Removes replaced trigger id and appends in its place provided replacement while preventing addition of the same RplId indefinitely

Definition at line 336 of file SCR_DetonatorGadgetComponent.c.

◆ RplLoad()

override bool RplLoad ( ScriptBitReader reader)
protected

Definition at line 538 of file SCR_DetonatorGadgetComponent.c.

◆ RplProp()

SCR_DetonatorGadgetComponentClass SCR_GadgetComponentClass RplProp ( onRplName:"OnNumberOfConnectedChargesChanged" )

Definition at line 1 of file SCR_DetonatorGadgetComponent.c.

◆ RplSave()

override bool RplSave ( ScriptBitWriter writer)
protected

Definition at line 526 of file SCR_DetonatorGadgetComponent.c.

◆ ShowConnectedWiresForChargesInRange()

void ShowConnectedWiresForChargesInRange ( )
protected

Checks if there are any charges in range and if so then will show connected wires.

Definition at line 407 of file SCR_DetonatorGadgetComponent.c.

◆ ToggleActive()

override void ToggleActive ( bool state,
SCR_EUseContext context )
protected

Definition at line 123 of file SCR_DetonatorGadgetComponent.c.

◆ Update()

override void Update ( float timeSlice)
protected
Parameters
[in]timeSlice

Definition at line 496 of file SCR_DetonatorGadgetComponent.c.

◆ UpdateWiresVisibility()

void UpdateWiresVisibility ( bool visible = false)
protected

Change visibility of sloted wires.

Definition at line 378 of file SCR_DetonatorGadgetComponent.c.

Variable Documentation

◆ ANIMATION_BIND_COMMAND

const string ANIMATION_BIND_COMMAND = "CMD_Item_Action"
protected

Definition at line 27 of file SCR_DetonatorGadgetComponent.c.

◆ m_fMaxDetonationRange

float m_fMaxDetonationRange
protected

Definition at line 17 of file SCR_DetonatorGadgetComponent.c.

◆ m_fVisibilityCheckDelay

float m_fVisibilityCheckDelay
protected

Definition at line 21 of file SCR_DetonatorGadgetComponent.c.

◆ m_iDetonatorTriggeredEventID

AnimationEventID m_iDetonatorTriggeredEventID = -1
protected

Definition at line 24 of file SCR_DetonatorGadgetComponent.c.

◆ m_RplComp

RplComponent m_RplComp
protected

Definition at line 22 of file SCR_DetonatorGadgetComponent.c.

◆ m_User

ChimeraCharacter m_User
protected

Definition at line 23 of file SCR_DetonatorGadgetComponent.c.

◆ TRIGGER_ANIMATION_EVENT_NAME

const string TRIGGER_ANIMATION_EVENT_NAME = "DetonatorTriggered"
protected

Definition at line 26 of file SCR_DetonatorGadgetComponent.c.

◆ UPDATE_WIRES_VISIBILITY_DELAY

const int UPDATE_WIRES_VISIBILITY_DELAY = 500
protected

Definition at line 28 of file SCR_DetonatorGadgetComponent.c.