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

Public Member Functions

void OnExecutedServer (notnull IEntity actionOwner, notnull IEntity actionUser, notnull SCR_BaseUseSupportStationAction action)
 Executed the support Station effect (Server only).
 
bool IsValid (IEntity actionOwner, IEntity actionUser, SCR_BaseUseSupportStationAction action, vector actionPosition, out ESupportStationReasonInvalid reasonInvalid, out int supplyCost)
 Executed when action has been executed.
 
ESupportStationType GetSupportStationType ()
 Get Support station type.
 
ESupportStationPriority GetSupportStationPriority ()
 Get Support station priority.
 
void SetEnabled (bool enable)
 Set support station enabled.
 
bool IsEnabled ()
 Get if support station is enabled.
 
ScriptInvoker GetOnEnabledChanged ()
 Get scriptinvoker when support station is enabled changes.
 
SCR_Faction GetFaction ()
 Get current faction of Support Station (Or if allowed get default faction)
 
int GetMaxAvailableSupplies ()
 Scan for the max available supplies that can be used for the action.
 
bool AreSuppliesEnabled ()
 Get if support station should check for supplies.
 
SCR_ResourceConsumer GetResourceConsumer ()
 
float GetRange ()
 Returns range.
 
bool IsInRange (notnull IEntity actionOwner, vector actionPosition)
 param[in] actionOwner Owner of the support station action to check range of param[in] actionPosition Action position if the bounding box is not used or in valid to check range
 
bool UsesRange ()
 If true then the action will use range, if false it will not use range and only execute if the action and the action manager is on the entity itself.
 
vector GetPosition ()
 Get the center of the Support station that is used with range + offset.
 
vector GetOffset ()
 
bool IgnoreSelf ()
 If true and the action uses range it will never check itself.
 
LocalizedString GetOverrideUserActionName ()
 
bool OverrideDamageState (EDamageState damageState, bool checkIfHasDamageSystem)
 Allows devs to functionally destroy the Support station (or other state) without the need of a DamageManager.
 
override bool RplSave (ScriptBitWriter writer)
 
override bool RplLoad (ScriptBitReader reader)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
override void OnDelete (IEntity owner)
 

Static Public Member Functions

static SCR_BaseSupportStationComponent FindSupportStation (notnull IEntity entity, SCR_ESupportStationResupplyType type=SCR_ESupportStationResupplyType.NONE, SCR_EComponentFinderQueryFlags queryFlags=SCR_EComponentFinderQueryFlags.ENTITY|SCR_EComponentFinderQueryFlags.SLOTS)
 Get support station from entity.
 

Protected Member Functions

void FindEntityIds (IEntity owner, IEntity user, out RplId ownerId, out RplId userId, out int playerId)
 
void GetEntitiesFromID (RplId ownerId, RplId userId, out IEntity owner, out IEntity user)
 
void OnExecuteBroadcast (RplId ownerId, RplId userId, int userPlayerId, int actionId)
 
void OnExecute (IEntity actionOwner, IEntity actionUser, int playerId, SCR_BaseUseSupportStationAction action)
 Called by OnExecuteBroadcast and is executed both on server and on client playerId can be -1 if the user was not a player.
 
void OnSuccessfullyExecuted (IEntity actionOwner, IEntity actionUser, SCR_BaseUseSupportStationAction action)
 
void PlaySoundEffect (SCR_AudioSourceConfiguration audioConfig, notnull IEntity soundOwner, SCR_BaseUseSupportStationAction action)
 
void PlayCharacterVoiceEvent (IEntity character)
 
void SetEnabledBroadcast (bool enable)
 
bool IsMoving ()
 
bool IsUserValidFaction (IEntity user)
 
int GetSupplyCostAction (IEntity actionOwner, IEntity actionUser, SCR_BaseUseSupportStationAction action)
 Get the minimum amount of supplies needed for the action.
 
