Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_SupportStationManagerComponent Interface Reference
Inheritance diagram for SCR_SupportStationManagerComponent:

Public Member Functions

ScriptInvokerBase< SupportStation_OnSupportStationExecuted > GetOnSupportStationExecutedSuccessfully ()
 Get script invoker when a Support station is executed There is always a chance that given component, entity or action is null depending if it was deleted.
 
SCR_BaseSupportStationComponent GetClosestValidSupportStation (ESupportStationType type, notnull IEntity actionUser, notnull IEntity actionOwner, SCR_BaseUseSupportStationAction action, vector actionPosition, out ESupportStationReasonInvalid reasonInvalid, out int supplyCost)
 Returns closest valid support station of given type.
 
void AddSupportStation (SCR_BaseSupportStationComponent supportStation)
 Add support station to manager.
 
void RemoveSupportStation (SCR_BaseSupportStationComponent supportStation)
 Remove support station from manager.
 
override void OnPostInit (IEntity owner)
 

Static Public Member Functions

static SCR_SupportStationManagerComponent GetInstance ()
 Get instance of SCR_SupportStationManagerComponent from GameMode.
 
static void OnSupportStationExecutedSuccessfully (notnull SCR_BaseSupportStationComponent supportStation, ESupportStationType supportStationType, IEntity actionUser, IEntity actionOwner, SCR_BaseUseSupportStationAction action)
 Called by Support stations when they are successfully executed (Local and server)
 
static void GetCombinedHitZonesStateForDamageSupportStation (notnull SCR_DamageManagerComponent damageManagerComponent, notnull array< HitZone > hitZones, float maxHealPercentage, out float roughHealPercentageStatus, out bool allHitZonesMaxHealth=true)
 Used in DamageSystemSupport station to return a rough percentage of the health the given damageManagercompnent has.
 

Protected Member Functions

int GetArrayOfSupportStationType (ESupportStationType type, notnull out array< SCR_BaseSupportStationComponent > supportStations)
 

Protected Attributes

ref map< ESupportStationType, ref array< SCR_BaseSupportStationComponent > > m_mSupportStations = new map<ESupportStationType, ref array<SCR_BaseSupportStationComponent>>()
 
ref ScriptInvokerBase< SupportStation_OnSupportStationExecuted > m_OnSupportStationExecutedSuccessfully = new ScriptInvokerBase<SupportStation_OnSupportStationExecuted>()
 

Static Protected Attributes

static SCR_SupportStationManagerComponent s_Instance
 

Member Function Documentation

◆ AddSupportStation()

void SCR_SupportStationManagerComponent.AddSupportStation ( SCR_BaseSupportStationComponent supportStation)

Add support station to manager.

Parameters
[in]supportStationSupport Station to add

◆ GetArrayOfSupportStationType()

int SCR_SupportStationManagerComponent.GetArrayOfSupportStationType ( ESupportStationType type,
notnull out array< SCR_BaseSupportStationComponent > supportStations )
protected

◆ GetClosestValidSupportStation()

SCR_BaseSupportStationComponent SCR_SupportStationManagerComponent.GetClosestValidSupportStation ( ESupportStationType type,
notnull IEntity actionUser,
notnull IEntity actionOwner,
SCR_BaseUseSupportStationAction action,
vector actionPosition,
out ESupportStationReasonInvalid reasonInvalid,
out int supplyCost )

Returns closest valid support station of given type.

Will only get support stations of highest availible priority

Parameters
[in]typeSupport Station Type
[in]actionUserUser that started the action
[in]actionOwnerentity on which the action manager was executed
[in]action
[in]actionPosition
[out]reasonInvalidReason why interaction was invalid (Will always take the highest reason why)
[out]supplyCostcost of closest valid support station, -1 if supplies are not enabled or if no support station is valid
Returns
Closest valid support station

◆ GetCombinedHitZonesStateForDamageSupportStation()

static void SCR_SupportStationManagerComponent.GetCombinedHitZonesStateForDamageSupportStation ( notnull SCR_DamageManagerComponent damageManagerComponent,
notnull array< HitZone > hitZones,
float maxHealPercentage,
out float roughHealPercentageStatus,
out bool allHitZonesMaxHealth = true )
static

Used in DamageSystemSupport station to return a rough percentage of the health the given damageManagercompnent has.

Take note that this will never be a precise number and it will ignore the default hitZone until all other hitZone percentage is greater than it

Parameters
[in]damageManagerComponentDamage Manager to check
[in]hitZones
[in]maxHealPercentageHow much can be healed max 1 == 100%
[out]roughHealPercentageStatusRough percentage of health of the entity to display to the player the status
[out]allHitZonesMaxHealthTrue if all hitZones are max health using maxHealPercentage

◆ GetInstance()

static SCR_SupportStationManagerComponent SCR_SupportStationManagerComponent.GetInstance ( )
static

Get instance of SCR_SupportStationManagerComponent from GameMode.

Returns
SupportStationManager

◆ GetOnSupportStationExecutedSuccessfully()

ScriptInvokerBase< SupportStation_OnSupportStationExecuted > SCR_SupportStationManagerComponent.GetOnSupportStationExecutedSuccessfully ( )

Get script invoker when a Support station is executed There is always a chance that given component, entity or action is null depending if it was deleted.

Highly unlikely but possible

Returns
Script Invoker

◆ OnPostInit()

override void SCR_SupportStationManagerComponent.OnPostInit ( IEntity owner)

◆ OnSupportStationExecutedSuccessfully()

static void SCR_SupportStationManagerComponent.OnSupportStationExecutedSuccessfully ( notnull SCR_BaseSupportStationComponent supportStation,
ESupportStationType supportStationType,
IEntity actionUser,
IEntity actionOwner,
SCR_BaseUseSupportStationAction action )
static

Called by Support stations when they are successfully executed (Local and server)

Parameters
[in]supportStationSupport station that was executed
[in]typeSupport Station Type
[in]actionUserUser that started the action
[in]actionOwnerentity on which the action manager was executed (This is in general the target of the support station action)
[in]actionAction used to execute the support station

◆ RemoveSupportStation()

void SCR_SupportStationManagerComponent.RemoveSupportStation ( SCR_BaseSupportStationComponent supportStation)

Remove support station from manager.

Parameters
[in]supportStationSupport Station to remove

Member Data Documentation

◆ m_mSupportStations

ref map<ESupportStationType, ref array<SCR_BaseSupportStationComponent> > SCR_SupportStationManagerComponent.m_mSupportStations = new map<ESupportStationType, ref array<SCR_BaseSupportStationComponent>>()
protected

◆ m_OnSupportStationExecutedSuccessfully

ref ScriptInvokerBase<SupportStation_OnSupportStationExecuted> SCR_SupportStationManagerComponent.m_OnSupportStationExecutedSuccessfully = new ScriptInvokerBase<SupportStation_OnSupportStationExecuted>()
protected

◆ s_Instance

SCR_SupportStationManagerComponent SCR_SupportStationManagerComponent.s_Instance
staticprotected

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