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

Public Member Functions

override bool CanBeShownScript (IEntity user)
 Can this entity be shown in the UI by the provided user entity?
 
override bool CanBePerformedScript (IEntity user)
 Can this action be performed by the provided user entity?
 
bool CanPerform (out ESupportStationReasonInvalid cannotPerformReason)
 
override void PerformContinuousAction (IEntity pOwnerEntity, IEntity pUserEntity, float timeSlice)
 Called when someone tries to perform the continuous action, user entity is typically character.
 
override void PerformAction (IEntity pOwnerEntity, IEntity pUserEntity)
 Called when someone tries to perform the action, user entity is typically character.
 
override void Init (IEntity pOwnerEntity, GenericComponent pManagerComponent)
 Called when object is initialized and registered to actions manager.
 
override bool CanBroadcastScript ()
 If HasLocalEffectOnly() is false this method tells if the server is supposed to broadcast this action to clients.
 
override void OnActionStart (IEntity pUserEntity)
 Method called from scripted interaction handler when an action is started (progress bar appeared)
 
override void OnActionCanceled (IEntity pOwnerEntity, IEntity pUserEntity)
 Method called when the action is interrupted/canceled.
 
override bool GetActionNameScript (out string outName)
 If overridden and true is returned, outName is returned when BaseUserAction.GetActionName is called.
 
void ~SCR_BaseUseSupportStationAction ()
 
- Public Member Functions inherited from SCR_ScriptedUserAction
override bool CanBeShownScript (IEntity user)
 Can this entity be shown in the UI by the provided user entity?
 
vector GetLocalPositionAction ()
 Get action local position Used for such things like playing audio at the correct location on action use.
 
vector GetWorldPositionAction ()
 Get action world position Used for such things like playing audio at the correct location on action use.
 
override float GetActionProgressScript (float fProgress, float timeSlice)
 
bool IsActionLooping ()
 
float GetLoopActionHoldDuration ()
 
override void OnActionStart (IEntity pUserEntity)
 Method called from scripted interaction handler when an action is started (progress bar appeared)
 
- Public Member Functions inherited from ScriptedUserAction
void Init (IEntity pOwnerEntity, GenericComponent pManagerComponent)
 Called when object is initialized and registered to actions manager.
 
void PerformAction (IEntity pOwnerEntity, IEntity pUserEntity)
 Called when someone tries to perform the action, user entity is typically character.
 
void PerformContinuousAction (IEntity pOwnerEntity, IEntity pUserEntity, float timeSlice)
 Called when someone tries to perform the continuous action, user entity is typically character.
 
void OnConfirmed (IEntity pUserEntity)
 If action passed as callback OnConfirmed will be called when reached execution, user entity is typically character.
 
void OnRejected (IEntity pUserEntity)
 If action passed as callback OnRejected will be called when execution was rejected, user entity is typically character.
 
void OnActionCanceled (IEntity pOwnerEntity, IEntity pUserEntity)
 Method called when the action is interrupted/canceled.
 
void OnActionStart (IEntity pUserEntity)
 Method called from scripted interaction handler when an action is started (progress bar appeared)
 
bool GetActionNameScript (out string outName)
 If overridden and true is returned, outName is returned when BaseUserAction.GetActionName is called.
 
bool GetActionDescriptionScript (out string outName)
 If overridden and true is returned, outName is returned when BaseUserAction.GetActionDescription is called.
 
bool CanBePerformedScript (IEntity user)
 Can this action be performed by the provided user entity?
 
bool CanBeShownScript (IEntity user)
 Can this entity be shown in the UI by the provided user entity?
 
bool HasLocalEffectOnlyScript ()
 Does this action only have client side effect?
 
bool CanBroadcastScript ()
 If HasLocalEffectOnly() is false this method tells if the server is supposed to broadcast this action to clients.
 
float GetActionProgressScript (float fProgress, float timeSlice)
 Returns the progress of this action in seconds.
 
- Public Member Functions inherited from BaseUserAction
void SetCannotPerformReason (string reason)
 Sets the reason why action couldn't be performed.
 
string GetCannotPerformReason ()
 Returns the reason why action couldn't be performed.
 
proto external int GetContextIndex (string sContextName)
 Returns the index of the context this action is registered in as or -1 if none.
 
proto external void SetActiveContext (UserActionContext context)
 Setter for m_pActiveContext.
 