bool HasEnoughSupplies (IEntity actionOwner, IEntity actionUser, int supplyAmountToCheck)
 
bool OnConsumeSuppliesServer (int amount)
 Action is executed and supplies are used (Server Only)
 
SCR_ResourceComponent GetResourceComponent ()
 
bool GetSendNotificationOnUse ()
 
SCR_AudioSourceConfiguration GetOnUseAudioConfig ()
 
void GetPlayerIdsInVehicle (IEntity vehicle, out notnull array< int > playerIds)
 
void OnHitZoneDamageStateChanged (SCR_HitZone defaultHitZone)
 Called when default hitZone damage state changed. Not called if entity has a damage manager.
 
void OnDamageStateChanged (EDamageState damageState)
 Called when damage manager (or default hitZone) damage state changes.
 
void AddRemoveOnDamageStateChanged (IEntity owner, bool subscribe)
 Grabs either damage manager or HitZoneContainer to subscribe to OnDamageStateChanged.
 
bool InitValidSetup ()
 
void TEMP_OnInteractorReplicated ()
 
void DelayedInit (IEntity owner)
 

Protected Attributes

ESupportStationPriority m_eSupportStationPriority
 
float m_fRange
 
bool m_bUseRangeBoundingBox
 
bool m_bIsEnabled
 
int m_iBaseSupplyCostOnUse
 
bool m_bIgnoreSelf
 
vector m_vOffset
 
ESupportStationFactionUsage m_eFactionUsageCheck
 
LocalizedString m_sOverrideUserActionName
 
SCR_ResourceConsumer m_ResourceConsumer
 
ref ScriptInvoker Event_OnEnabledChanged
 
Physics m_Physics
 
EDamageState m_eCurrentDamageState = EDamageState.UNDAMAGED
 
FactionAffiliationComponent m_FactionAffiliationComponent
 
SCR_ServicePointComponent m_ServicePointComponent
 
SCR_ResourceSystemSubscriptionHandleBase m_ResourceSubscriptionHandleConsumer
 

Member Function Documentation

◆ AddRemoveOnDamageStateChanged()

void SCR_BaseSupportStationComponent.AddRemoveOnDamageStateChanged ( IEntity  owner,
bool  subscribe 
)
protected

Grabs either damage manager or HitZoneContainer to subscribe to OnDamageStateChanged.

◆ AreSuppliesEnabled()

bool SCR_BaseSupportStationComponent.AreSuppliesEnabled ( )

Get if support station should check for supplies.

Returns
true if should check for supplies

◆ DelayedInit()

void SCR_BaseSupportStationComponent.DelayedInit ( IEntity  owner)
protected

◆ EOnInit()

override void SCR_BaseSupportStationComponent.EOnInit ( IEntity  owner)

◆ FindEntityIds()

void SCR_BaseSupportStationComponent.FindEntityIds ( IEntity  owner,
IEntity  user,
out RplId  ownerId,
out RplId  userId,
out int  playerId 
)
protected

◆ FindSupportStation()

static SCR_BaseSupportStationComponent SCR_BaseSupportStationComponent.FindSupportStation ( notnull IEntity  entity,
SCR_ESupportStationResupplyType  type = SCR_ESupportStationResupplyType::NONE,
SCR_EComponentFinderQueryFlags  queryFlags = SCR_EComponentFinderQueryFlags::ENTITY | SCR_EComponentFinderQueryFlags::SLOTS 
)
static

Get support station from entity.

Parameters
[in]entityEntity to get support station from
[in]typeSupport station type to find. Leave NONE if any is valid
Returns
Support Station if any is found

◆ GetEntitiesFromID()

void SCR_BaseSupportStationComponent.GetEntitiesFromID ( RplId  ownerId,
RplId  userId,
out IEntity  owner,
out IEntity  user 
)
protected

◆ GetFaction()

SCR_Faction SCR_BaseSupportStationComponent.GetFaction ( )

Get current faction of Support Station (Or if allowed get default faction)

