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

Go to the source code of this file.

Classes

class  SCR_BaseSupportStationComponentClass

Enumerations

enum  ESupportStationFactionUsage {
  SAME_CURRENT_FACTION = 1 << 0 , FRIENDLY_CURRENT_FACTION = 1 << 1 , SAME_DEFAULT_FACTION = 1 << 2 , FRIENDLY_DEFAULT_FACTION = 1 << 3 ,
  DISALLOW_USE_ON_CURRENT_FACTION_NULL = 1 << 4
}

Functions

SCR_BaseSupportStationComponentClass ScriptComponentClass Attribute ("0", desc:"Priority dictates the array order when trying to get the first availible support station. Higher priority means it is closer to the start of the array. Think of grabbing a composition refuel station before a vehicle refuel station.", uiwidget:UIWidgets.SearchComboBox, enums:ParamEnumArray.FromEnum(ESupportStationPriority), category:"General Settings")] protected ESupportStationPriority m_eSupportStationPriority
bool GetSendNotificationOnUse ()
bool CanMoveWithPhysics ()
bool AllowGetFactionFromParent ()
SCR_AudioSourceConfiguration GetOnUseAudioConfig ()
SCR_AudioSourceConfiguration CreateOnUseAudioConfig (ResourceName soundFile, string soundEvent)
void GetCharacterVoiceSoundEventVariables (out string characterVoiceEventOnUse, out int characterVoicePriority)
void OnExecutedServer (notnull IEntity actionOwner, notnull IEntity actionUser, notnull SCR_BaseUseSupportStationAction action)
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)
void OnSuccessfullyExecuted (IEntity actionOwner, IEntity actionUser, SCR_BaseUseSupportStationAction action)
void PlaySoundEffect (SCR_AudioSourceConfiguration audioConfig, notnull IEntity soundOwner, SCR_BaseUseSupportStationAction action)
void PlayCharacterVoiceEvent (IEntity character)
bool IsValid (IEntity actionOwner, IEntity actionUser, SCR_BaseUseSupportStationAction action, vector actionPosition, out ESupportStationReasonInvalid reasonInvalid, out int supplyAmount)
ESupportStationType GetSupportStationType ()
ESupportStationPriority GetSupportStationPriority ()
void SetEnabled (bool enable)
void SetEnabledBroadcast (bool enable)
bool IsEnabled ()
 Returns true if the light is enabled.
ScriptInvoker GetOnEnabledChanged ()
bool HasSupplyGainInsteadOfCost (SCR_BaseUseSupportStationAction action)
bool IsMoving ()
bool IsUserValidFaction (IEntity user)
SCR_Faction GetFaction ()
int GetSupplyAmountAction (IEntity actionOwner, IEntity actionUser, SCR_BaseUseSupportStationAction action)
int GetMaxAvailableSupplies ()
bool HasEnoughSupplies (IEntity actionOwner, IEntity actionUser, int supplyAmountToCheck)
bool OnConsumeSuppliesServer (int amount)
bool HasSpaceForSuppliesGeneration (IEntity actionOwner, IEntity actionUser, int supplyAmountToCheck)
bool OnGenerateSuppliesServer (int amount)
bool AreSuppliesEnabled ()
SCR_ResourceConsumer GetResourceConsumer ()
SCR_ResourceGenerator GetResourceGenerator ()
SCR_ResourceComponent GetResourceComponent ()
float GetRange ()
bool IsInRange (notnull IEntity actionOwner, vector actionPosition)
bool UsesRange ()
vector GetPosition ()
vector GetOffset ()
bool IgnoreSelf ()
LocalizedString GetOverrideUserActionName ()
void GetPlayerIdsInVehicle (IEntity vehicle, out notnull array< int > playerIds)
bool OverrideDamageState (EDamageState damageState, bool checkIfHasDamageSystem)
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.
override bool RplSave (ScriptBitWriter writer)
override bool RplLoad (ScriptBitReader reader)
bool InitValidSetup ()
void TEMP_OnInteractorReplicated ()
override void EOnInit (IEntity owner)
void DelayedInit (IEntity owner)
override void OnPostInit (IEntity owner)
 Editable Mine.
override void OnDelete (IEntity owner)

Variables

