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

Public Member Functions

override int GetGridUpdateId ()
 
float GetResourceGridRange ()
 
float GetAggregatedResourceValue ()
 
float GetAggregatedMaxResourceValue ()
 
int GetContainerCount ()
 
vector GetLastPosition ()
 
EResourceType GetResourceType ()
 
SCR_ResourceContainerQueueBase GetContainerQueue ()
 
ScriptInvoker< SCR_ResourceInteractor, float > GetOnResourcesChanged ()
 
ScriptInvoker< SCR_ResourceInteractor, float > GetOnMaxResourcesChanged ()
 
EResourceGeneratorID GetIdentifier ()
 
override bool IsGridUpdateIdGreaterThan (int gridUpdateId)
 
bool IsAllowed (notnull SCR_ResourceContainer container)
 
bool IsAllowed (notnull IEntity entity, EResourceType resourceType)
 
bool CanInteractWith (notnull SCR_ResourceContainer container)
 
int FindContainer (notnull SCR_ResourceContainer container)
 
override void SetGridUpdateId (int gridUpdateId)
 
void UpdateLastPosition ()
 Updates the last known position of the interactor.
 
bool RegisterContainer (notnull SCR_ResourceContainer container)
 
bool RegisterContainerForced (notnull SCR_ResourceContainer container)
 
bool UnregisterContainer (int containerIndex)
 
bool UnregisterContainer (notnull SCR_ResourceContainer container)
 
void Replicate ()
 
void ReplicateEx ()
 
void UpdateContainerResourceValue (SCR_ResourceContainer container, float previousValue)
 
void UpdateContainerMaxResourceValue (SCR_ResourceContainer container, float previousValue)
 
void OnResourceGridUpdated (notnull SCR_ResourceGrid grid)
 Gets called when the interactor container queue is updated by the resource grid.
 
void OnResourcesChanged (float previousValue)
 
void OnMaxResourcesChanged (float previousValue)
 
void OnContainerRegistered (notnull SCR_ResourceContainer container)
 
void OnContainerUnregistered (notnull SCR_ResourceContainer container)
 
void Initialize (notnull IEntity owner)
 
override void Clear ()
 
- Public Member Functions inherited from SCR_ResourceActor
Color GetDebugColor ()
 
int GetGridUpdateId ()
 
vector GetOwnerOrigin ()
 
string GetDebugName ()
 
int GetDebugNameHash ()
 
SCR_ResourceComponent GetComponent ()
 
IEntity GetOwner ()
 
EResourceRights GetResourceRight ()
 
bool ShouldUpdate ()
 
bool IsIsolated ()
 
bool IsGridUpdateIdGreaterThan (int gridUpdateId)
 
void SetResourceRights (EResourceRights rights)
 
void SetGridUpdateId (int gridUpdateId)
 
void Update (float timeslice)
 
void UpdateInner (float timeslice)
 
void Clear ()
 
void ~SCR_ResourceActor ()
 

Protected Attributes

ref ScriptInvoker< SCR_ResourceInteractor, float > m_OnResourcesChangedInvoker
 
ref ScriptInvoker< SCR_ResourceInteractor, float > m_OnMaxResourcesChangedInvoker
 
int m_iGridUpdateId = int.MIN
 
float m_fAggregatedResourceValue = -1.0
 HOTFIX: Until replication issues are resolved.
 
float m_fAggregatedMaxResourceValue = -1.0
 
vector m_LastPosition = vector.Zero
 
- Protected Attributes inherited from SCR_ResourceActor
EResourceRights m_eResourceRights
 
EResourceType m_eResourceType
 
SCR_ResourceComponent m_ResourceComponent
 
IEntity m_Owner
 

Additional Inherited Members

- Public Attributes inherited from SCR_ResourceActor
string m_sDebugName
 
- Static Public Attributes inherited from SCR_ResourceActor
static const float RESOURCES_LOWER_LIMIT = 0.0
 