Returns
Faction of Support Station. Returns null if no faction is assigned

◆ GetMaxAvailableSupplies()

int SCR_BaseSupportStationComponent.GetMaxAvailableSupplies ( )

Scan for the max available supplies that can be used for the action.

Returns

◆ GetOffset()

vector SCR_BaseSupportStationComponent.GetOffset ( )
Returns
returns the offset of the position

◆ GetOnEnabledChanged()

ScriptInvoker SCR_BaseSupportStationComponent.GetOnEnabledChanged ( )

Get scriptinvoker when support station is enabled changes.

Sends over bool with enabled state

Returns
script invoker

◆ GetOnUseAudioConfig()

SCR_AudioSourceConfiguration SCR_BaseSupportStationComponent.GetOnUseAudioConfig ( )
protected

◆ GetOverrideUserActionName()

LocalizedString SCR_BaseSupportStationComponent.GetOverrideUserActionName ( )
Returns
Get Override UserAction string that is used when the action is displayed to the player

◆ GetPlayerIdsInVehicle()

void SCR_BaseSupportStationComponent.GetPlayerIdsInVehicle ( IEntity  vehicle,
out notnull array< int >  playerIds 
)
protected

◆ GetPosition()

vector SCR_BaseSupportStationComponent.GetPosition ( )

Get the center of the Support station that is used with range + offset.

Returns
Returns center + offset

◆ GetRange()

float SCR_BaseSupportStationComponent.GetRange ( )

Returns range.

If range is disabled it will be -1

Returns
Range Of support station

◆ GetResourceComponent()

SCR_ResourceComponent SCR_BaseSupportStationComponent.GetResourceComponent ( )
protected

◆ GetResourceConsumer()

SCR_ResourceConsumer SCR_BaseSupportStationComponent.GetResourceConsumer ( )
Returns
Resource Consumer if entity has any

◆ GetSendNotificationOnUse()

bool SCR_BaseSupportStationComponent.GetSendNotificationOnUse ( )
protected

◆ GetSupplyCostAction()

int SCR_BaseSupportStationComponent.GetSupplyCostAction ( IEntity  actionOwner,
IEntity  actionUser,
SCR_BaseUseSupportStationAction  action 
)
protected

Get the minimum amount of supplies needed for the action.

This is the amount of supplies needed to pass the IsValid check when using supplies and when executed The method is generally overwritten in inherited support stations

Implemented in SCR_BaseDamageHealSupportStationComponent, SCR_HealSupportStationComponent, SCR_RepairSupportStationComponent, and SCR_ResupplySupportStationComponent.

◆ GetSupportStationPriority()

ESupportStationPriority SCR_BaseSupportStationComponent.GetSupportStationPriority ( )

Get Support station priority.

Returns
priority of support station

◆ GetSupportStationType()

ESupportStationType SCR_BaseSupportStationComponent.GetSupportStationType ( )

◆ HasEnoughSupplies()

bool SCR_BaseSupportStationComponent.HasEnoughSupplies ( IEntity  actionOwner,
IEntity  actionUser,
int  supplyAmountToCheck 
)
protected

◆ IgnoreSelf()

bool SCR_BaseSupportStationComponent.IgnoreSelf ( )

If true and the action uses range it will never check itself.

If false it will check itself though use the standard priority for it

Returns
True if it ignores self if it uses range

◆ InitValidSetup()

bool SCR_BaseSupportStationComponent.InitValidSetup ( )
protected

◆ IsEnabled()

bool SCR_BaseSupportStationComponent.IsEnabled ( )

Get if support station is enabled.

Returns
true if enabled

◆ IsInRange()

bool SCR_BaseSupportStationComponent.IsInRange ( notnull IEntity  actionOwner,
vector  actionPosition 
)

param[in] actionOwner Owner of the support station action to check range of param[in] actionPosition Action position if the bounding box is not used or in valid to check range

Returns
Range if support station is in range

◆ IsMoving()