bool m_bIsVehicle
bool m_bSendNotificationOnUse
bool m_bAllowGetFactionFromParent
ResourceName m_sOnUseSoundEffectFile
string m_sOnUseSoundEffectEventName
string m_sCharacterVoiceEventOnUse
int m_iCharacterVoicePriority
ref SCR_AudioSourceConfiguration m_OnUseAudioSourceConfiguration
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
SCR_ResourceGenerator m_ResourceGenerator
ref ScriptInvoker Event_OnEnabledChanged
Vehicle m_PhysicsVehicle
EDamageState m_eCurrentDamageState = EDamageState.UNDAMAGED
FactionAffiliationComponent m_FactionAffiliationComponent
SCR_ServicePointComponent m_ServicePointComponent
SCR_ResourceSystemSubscriptionHandleBase m_ResourceSubscriptionHandler

Enumeration Type Documentation

◆ ESupportStationFactionUsage

Enumerator
SAME_CURRENT_FACTION 

The user with the same faction as the current faction can interact with the support station.

FRIENDLY_CURRENT_FACTION 

The user with a faction that is a friendly faction as the current faction can interact with the support GetSupportStationType.

SAME_DEFAULT_FACTION 

The user with the same faction as the default faction of the support station can interact with the support station.

FRIENDLY_DEFAULT_FACTION 

he user with a faction that is a friendly faction to the default faction of the support station can interact with the support station

DISALLOW_USE_ON_CURRENT_FACTION_NULL 

If set it disallows the support station to be used if the faction of the Support station is not set. Only valid if Default faction is not checked.

Definition at line 1416 of file SCR_BaseSupportStationComponent.c.

Function Documentation

◆ AddRemoveOnDamageStateChanged()

void AddRemoveOnDamageStateChanged ( IEntity owner,
bool subscribe )
protected

Grabs either damage manager or HitZoneContainer to subscribe to OnDamageStateChanged.

Definition at line 993 of file SCR_BaseSupportStationComponent.c.

◆ AllowGetFactionFromParent()

bool Attribute::AllowGetFactionFromParent ( )
protected

Check if prefab allows the faction affiliation component to be obtained from parent Used in init

Returns
If allowed to get from parent

Definition at line 43 of file SCR_BaseSupportStationComponent.c.

◆ AreSuppliesEnabled()

bool AreSuppliesEnabled ( )
protected

Get if support station should check for supplies

Returns
true if should check for supplies

Definition at line 736 of file SCR_BaseSupportStationComponent.c.

◆ Attribute()

SCR_BaseSupportStationComponentClass ScriptComponentClass Attribute ( "0" ,
desc:"Priority dictates the array order when trying to get the first availible support station. Higher priority means it is closer to the start of the array. Think of grabbing a composition refuel station before a vehicle refuel station." ,
uiwidget:UIWidgets. SearchComboBox,
enums:ParamEnumArray. FromEnumESupportStationPriority,
category:"General Settings"  )

◆ CanMoveWithPhysics()

bool Attribute::CanMoveWithPhysics ( )
protected

If false then the object has no physics to move it self. If true it means it can be moved via physics which means it checks the rigid body if it has a velocity and does not allow to be used if it has

Returns
false if no physics can move it

Definition at line 34 of file SCR_BaseSupportStationComponent.c.

◆ CreateOnUseAudioConfig()

SCR_AudioSourceConfiguration CreateOnUseAudioConfig ( ResourceName soundFile,
string soundEvent )
protected

Get Audio config to play Will create it if it not yet exists. Returns null if no SoundFile or SoundEvent is set

Returns
Sound Config

Definition at line 65 of file SCR_BaseSupportStationComponent.c.

◆ DelayedInit()

void DelayedInit ( IEntity owner)
protected

Definition at line 1093 of file SCR_BaseSupportStationComponent.c.

◆ FindEntityIds()

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

Definition at line 161 of file SCR_BaseSupportStationComponent.c.

◆ GetCharacterVoiceSoundEventVariables()

void Attribute::GetCharacterVoiceSoundEventVariables ( out string characterVoiceEventOnUse,
out int characterVoicePriority )
protected

Get the character voice varriables on support station use

Parameters
[out]characterVoiceEventOnUseVoice event to use
[out]characterVoicePrioritypriority of voice event