- Static Protected Attributes inherited from SCR_ResourceActor
static const float UPDATE_PERIOD = 10.0 / 60.0
 
static const int CODEC_GENERATOR_PACKET_BYTESIZE = 32
 

Member Function Documentation

◆ CanInteractWith()

bool SCR_ResourceInteractor.CanInteractWith ( notnull SCR_ResourceContainer  container)

◆ Clear()

override void SCR_ResourceInteractor.Clear ( )

◆ FindContainer()

int SCR_ResourceInteractor.FindContainer ( notnull SCR_ResourceContainer  container)
Parameters
[in]container
Returns

Implemented in SCR_ResourceConsumer, SCR_ResourceEncapsulator, and SCR_ResourceGenerator.

◆ GetAggregatedMaxResourceValue()

float SCR_ResourceInteractor.GetAggregatedMaxResourceValue ( )

◆ GetAggregatedResourceValue()

float SCR_ResourceInteractor.GetAggregatedResourceValue ( )

◆ GetContainerCount()

int SCR_ResourceInteractor.GetContainerCount ( )

◆ GetContainerQueue()

SCR_ResourceContainerQueueBase SCR_ResourceInteractor.GetContainerQueue ( )

◆ GetGridUpdateId()

override int SCR_ResourceInteractor.GetGridUpdateId ( )
Returns

Implements SCR_ResourceActor.

◆ GetIdentifier()

EResourceGeneratorID SCR_ResourceInteractor.GetIdentifier ( )
Returns

Implemented in SCR_ResourceConsumer, and SCR_ResourceGenerator.

◆ GetLastPosition()

vector SCR_ResourceInteractor.GetLastPosition ( )
Returns
The last processed world position of the interactor.

◆ GetOnMaxResourcesChanged()

ScriptInvoker< SCR_ResourceInteractor, float > SCR_ResourceInteractor.GetOnMaxResourcesChanged ( )
Returns

◆ GetOnResourcesChanged()

ScriptInvoker< SCR_ResourceInteractor, float > SCR_ResourceInteractor.GetOnResourcesChanged ( )
Returns

◆ GetResourceGridRange()

float SCR_ResourceInteractor.GetResourceGridRange ( )
Returns

Implemented in SCR_ResourceConsumer, and SCR_ResourceGenerator.

◆ GetResourceType()

EResourceType SCR_ResourceInteractor.GetResourceType ( )
Returns

◆ Initialize()

void SCR_ResourceInteractor.Initialize ( notnull IEntity  owner)

◆ IsAllowed() [1/2]

bool SCR_ResourceInteractor.IsAllowed ( notnull IEntity  entity,
EResourceType  resourceType 
)
Parameters
[in]entity
[in]resourceType
Returns

◆ IsAllowed() [2/2]

bool SCR_ResourceInteractor.IsAllowed ( notnull SCR_ResourceContainer  container)
Parameters
[in]container
Returns

Implemented in SCR_ResourceEncapsulator.

◆ IsGridUpdateIdGreaterThan()

override bool SCR_ResourceInteractor.IsGridUpdateIdGreaterThan ( int  gridUpdateId)
Parameters
[in]gridUpdateId
Returns

Implements SCR_ResourceActor.

◆ OnContainerRegistered()

void SCR_ResourceInteractor.OnContainerRegistered ( notnull SCR_ResourceContainer  container)

◆ OnContainerUnregistered()

void SCR_ResourceInteractor.OnContainerUnregistered ( notnull SCR_ResourceContainer  container)

◆ OnMaxResourcesChanged()

void SCR_ResourceInteractor.OnMaxResourcesChanged ( float  previousValue)
Parameters
[in]previousValue

Implemented in SCR_ResourceEncapsulator.

◆ OnResourceGridUpdated()

void SCR_ResourceInteractor.OnResourceGridUpdated ( notnull SCR_ResourceGrid  grid)