proto external UserActionContext GetActiveContext ()
 Getter for m_pActiveContext.
 
proto external bool CanBePerformed (IEntity user)
 Can this action be performed by the user?
 
proto external bool CanBeShown (IEntity user)
 Can this action be shown in the UI for the user?
 
proto external bool HasLocalEffectOnly ()
 Does this action only have client side effect?
 
proto external bool CanBroadcast ()
 If HasLocalEffectOnly() is false this method tells if the server is supposed to broadcast this action to clients.
 
proto external bool ShouldPerformPerFrame ()
 Should this action be performed every frame the input action is triggered?
 
proto external string GetActionName ()
 Return the name of this action.
 
proto external string GetActionDescription ()
 Return the description of this action.
 
proto external float GetVisibilityRange ()
 Returns the visibility range of this action in metres.
 
proto external void SetActionDuration (float duration)
 Sets the duration of this action in seconds.
 
proto external float GetActionDuration ()
 Returns the duration of this action in seconds.
 
proto external float GetActionProgress (float fProgress, float timeSlice)
 Returns the progress of this action in seconds.
 
proto external bool IsInProgress ()
 Returns true while continuous or timed action is being used.
 
proto external UIInfo GetUIInfo ()
 Returns the UIInfo set for this user action or null if none.
 
proto external IEntity GetOwner ()
 Returns the parent entity of this action.
 
proto external bool CanAggregate ()
 Whether action can be aggregated by name, this is a temp workaround for localization.
 
proto external int GetActionID ()
 Returns the ID with which this action is registered in its parent ActionsManagerComponent.
 
proto external void SetSendActionDataFlag ()
 Used to ask to send action data again during continuous action.
 
proto external ActionsManagerComponent GetActionsManager ()
 

Protected Member Functions

ESupportStationType GetSupportStationType ()
 
SCR_BaseSupportStationComponent GetClosestValidSupportStation (IEntity actionOwner, IEntity actionUser, out ESupportStationReasonInvalid reasonInvalid=0)
 
bool CanShowDestroyed ()
 
void SetCanPerform (bool canPerform, ESupportStationReasonInvalid reasonInvalid)
 
void CanBePerformedUpdate (IEntity user)
 
LocalizedString GetInvalidPerformReasonString (ESupportStationReasonInvalid reasonInvalid)
 
void ResetReferencesOnServer ()
 
void DelayedInit (IEntity owner)
 
bool CanHaveMultipleUsers ()
 
float GetActionPercentage ()
 If not -1 it will show the percentage on the current action.
 
int GetActionDecimalCount ()
 
bool RequiresGadget ()
 If true will only show the action if the player is holding the correct support station gadget.
 
bool PrioritizeHeldGadget ()
 If true will always take support station from held gadget and skip any other checks if a held support station is found. RequiresGadget() is not required to be true.
 
bool AllowGetSupportStationFromGadget ()
 If true it allows getting the support station from gadgets.
 
IEntity GetCurrentActionUser ()
 Get which entity is currently activly using the action.
 
bool IsUserInVehicle (notnull IEntity user)
 
string GetActionStringParam ()
 
override void OnActionSelected ()
 Callback for when action is selected by the local player and the local player ONLY.
 
override void OnActionDeselected ()
 Callback for when action is deselected by the local player and the local player ONLY.
 
- Protected Member Functions inherited from SCR_ScriptedUserAction
bool IsSameVehicleOrNone (notnull IEntity user)
 
bool LoopActionUpdate (float timeSlice)
 
override void OnActionSelected ()
 Callback for when action is selected by the local player and the local player ONLY.
 
- Protected Member Functions inherited from BaseUserAction
bool OnRplSave (ScriptBitWriter writer)
 
bool OnRplLoad (ScriptBitReader reader)
 
bool OnSaveActionData (ScriptBitWriter writer)
 Before performing the action the caller can store some data in it which is delivered to others.
 
bool OnLoadActionData (ScriptBitReader reader)
 If the one performing the action packed some data in it everybody receiving the action.
 
void OnActionSelected ()
 Callback for when action is selected by the local player and the local player ONLY.
 
void OnActionDeselected ()
 Callback for when action is deselected by the local player and the local player ONLY.
 

Protected Attributes

LocalizedString m_sInvalidRangeActionReason
 
LocalizedString m_sInvalidDestroyedActionReason
 
LocalizedString m_sInvalidFactionActionReason
 