Definition at line 86 of file SCR_BaseSupportStationComponent.c.

◆ GetEntitiesFromID()

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

Definition at line 184 of file SCR_BaseSupportStationComponent.c.

◆ GetFaction()

SCR_Faction GetFaction ( )
protected

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

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

Definition at line 597 of file SCR_BaseSupportStationComponent.c.

◆ GetMaxAvailableSupplies()

int GetMaxAvailableSupplies ( )
protected

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

Returns

Definition at line 626 of file SCR_BaseSupportStationComponent.c.

◆ GetOffset()

vector GetOffset ( )
protected
Returns
returns the offset of the position

Definition at line 819 of file SCR_BaseSupportStationComponent.c.

◆ GetOnEnabledChanged()

ScriptInvoker GetOnEnabledChanged ( )
protected

Get scriptinvoker when support station is enabled changes. Sends over bool with enabled state

Returns
script invoker

Definition at line 493 of file SCR_BaseSupportStationComponent.c.

◆ GetOnUseAudioConfig()

SCR_AudioSourceConfiguration GetOnUseAudioConfig ( )
protected

Get Audio config to play Will create it if it not yet exists. Returns null if no SoundFile or SoundEvent is set

Returns
Sound Config

Definition at line 52 of file SCR_BaseSupportStationComponent.c.

◆ GetOverrideUserActionName()

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

Definition at line 836 of file SCR_BaseSupportStationComponent.c.

◆ GetPlayerIdsInVehicle()

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

Definition at line 874 of file SCR_BaseSupportStationComponent.c.

◆ GetPosition()

vector GetPosition ( )
protected

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

Returns
Returns center + offset

Definition at line 811 of file SCR_BaseSupportStationComponent.c.

◆ GetRange()

float GetRange ( )
protected

Returns range. If range is disabled it will be -1

Returns
Range Of support station

Definition at line 771 of file SCR_BaseSupportStationComponent.c.

◆ GetResourceComponent()

SCR_ResourceComponent GetResourceComponent ( )
protected

Definition at line 758 of file SCR_BaseSupportStationComponent.c.

◆ GetResourceConsumer()

SCR_ResourceConsumer GetResourceConsumer ( )
protected
Returns
Resource Consumer if entity has any

Definition at line 745 of file SCR_BaseSupportStationComponent.c.

◆ GetResourceGenerator()

SCR_ResourceGenerator GetResourceGenerator ( )
protected
Returns
Resource Generator if entity has any

Definition at line 752 of file SCR_BaseSupportStationComponent.c.

◆ GetSendNotificationOnUse()

return classData &&classData GetSendNotificationOnUse ( )
protected
Initial value:
{
SCR_CharacterSoundComponentClass GetComponentData()
IEntity GetOwner()
Owner entity of the fuel tank.

Get if notification should be shown on Action executed

Returns
True if should show notification

Definition at line 26 of file SCR_BaseSupportStationComponent.c.

◆ GetSupplyAmountAction()

int GetSupplyAmountAction ( IEntity actionOwner,
IEntity actionUser,
SCR_BaseUseSupportStationAction action )
protected

Get the minimum amount of supplies needed for the action (Can be cost or gain) 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

Definition at line 618 of file SCR_BaseSupportStationComponent.c.

◆ GetSupportStationPriority()

ESupportStationPriority GetSupportStationPriority ( )
protected

Get Support station priority.

Returns
priority of support station

Definition at line 440 of file SCR_BaseSupportStationComponent.c.

◆ GetSupportStationType()

ESupportStationType GetSupportStationType ( )
protected

Get Support station type.

Returns
type of support station

Definition at line 430 of file SCR_BaseSupportStationComponent.c.

◆ HasEnoughSupplies()

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

Definition at line 650 of file SCR_BaseSupportStationComponent.c.

◆ HasSpaceForSuppliesGeneration()

bool HasSpaceForSuppliesGeneration ( IEntity actionOwner,
IEntity actionUser,
int supplyAmountToCheck )
protected

Definition at line 690 of file SCR_BaseSupportStationComponent.c.

◆ HasSupplyGainInsteadOfCost()

bool HasSupplyGainInsteadOfCost ( SCR_BaseUseSupportStationAction action)
protected

Override if it has supply gain instead of cost

Parameters
[in]actionAction of the support station
Returns
True if it is gain and false if it is cost

Definition at line 505 of file SCR_BaseSupportStationComponent.c.

◆ IgnoreSelf()

bool IgnoreSelf ( )
protected

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

Definition at line 829 of file SCR_BaseSupportStationComponent.c.

◆ InitValidSetup()

bool InitValidSetup ( )
protected

Definition at line 1061 of file SCR_BaseSupportStationComponent.c.

◆ IsInRange()

bool IsInRange ( notnull IEntity actionOwner,
vector actionPosition )
protected

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

Definition at line 780 of file SCR_BaseSupportStationComponent.c.

◆ IsMoving()

bool IsMoving ( )
protected

Definition at line 512 of file SCR_BaseSupportStationComponent.c.

◆ IsUserValidFaction()

bool IsUserValidFaction ( IEntity user)
protected

Definition at line 527 of file SCR_BaseSupportStationComponent.c.

◆ IsValid()

bool IsValid ( IEntity actionOwner,
IEntity actionUser,
SCR_BaseUseSupportStationAction action,
vector actionPosition,
out ESupportStationReasonInvalid reasonInvalid,
out int supplyAmount )
protected

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]supplyAmountcost or gain of supplies when using the support station
Returns