Gets called when the interactor container queue is updated by the resource grid.

Parameters
[in]gridThe resource grid that cause the update.

Implemented in SCR_ResourceConsumerServicePoint, and SCR_ResourceGeneratorServicePoint.

◆ OnResourcesChanged()

void SCR_ResourceInteractor.OnResourcesChanged ( float  previousValue)
Parameters
[in]previousValue

Implemented in SCR_ResourceEncapsulator.

◆ RegisterContainer()

bool SCR_ResourceInteractor.RegisterContainer ( notnull SCR_ResourceContainer  container)
Parameters
[in]container
Returns

Implemented in SCR_ResourceConsumer, SCR_ResourceEncapsulator, and SCR_ResourceGenerator.

◆ RegisterContainerForced()

bool SCR_ResourceInteractor.RegisterContainerForced ( notnull SCR_ResourceContainer  container)
Parameters
[in]container
Returns

Implemented in SCR_ResourceConsumer, SCR_ResourceEncapsulator, and SCR_ResourceGenerator.

◆ Replicate()

void SCR_ResourceInteractor.Replicate ( )

◆ ReplicateEx()

void SCR_ResourceInteractor.ReplicateEx ( )

◆ SetGridUpdateId()

override void SCR_ResourceInteractor.SetGridUpdateId ( int  gridUpdateId)
Parameters
[in]gridUpdateId

Implements SCR_ResourceActor.

◆ UnregisterContainer() [1/2]

bool SCR_ResourceInteractor.UnregisterContainer ( int  containerIndex)
Parameters
[in]containerIndex
Returns

Implemented in SCR_ResourceConsumer, SCR_ResourceEncapsulator, and SCR_ResourceGenerator.

◆ UnregisterContainer() [2/2]

bool SCR_ResourceInteractor.UnregisterContainer ( notnull SCR_ResourceContainer  container)
Parameters
[in]container
Returns

Implemented in SCR_ResourceConsumer, SCR_ResourceEncapsulator, and SCR_ResourceGenerator.

◆ UpdateContainerMaxResourceValue()

void SCR_ResourceInteractor.UpdateContainerMaxResourceValue ( SCR_ResourceContainer  container,
float  previousValue 
)
Parameters
[in]container
[in]previousValue

Implemented in SCR_ResourceConsumer, SCR_ResourceEncapsulator, and SCR_ResourceGenerator.

◆ UpdateContainerResourceValue()

void SCR_ResourceInteractor.UpdateContainerResourceValue ( SCR_ResourceContainer  container,
float  previousValue 
)
Parameters
[in]container
[in]previousValue

Implemented in SCR_ResourceConsumer, SCR_ResourceEncapsulator, and SCR_ResourceGenerator.

◆ UpdateLastPosition()

void SCR_ResourceInteractor.UpdateLastPosition ( )

Updates the last known position of the interactor.

Member Data Documentation

◆ m_fAggregatedMaxResourceValue

float SCR_ResourceInteractor.m_fAggregatedMaxResourceValue = -1.0
protected

◆ m_fAggregatedResourceValue

float SCR_ResourceInteractor.m_fAggregatedResourceValue = -1.0
protected

HOTFIX: Until replication issues are resolved.

◆ m_iGridUpdateId

int SCR_ResourceInteractor.m_iGridUpdateId = int.MIN
protected

◆ m_LastPosition

vector SCR_ResourceInteractor.m_LastPosition = vector.Zero
protected

◆ m_OnMaxResourcesChangedInvoker

ref ScriptInvoker<SCR_ResourceInteractor, float> SCR_ResourceInteractor.m_OnMaxResourcesChangedInvoker
protected

◆ m_OnResourcesChangedInvoker

ref ScriptInvoker<SCR_ResourceInteractor, float> SCR_ResourceInteractor.m_OnResourcesChangedInvoker
protected

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