Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_ResourceGenerator Interface Reference
Inheritance diagram for SCR_ResourceGenerator:
SCR_ResourceInteractor SCR_ResourceActor SCR_ResourceGeneratorMilitaryBase SCR_ResourceGeneratorServicePoint

Public Member Functions

override float GetResourceGridRange ()
 
float GetStorageRange ()
 
float GetResourceMultiplier ()
 
override EResourceGeneratorID GetIdentifier ()
 
override float GetAggregatedResourceValue ()
 
override float GetAggregatedMaxResourceValue ()
 
override int GetContainerCount ()
 
override SCR_ResourceContainerQueueBase GetContainerQueue ()
 
bool IsIgnoringItself ()
 
override bool CanInteractWith (notnull SCR_ResourceContainer container)
 
override int FindContainer (notnull SCR_ResourceContainer container)
 
override bool RegisterContainer (notnull SCR_ResourceContainer container)
 
override bool RegisterContainerForced (notnull SCR_ResourceContainer container)
 
override bool UnregisterContainer (int containerIndex)
 
override bool UnregisterContainer (notnull SCR_ResourceContainer container)
 
SCR_ResourceGenerationResponse RequestAvailability (float resourceAmount)
 
SCR_ResourceGenerationResponse RequestGeneration (float resourceAmount, SCR_ResourceGenerator generator=null)
 
void DebugDraw ()
 
override void UpdateContainerResourceValue (SCR_ResourceContainer container, float previousValue)
 
override void UpdateContainerMaxResourceValue (SCR_ResourceContainer container, float previousValue)
 
override void Initialize (notnull IEntity owner)
 
override void Clear ()
 
- Public Member Functions inherited from SCR_ResourceInteractor
override int GetGridUpdateId ()
 
vector GetLastPosition ()
 
EResourceType GetResourceType ()
 
ScriptInvoker< SCR_ResourceInteractor, float > GetOnResourcesChanged ()
 
ScriptInvoker< SCR_ResourceInteractor, float > GetOnMaxResourcesChanged ()
 
override bool IsGridUpdateIdGreaterThan (int gridUpdateId)
 
bool IsAllowed (notnull SCR_ResourceContainer container)
 
bool IsAllowed (notnull IEntity entity, EResourceType resourceType)
 
override void SetGridUpdateId (int gridUpdateId)
 
void UpdateLastPosition ()
 Updates the last known position of the interactor.
 
void Replicate ()
 
void ReplicateEx ()
 
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)
 
- Public Member Functions inherited from SCR_ResourceActor
Color GetDebugColor ()
 
vector GetOwnerOrigin ()
 
string GetDebugName ()
 
int GetDebugNameHash ()
 
SCR_ResourceComponent GetComponent ()
 
IEntity GetOwner ()
 
EResourceRights GetResourceRight ()
 
bool ShouldUpdate ()
 
bool IsIsolated ()
 
void SetResourceRights (EResourceRights rights)
 
void Update (float timeslice)
 Method used to perform a periodic/iterative update on the state of the resource actor.
 
void Update (WorldTimestamp timestamp)
 Method used to perform a periodic/iterative update on the state of the resource actor.
 
void UpdateInner (float timeslice)
 
void ~SCR_ResourceActor ()
 

Static Public Member Functions