bool SCR_BaseSupportStationComponent.IsMoving ( )
protected

◆ IsUserValidFaction()

bool SCR_BaseSupportStationComponent.IsUserValidFaction ( IEntity  user)
protected

◆ IsValid()

bool SCR_BaseSupportStationComponent.IsValid ( IEntity  actionOwner,
IEntity  actionUser,
SCR_BaseUseSupportStationAction  action,
vector  actionPosition,
out ESupportStationReasonInvalid  reasonInvalid,
out int  supplyCost 
)

Executed when action has been executed.

Here you can execute things such as removing supplies/fuel from the entity

Parameters
[in]actionOwnerentity on which the ActionManager is
[in]actionUserEntity that started the interaction
[in]action
[in]actionPosition
[out]reasonInvalidReason why action is invalid
[out]supplyCostcost when using the support station
Returns

Implemented in SCR_BaseDamageHealSupportStationComponent, SCR_FuelSupportStationComponent, SCR_LoadCasualtySupportStationComponent, and SCR_ResupplySupportStationComponent.

◆ OnConsumeSuppliesServer()

bool SCR_BaseSupportStationComponent.OnConsumeSuppliesServer ( int  amount)
protected

Action is executed and supplies are used (Server Only)

Parameters
[in]amount
Returns
true if there were enough supplies and they are removed

◆ OnDamageStateChanged()

void SCR_BaseSupportStationComponent.OnDamageStateChanged ( EDamageState  damageState)
protected

Called when damage manager (or default hitZone) damage state changes.

◆ OnDelete()

override void SCR_BaseSupportStationComponent.OnDelete ( IEntity  owner)

◆ OnExecute()

void SCR_BaseSupportStationComponent.OnExecute ( IEntity  actionOwner,
IEntity  actionUser,
int  playerId,
SCR_BaseUseSupportStationAction  action 
)
protected

Called by OnExecuteBroadcast and is executed both on server and on client playerId can be -1 if the user was not a player.

Implemented in SCR_BaseDamageHealSupportStationComponent, SCR_FuelSupportStationComponent, and SCR_ResupplySupportStationComponent.

◆ OnExecuteBroadcast()

void SCR_BaseSupportStationComponent.OnExecuteBroadcast ( RplId  ownerId,
RplId  userId,
int  userPlayerId,
int  actionId 
)
protected

◆ OnExecutedServer()

void SCR_BaseSupportStationComponent.OnExecutedServer ( notnull IEntity  actionOwner,
notnull IEntity  actionUser,
notnull SCR_BaseUseSupportStationAction  action 
)

Executed the support Station effect (Server only).

Here you can execute things such as removing supplies/fuel from the entity

Parameters
[in]actionOwnerentity that is the owner of the ActionManager which initiated the action
[in]actionUserEntity that started the interaction to use the support station
[in]action

Implemented in SCR_BaseDamageHealSupportStationComponent, SCR_FuelSupportStationComponent, SCR_HealSupportStationComponent, SCR_LoadCasualtySupportStationComponent, SCR_RepairSupportStationComponent, and SCR_ResupplySupportStationComponent.

◆ OnHitZoneDamageStateChanged()

void SCR_BaseSupportStationComponent.OnHitZoneDamageStateChanged ( SCR_HitZone  defaultHitZone)
protected

Called when default hitZone damage state changed. Not called if entity has a damage manager.

◆ OnPostInit()

override void SCR_BaseSupportStationComponent.OnPostInit ( IEntity  owner)

◆ OnSuccessfullyExecuted()

void SCR_BaseSupportStationComponent.OnSuccessfullyExecuted ( IEntity  actionOwner,
IEntity  actionUser,
SCR_BaseUseSupportStationAction  action 
)
protected

◆ OverrideDamageState()

bool SCR_BaseSupportStationComponent.OverrideDamageState ( EDamageState  damageState,
bool  checkIfHasDamageSystem 
)