Definition at line 332 of file SCR_BaseSupportStationComponent.c.

◆ OnConsumeSuppliesServer()

bool 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

Definition at line 677 of file SCR_BaseSupportStationComponent.c.

◆ OnDamageStateChanged()

void OnDamageStateChanged ( EDamageState damageState)
protected

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

Definition at line 957 of file SCR_BaseSupportStationComponent.c.

◆ OnDelete()

override void OnDelete ( IEntity owner)
protected

Definition at line 1186 of file SCR_BaseSupportStationComponent.c.

◆ OnExecute()

void 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

Definition at line 219 of file SCR_BaseSupportStationComponent.c.

◆ OnExecuteBroadcast()

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

Definition at line 198 of file SCR_BaseSupportStationComponent.c.

◆ OnExecutedServer()

void OnExecutedServer ( notnull IEntity actionOwner,
notnull IEntity actionUser,
notnull SCR_BaseUseSupportStationAction action )
protected

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

Definition at line 147 of file SCR_BaseSupportStationComponent.c.

◆ OnGenerateSuppliesServer()

bool OnGenerateSuppliesServer ( int amount)
protected

Action is executed and supplies are added to a storage (Server Only)

Parameters
[in]amount
Returns
true if there was enough supply storage and they are added to the storage

Definition at line 722 of file SCR_BaseSupportStationComponent.c.

◆ OnHitZoneDamageStateChanged()

void OnHitZoneDamageStateChanged ( SCR_HitZone defaultHitZone)
protected

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

Definition at line 949 of file SCR_BaseSupportStationComponent.c.

◆ OnSuccessfullyExecuted()

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

Definition at line 227 of file SCR_BaseSupportStationComponent.c.

◆ OverrideDamageState()

bool OverrideDamageState ( EDamageState damageState,
bool checkIfHasDamageSystem )
protected

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

Definition at line 919 of file SCR_BaseSupportStationComponent.c.

◆ PlayCharacterVoiceEvent()

void PlayCharacterVoiceEvent ( IEntity character)
protected

Definition at line 295 of file SCR_BaseSupportStationComponent.c.

◆ PlaySoundEffect()

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

Definition at line 235 of file SCR_BaseSupportStationComponent.c.

◆ RplLoad()

override bool RplLoad ( ScriptBitReader reader)
protected

Definition at line 1047 of file SCR_BaseSupportStationComponent.c.

◆ RplSave()

override bool RplSave ( ScriptBitWriter writer)
protected

Definition at line 1039 of file SCR_BaseSupportStationComponent.c.

◆ SetEnabledBroadcast()

void SetEnabledBroadcast ( bool enable)
protected

Definition at line 461 of file SCR_BaseSupportStationComponent.c.

◆ TEMP_OnInteractorReplicated()

void TEMP_OnInteractorReplicated ( )
protected

Definition at line 1074 of file SCR_BaseSupportStationComponent.c.

◆ UsesRange()