LocalizedString m_sInvalidSuppliesActionReason
 
LocalizedString m_sInvalidMovingActionReason
 
LocalizedString m_sInvalidDisabledActionReason
 
bool m_bShowSupplyCostOnAction
 
bool m_bAllowCheckChildrenSupportStation
 
int m_iGadgetAnimationCommand
 
bool m_bDoesGadgetAnimationLoop
 
bool m_bAnimateGadgetInVehicle
 
bool m_bIsMaster
 
bool m_bActionActive
 
IEntity m_ActionUser
 
SCR_BaseSupportStationComponent m_ActionOwnerSupportStationComponent
 
SCR_BaseSupportStationComponent m_SupportStationComponent
 
BaseWorld m_World
 
float m_fLastCheckedCanPerform = 0
 
bool m_bSupportStationWasNull = false
 
int m_iSuppliesOnUse
 
int m_iAvailableSupplies
 
bool m_bCanPerform
 
ESupportStationReasonInvalid m_eCannotPerformReason
 
SCR_SupportStationGadgetComponent m_SupportStationGadget
 
bool m_bOnActionAnimationInDone
 
- Protected Attributes inherited from SCR_ScriptedUserAction
bool m_bLoopAction
 
float m_fLoopActionHoldDuration
 
bool m_bLowerWeaponOnUse
 
EUserActionInVehicleState m_eShownInVehicleState
 
bool m_bSameVehicleOnly
 
UserActionContext m_LastUserActionContext
 
float m_fLoopProgress
 
float m_fLoopProgressSmoothVelocity
 
- Protected Attributes inherited from BaseUserAction
string m_sCannotPerformReason
 The reason why action cannot be performed.
 

Static Protected Attributes

const int DELAY_CAN_PERFORM = 500
 
const LocalizedString ACTION_WITH_SUPPLYCOST_FORMATTING = "#AR-ActionFormat_SupplyCost"
 
const LocalizedString ACTION_WITH_PARAM_FORMATTING = "#AR-SupportStation_ActionFormat_WithParam"
 
const LocalizedString ACTION_PERCENTAGE_FORMATTING = "#AR-SupportStation_ActionFormat_Percentage"
 

Additional Inherited Members

- Public Attributes inherited from BaseUserAction
string ActionNameParams [9]
 Can be filled in scripts to be used as params when name is being formatted when displayed in UI.
 

Constructor & Destructor Documentation

◆ ~SCR_BaseUseSupportStationAction()

void SCR_BaseUseSupportStationAction.~SCR_BaseUseSupportStationAction ( )

Member Function Documentation

◆ AllowGetSupportStationFromGadget()

bool SCR_BaseUseSupportStationAction.AllowGetSupportStationFromGadget ( )
protected

If true it allows getting the support station from gadgets.

◆ CanBePerformedScript()

override bool SCR_BaseUseSupportStationAction.CanBePerformedScript ( IEntity  user)

◆ CanBePerformedUpdate()

void SCR_BaseUseSupportStationAction.CanBePerformedUpdate ( IEntity  user)
protected

◆ CanBeShownScript()

override bool SCR_BaseUseSupportStationAction.CanBeShownScript ( IEntity  user)

◆ CanBroadcastScript()

override bool SCR_BaseUseSupportStationAction.CanBroadcastScript ( )

If HasLocalEffectOnly() is false this method tells if the server is supposed to broadcast this action to clients.

Implements ScriptedUserAction.

◆ CanHaveMultipleUsers()

bool SCR_BaseUseSupportStationAction.CanHaveMultipleUsers ( )
protected

◆ CanPerform()

bool SCR_BaseUseSupportStationAction.CanPerform ( out ESupportStationReasonInvalid  cannotPerformReason)

◆ CanShowDestroyed()

bool SCR_BaseUseSupportStationAction.CanShowDestroyed ( )
protected

◆ DelayedInit()

void SCR_BaseUseSupportStationAction.DelayedInit ( IEntity  owner)
protected

◆ GetActionDecimalCount()

int SCR_BaseUseSupportStationAction.GetActionDecimalCount ( )
protected

◆ GetActionNameScript()

override bool SCR_BaseUseSupportStationAction.GetActionNameScript ( out string  outName)

If overridden and true is returned, outName is returned when BaseUserAction.GetActionName is called.

If not overridden or false is returned the default value from UIInfo is taken (or empty string if no UI info exists)

Implements ScriptedUserAction.