Allows devs to functionally destroy the Support station (or other state) without the need of a DamageManager.

If a damage system exists on the entity then it is adviced to let it handle the logic.

Parameters
[in]damageStateState to set
[in]checkIfHasDamageSystemIf true it will check if any damage system is present and if so will not over the state. If false it will simply override it
Returns
True if damage state was succesfully overridden

◆ PlayCharacterVoiceEvent()

void SCR_BaseSupportStationComponent.PlayCharacterVoiceEvent ( IEntity  character)
protected

◆ PlaySoundEffect()

void SCR_BaseSupportStationComponent.PlaySoundEffect ( SCR_AudioSourceConfiguration  audioConfig,
notnull IEntity  soundOwner,
SCR_BaseUseSupportStationAction  action 
)
protected

◆ RplLoad()

override bool SCR_BaseSupportStationComponent.RplLoad ( ScriptBitReader  reader)

◆ RplSave()

override bool SCR_BaseSupportStationComponent.RplSave ( ScriptBitWriter  writer)

◆ SetEnabled()

void SCR_BaseSupportStationComponent.SetEnabled ( bool  enable)

Set support station enabled.

If disabled it will not allow players to use it (Server only)

Parameters
[in]enabletrue is enabled

◆ SetEnabledBroadcast()

void SCR_BaseSupportStationComponent.SetEnabledBroadcast ( bool  enable)
protected

◆ TEMP_OnInteractorReplicated()

void SCR_BaseSupportStationComponent.TEMP_OnInteractorReplicated ( )
protected

◆ UsesRange()

bool SCR_BaseSupportStationComponent.UsesRange ( )

If true then the action will use range, if false it will not use range and only execute if the action and the action manager is on the entity itself.

Returns
True if using range

Member Data Documentation

◆ Event_OnEnabledChanged

ref ScriptInvoker SCR_BaseSupportStationComponent.Event_OnEnabledChanged
protected

◆ m_bIgnoreSelf

bool SCR_BaseSupportStationComponent.m_bIgnoreSelf
protected

◆ m_bIsEnabled

bool SCR_BaseSupportStationComponent.m_bIsEnabled
protected

◆ m_bUseRangeBoundingBox

bool SCR_BaseSupportStationComponent.m_bUseRangeBoundingBox
protected

◆ m_eCurrentDamageState

EDamageState SCR_BaseSupportStationComponent.m_eCurrentDamageState = EDamageState.UNDAMAGED
protected

◆ m_eFactionUsageCheck

ESupportStationFactionUsage SCR_BaseSupportStationComponent.m_eFactionUsageCheck
protected

◆ m_eSupportStationPriority

ESupportStationPriority SCR_BaseSupportStationComponent.m_eSupportStationPriority
protected

◆ m_FactionAffiliationComponent

FactionAffiliationComponent SCR_BaseSupportStationComponent.m_FactionAffiliationComponent
protected

◆ m_fRange

float SCR_BaseSupportStationComponent.m_fRange
protected

◆ m_iBaseSupplyCostOnUse

int SCR_BaseSupportStationComponent.m_iBaseSupplyCostOnUse
protected

◆ m_Physics

Physics SCR_BaseSupportStationComponent.m_Physics
protected

◆ m_ResourceConsumer

SCR_ResourceConsumer SCR_BaseSupportStationComponent.m_ResourceConsumer
protected

◆ m_ResourceSubscriptionHandleConsumer

SCR_ResourceSystemSubscriptionHandleBase SCR_BaseSupportStationComponent.m_ResourceSubscriptionHandleConsumer
protected

◆ m_ServicePointComponent

SCR_ServicePointComponent SCR_BaseSupportStationComponent.m_ServicePointComponent
protected

◆ m_sOverrideUserActionName

LocalizedString SCR_BaseSupportStationComponent.m_sOverrideUserActionName
protected

◆ m_vOffset

vector SCR_BaseSupportStationComponent.m_vOffset
protected

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