bool UsesRange ( )
protected

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

Definition at line 802 of file SCR_BaseSupportStationComponent.c.

Variable Documentation

◆ Event_OnEnabledChanged

ref ScriptInvoker Event_OnEnabledChanged
protected

Definition at line 130 of file SCR_BaseSupportStationComponent.c.

◆ m_bAllowGetFactionFromParent

bool m_bAllowGetFactionFromParent
protected

Definition at line 7 of file SCR_BaseSupportStationComponent.c.

◆ m_bIgnoreSelf

bool m_bIgnoreSelf
protected

Definition at line 115 of file SCR_BaseSupportStationComponent.c.

◆ m_bIsEnabled

bool m_bIsEnabled
protected

Definition at line 109 of file SCR_BaseSupportStationComponent.c.

◆ m_bIsVehicle

bool m_bIsVehicle
protected

Definition at line 1 of file SCR_BaseSupportStationComponent.c.

◆ m_bSendNotificationOnUse

bool m_bSendNotificationOnUse
protected

Definition at line 4 of file SCR_BaseSupportStationComponent.c.

◆ m_bUseRangeBoundingBox

bool m_bUseRangeBoundingBox
protectedbound

Definition at line 106 of file SCR_BaseSupportStationComponent.c.

◆ m_eCurrentDamageState

EDamageState m_eCurrentDamageState = EDamageState.UNDAMAGED
protected

Definition at line 134 of file SCR_BaseSupportStationComponent.c.

◆ m_eFactionUsageCheck

ESupportStationFactionUsage m_eFactionUsageCheck
protected

Definition at line 121 of file SCR_BaseSupportStationComponent.c.

◆ m_FactionAffiliationComponent

FactionAffiliationComponent m_FactionAffiliationComponent
protected

Definition at line 135 of file SCR_BaseSupportStationComponent.c.

◆ m_fRange

float m_fRange
protected

Definition at line 103 of file SCR_BaseSupportStationComponent.c.

◆ m_iBaseSupplyCostOnUse

int m_iBaseSupplyCostOnUse
protected

Definition at line 112 of file SCR_BaseSupportStationComponent.c.

◆ m_iCharacterVoicePriority

int m_iCharacterVoicePriority
protected

Definition at line 19 of file SCR_BaseSupportStationComponent.c.

◆ m_OnUseAudioSourceConfiguration

ref SCR_AudioSourceConfiguration m_OnUseAudioSourceConfiguration
protected

Definition at line 21 of file SCR_BaseSupportStationComponent.c.

◆ m_PhysicsVehicle

Vehicle m_PhysicsVehicle
protected

Definition at line 133 of file SCR_BaseSupportStationComponent.c.

◆ m_ResourceConsumer

SCR_ResourceConsumer m_ResourceConsumer
protected

Definition at line 126 of file SCR_BaseSupportStationComponent.c.

◆ m_ResourceGenerator

SCR_ResourceGenerator m_ResourceGenerator
protected

Definition at line 127 of file SCR_BaseSupportStationComponent.c.

◆ m_ResourceSubscriptionHandler

SCR_ResourceSystemSubscriptionHandleBase m_ResourceSubscriptionHandler
protected

Definition at line 138 of file SCR_BaseSupportStationComponent.c.

◆ m_sCharacterVoiceEventOnUse

string m_sCharacterVoiceEventOnUse
protected

Definition at line 16 of file SCR_BaseSupportStationComponent.c.

◆ m_ServicePointComponent

SCR_ServicePointComponent m_ServicePointComponent
protected

Definition at line 136 of file SCR_BaseSupportStationComponent.c.

◆ m_sOnUseSoundEffectEventName

string m_sOnUseSoundEffectEventName
protected

Definition at line 13 of file SCR_BaseSupportStationComponent.c.

◆ m_sOnUseSoundEffectFile

ResourceName m_sOnUseSoundEffectFile
protected

Definition at line 10 of file SCR_BaseSupportStationComponent.c.

◆ m_sOverrideUserActionName

LocalizedString m_sOverrideUserActionName
protected

Definition at line 124 of file SCR_BaseSupportStationComponent.c.

◆ m_vOffset

vector m_vOffset
protected

Definition at line 118 of file SCR_BaseSupportStationComponent.c.