Implemented in SCR_RepairAtSupportStationAction.

◆ GetActionPercentage()

float SCR_BaseUseSupportStationAction.GetActionPercentage ( )
protected

If not -1 it will show the percentage on the current action.

Implemented in SCR_RefuelAtSupportStationAction.

◆ GetActionStringParam()

string SCR_BaseUseSupportStationAction.GetActionStringParam ( )
protected

◆ GetClosestValidSupportStation()

SCR_BaseSupportStationComponent SCR_BaseUseSupportStationAction.GetClosestValidSupportStation ( IEntity  actionOwner,
IEntity  actionUser,
out ESupportStationReasonInvalid  reasonInvalid = 0 
)
protected

◆ GetCurrentActionUser()

IEntity SCR_BaseUseSupportStationAction.GetCurrentActionUser ( )
protected

Get which entity is currently activly using the action.

◆ GetInvalidPerformReasonString()

LocalizedString SCR_BaseUseSupportStationAction.GetInvalidPerformReasonString ( ESupportStationReasonInvalid  reasonInvalid)
protected

◆ GetSupportStationType()

ESupportStationType SCR_BaseUseSupportStationAction.GetSupportStationType ( )
protected

◆ Init()

override void SCR_BaseUseSupportStationAction.Init ( IEntity  pOwnerEntity,
GenericComponent  pManagerComponent 
)

Called when object is initialized and registered to actions manager.

Implements ScriptedUserAction.

Implemented in SCR_RefuelAtSupportStationAction, and SCR_ResupplySelfSupportStationAction.

◆ IsUserInVehicle()

bool SCR_BaseUseSupportStationAction.IsUserInVehicle ( notnull IEntity  user)
protected

◆ OnActionCanceled()

override void SCR_BaseUseSupportStationAction.OnActionCanceled ( IEntity  pOwnerEntity,
IEntity  pUserEntity 
)

Method called when the action is interrupted/canceled.

Parameters
pUserEntityThe entity that was performing this action prior to interruption

Implements ScriptedUserAction.

◆ OnActionDeselected()

override void SCR_BaseUseSupportStationAction.OnActionDeselected ( )
protected

Callback for when action is deselected by the local player and the local player ONLY.

Implements BaseUserAction.

◆ OnActionSelected()

override void SCR_BaseUseSupportStationAction.OnActionSelected ( )
protected

Callback for when action is selected by the local player and the local player ONLY.

Implements SCR_ScriptedUserAction.

◆ OnActionStart()

override void SCR_BaseUseSupportStationAction.OnActionStart ( IEntity  pUserEntity)

Method called from scripted interaction handler when an action is started (progress bar appeared)

Parameters
pUserEntityThe entity that started performing this action

Implements SCR_ScriptedUserAction.

◆ PerformAction()

override void SCR_BaseUseSupportStationAction.PerformAction ( IEntity  pOwnerEntity,
IEntity  pUserEntity 
)

Called when someone tries to perform the action, user entity is typically character.

Implements ScriptedUserAction.

Implemented in SCR_BaseResupplySupportStationAction.

◆ PerformContinuousAction()

override void SCR_BaseUseSupportStationAction.PerformContinuousAction ( IEntity  pOwnerEntity,
IEntity  pUserEntity,
float  timeSlice 
)

Called when someone tries to perform the continuous action, user entity is typically character.

Implements ScriptedUserAction.

◆ PrioritizeHeldGadget()

bool SCR_BaseUseSupportStationAction.PrioritizeHeldGadget ( )
protected

If true will always take support station from held gadget and skip any other checks if a held support station is found. RequiresGadget() is not required to be true.

Implemented in SCR_RefuelAtSupportStationAction, and SCR_ResupplyOtherSupportStationAction.

◆ RequiresGadget()

bool SCR_BaseUseSupportStationAction.RequiresGadget ( )
protected

If true will only show the action if the player is holding the correct support station gadget.

Implemented in SCR_HealSupportStationAction, SCR_RepairAtSupportStationAction, and SCR_ResupplyOtherSupportStationAction.

◆ ResetReferencesOnServer()

void SCR_BaseUseSupportStationAction.ResetReferencesOnServer ( )
protected

◆ SetCanPerform()

void SCR_BaseUseSupportStationAction.SetCanPerform ( bool  canPerform,
ESupportStationReasonInvalid  reasonInvalid 
)
protected

Member Data Documentation