static void Encode (SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
 
static bool Decode (ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
 
static bool SnapCompare (SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx ctx)
 
static bool PropCompare (SCR_ResourceGenerator instance, SSnapSerializerBase snapshot, ScriptCtx ctx)
 
static bool Extract (SCR_ResourceGenerator instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
 
static bool Inject (SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_ResourceGenerator instance)
 

Public Attributes

EResourceGeneratorID m_eIdentifier
 
- Public Attributes inherited from SCR_ResourceActor
string m_sDebugName
 

Protected Member Functions

bool PropCompareNetworkedVariables (SSnapSerializerBase snapshot, ScriptCtx hint)
 
bool ExtractNetworkedVariables (SSnapSerializerBase snapshot, ScriptCtx hint)
 
bool InjectNetworkedVariables (SSnapSerializerBase snapshot, ScriptCtx hint)
 

Protected Attributes

float m_fResourceMultiplier
 
float m_fStorageRange
 
bool m_bIsIgnoringItself
 
ref SCR_ResourceGeneratorContainerQueue m_ContainerQueue
 
ref array< ref SCR_ResourceGeneratorActionBasem_aActions
 
- Protected Attributes inherited from SCR_ResourceInteractor
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

- 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()

override bool SCR_ResourceGenerator.CanInteractWith ( notnull SCR_ResourceContainer container)
Parameters
[in]container
Returns

Implements SCR_ResourceInteractor.

Implemented in SCR_ResourceGeneratorServicePoint.

◆ Clear()

override void SCR_ResourceGenerator.Clear ( )

◆ DebugDraw()

void SCR_ResourceGenerator.DebugDraw ( )

◆ Decode()

static bool SCR_ResourceGenerator.Decode ( ScriptBitSerializer packet,
ScriptCtx ctx,
SSnapSerializerBase snapshot )
static

◆ Encode()

static void SCR_ResourceGenerator.Encode ( SSnapSerializerBase snapshot,
ScriptCtx ctx,
ScriptBitSerializer packet )
static

◆ Extract()

static bool SCR_ResourceGenerator.Extract ( SCR_ResourceGenerator instance,
ScriptCtx ctx,
SSnapSerializerBase snapshot )
static

◆ ExtractNetworkedVariables()

bool SCR_ResourceGenerator.ExtractNetworkedVariables ( SSnapSerializerBase snapshot,
ScriptCtx hint )
protected

◆ FindContainer()

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

Implements SCR_ResourceInteractor.

◆ GetAggregatedMaxResourceValue()

override float SCR_ResourceGenerator.GetAggregatedMaxResourceValue ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetAggregatedResourceValue()

override float SCR_ResourceGenerator.GetAggregatedResourceValue ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetContainerCount()

override int SCR_ResourceGenerator.GetContainerCount ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetContainerQueue()

override SCR_ResourceContainerQueueBase SCR_ResourceGenerator.GetContainerQueue ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetIdentifier()

override EResourceGeneratorID SCR_ResourceGenerator.GetIdentifier ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetResourceGridRange()

override float SCR_ResourceGenerator.GetResourceGridRange ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetResourceMultiplier()

float SCR_ResourceGenerator.GetResourceMultiplier ( )

◆ GetStorageRange()

float SCR_ResourceGenerator.GetStorageRange ( )

◆ Initialize()

override void SCR_ResourceGenerator.Initialize ( notnull IEntity owner)
Parameters
[in]owner

Implements SCR_ResourceInteractor.

Implemented in SCR_ResourceGeneratorServicePoint.

◆ Inject()

static bool SCR_ResourceGenerator.Inject ( SSnapSerializerBase snapshot,
ScriptCtx ctx,
SCR_ResourceGenerator instance )
static

◆ InjectNetworkedVariables()

bool SCR_ResourceGenerator.InjectNetworkedVariables ( SSnapSerializerBase snapshot,
ScriptCtx hint )
protected

◆ IsIgnoringItself()

bool SCR_ResourceGenerator.IsIgnoringItself ( )

◆ PropCompare()

static bool SCR_ResourceGenerator.PropCompare ( SCR_ResourceGenerator instance,
SSnapSerializerBase snapshot,
ScriptCtx ctx )
static

◆ PropCompareNetworkedVariables()

bool SCR_ResourceGenerator.PropCompareNetworkedVariables ( SSnapSerializerBase snapshot,
ScriptCtx hint )
protected

◆ RegisterContainer()

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

Implements SCR_ResourceInteractor.

◆ RegisterContainerForced()

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

Implements SCR_ResourceInteractor.

◆ RequestAvailability()

SCR_ResourceGenerationResponse SCR_ResourceGenerator.RequestAvailability ( float resourceAmount)

◆ RequestGeneration()

SCR_ResourceGenerationResponse SCR_ResourceGenerator.RequestGeneration ( float resourceAmount,
SCR_ResourceGenerator generator = null )

◆ SnapCompare()

static bool SCR_ResourceGenerator.SnapCompare ( SSnapSerializerBase lhs,
SSnapSerializerBase rhs,
ScriptCtx ctx )
static

◆ UnregisterContainer() [1/2]

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

Implements SCR_ResourceInteractor.

◆ UnregisterContainer() [2/2]

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

Implements SCR_ResourceInteractor.

◆ UpdateContainerMaxResourceValue()

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

Implements SCR_ResourceInteractor.

◆ UpdateContainerResourceValue()

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

Implements SCR_ResourceInteractor.

Member Data Documentation

◆ m_aActions

ref array<ref SCR_ResourceGeneratorActionBase> SCR_ResourceGenerator.m_aActions
protected

◆ m_bIsIgnoringItself

bool SCR_ResourceGenerator.m_bIsIgnoringItself
protected

◆ m_ContainerQueue

ref SCR_ResourceGeneratorContainerQueue SCR_ResourceGenerator.m_ContainerQueue
protected

◆ m_eIdentifier

EResourceGeneratorID SCR_ResourceGenerator.m_eIdentifier

◆ m_fResourceMultiplier

float SCR_ResourceGenerator.m_fResourceMultiplier
protected

◆ m_fStorageRange

float SCR_ResourceGenerator.m_fStorageRange
protected

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