◆ ACTION_PERCENTAGE_FORMATTING

const LocalizedString SCR_BaseUseSupportStationAction.ACTION_PERCENTAGE_FORMATTING = "#AR-SupportStation_ActionFormat_Percentage"
staticprotected

◆ ACTION_WITH_PARAM_FORMATTING

const LocalizedString SCR_BaseUseSupportStationAction.ACTION_WITH_PARAM_FORMATTING = "#AR-SupportStation_ActionFormat_WithParam"
staticprotected

◆ ACTION_WITH_SUPPLYCOST_FORMATTING

const LocalizedString SCR_BaseUseSupportStationAction.ACTION_WITH_SUPPLYCOST_FORMATTING = "#AR-ActionFormat_SupplyCost"
staticprotected

◆ DELAY_CAN_PERFORM

const int SCR_BaseUseSupportStationAction.DELAY_CAN_PERFORM = 500
staticprotected

◆ m_ActionOwnerSupportStationComponent

SCR_BaseSupportStationComponent SCR_BaseUseSupportStationAction.m_ActionOwnerSupportStationComponent
protected

◆ m_ActionUser

IEntity SCR_BaseUseSupportStationAction.m_ActionUser
protected

◆ m_bActionActive

bool SCR_BaseUseSupportStationAction.m_bActionActive
protected

◆ m_bAllowCheckChildrenSupportStation

bool SCR_BaseUseSupportStationAction.m_bAllowCheckChildrenSupportStation
protected

◆ m_bAnimateGadgetInVehicle

bool SCR_BaseUseSupportStationAction.m_bAnimateGadgetInVehicle
protected

◆ m_bCanPerform

bool SCR_BaseUseSupportStationAction.m_bCanPerform
protected

◆ m_bDoesGadgetAnimationLoop

bool SCR_BaseUseSupportStationAction.m_bDoesGadgetAnimationLoop
protected

◆ m_bIsMaster

bool SCR_BaseUseSupportStationAction.m_bIsMaster
protected

◆ m_bOnActionAnimationInDone

bool SCR_BaseUseSupportStationAction.m_bOnActionAnimationInDone
protected

◆ m_bShowSupplyCostOnAction

bool SCR_BaseUseSupportStationAction.m_bShowSupplyCostOnAction
protected

◆ m_bSupportStationWasNull

bool SCR_BaseUseSupportStationAction.m_bSupportStationWasNull = false
protected

◆ m_eCannotPerformReason

ESupportStationReasonInvalid SCR_BaseUseSupportStationAction.m_eCannotPerformReason
protected

◆ m_fLastCheckedCanPerform

float SCR_BaseUseSupportStationAction.m_fLastCheckedCanPerform = 0
protected

◆ m_iAvailableSupplies

int SCR_BaseUseSupportStationAction.m_iAvailableSupplies
protected

◆ m_iGadgetAnimationCommand

int SCR_BaseUseSupportStationAction.m_iGadgetAnimationCommand
protected

◆ m_iSuppliesOnUse

int SCR_BaseUseSupportStationAction.m_iSuppliesOnUse
protected

◆ m_sInvalidDestroyedActionReason

LocalizedString SCR_BaseUseSupportStationAction.m_sInvalidDestroyedActionReason
protected

◆ m_sInvalidDisabledActionReason

LocalizedString SCR_BaseUseSupportStationAction.m_sInvalidDisabledActionReason
protected

◆ m_sInvalidFactionActionReason

LocalizedString SCR_BaseUseSupportStationAction.m_sInvalidFactionActionReason
protected

◆ m_sInvalidMovingActionReason

LocalizedString SCR_BaseUseSupportStationAction.m_sInvalidMovingActionReason
protected

◆ m_sInvalidRangeActionReason

LocalizedString SCR_BaseUseSupportStationAction.m_sInvalidRangeActionReason
protected

◆ m_sInvalidSuppliesActionReason

LocalizedString SCR_BaseUseSupportStationAction.m_sInvalidSuppliesActionReason
protected

◆ m_SupportStationComponent

SCR_BaseSupportStationComponent SCR_BaseUseSupportStationAction.m_SupportStationComponent
protected

◆ m_SupportStationGadget

SCR_SupportStationGadgetComponent SCR_BaseUseSupportStationAction.m_SupportStationGadget
protected

◆ m_World

BaseWorld SCR_BaseUseSupportStationAction.m_World
protected

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