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

Public Member Functions

override float GetResourceGridRange ()
 
float GetResourceRange ()
 
float GetBuyMultiplier ()
 
float GetSellMultiplier ()
 
override float GetAggregatedResourceValue ()
 
override float GetAggregatedMaxResourceValue ()
 
override int GetContainerCount ()
 
override SCR_ResourceContainerQueueBase GetContainerQueue ()
 
ScriptInvoker GetOnResourceRangeChanged ()
 
ScriptInvoker GetOnBuyMultiplierChanged ()
 
ScriptInvoker GetOnSellMultiplierChanged ()
 
ScriptInvoker GetOnConsumtionStateChanged ()
 
ScriptInvoker GetOnExchangeStateChanged ()
 
EResourceGeneratorID GetGeneratorIdentifier ()
 
override EResourceGeneratorID GetIdentifier ()
 
bool IsIgnoringItself ()
 
bool IsConsuming ()
 
bool IsExchanging ()
 
override bool ShouldUpdate ()
 
override bool CanInteractWith (notnull SCR_ResourceContainer container)
 
override int FindContainer (notnull SCR_ResourceContainer container)
 
bool SetResourceRange (float value, bool notifyChange=true)
 
bool SetBuyMultiplier (float value, bool notifyChange=true)
 
bool SetSellMultiplier (float value, bool notifyChange=true)
 
bool EnableConsumtion (bool shouldEnable, bool notifyChange=true)
 
bool EnableExchange (bool shouldEnable, bool notifyChange=true)
 
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_ResourceConsumtionResponse RequestAvailability (float resourceCost, bool performFullQuery=false)
 
SCR_ResourceConsumtionResponse RequestConsumtion (float resourceCost)
 
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 ()
 
float GetResourceGridRange ()
 
float GetAggregatedResourceValue ()
 
float GetAggregatedMaxResourceValue ()
 
int GetContainerCount ()
 
vector GetLastPosition ()
 
EResourceType GetResourceType ()
 
SCR_ResourceContainerQueueBase GetContainerQueue ()
 
ScriptInvoker GetOnResourcesChanged ()
 
ScriptInvoker 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 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 ()
 

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_ResourceConsumer instance, SSnapSerializerBase snapshot, ScriptCtx ctx)
 
static bool Extract (SCR_ResourceConsumer instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
 
static bool Inject (SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_ResourceConsumer instance)
 

Protected Member Functions

void OnResourceRangeChanged (float previousValue)
 
void OnBuyMultiplierChanged (float previousValue)
 
void OnSellMultiplierChanged (float previousValue)
 
void OnConsumtionStateChanged (float previousValue)
 
void OnExchangeStateChanged (float previousValue)
 
bool PropCompareNetworkedVariables (SSnapSerializerBase snapshot, ScriptCtx hint)
 
bool ExtractNetworkedVariables (SSnapSerializerBase snapshot, ScriptCtx hint)
 
bool InjectNetworkedVariables (SSnapSerializerBase snapshot, ScriptCtx hint)
 

Protected Attributes

EResourceGeneratorID m_eGeneratorIdentifier
 
float m_fResourceRange
 
float m_fBuyMultiplier
 
float m_fSellMultiplier
 
bool m_bIsIgnoringItself
 
ref SCR_ResourceConsumerContainerQueue m_ContainerQueue
 
bool m_bIsConsuming
 
bool m_bIsExchanging
 
ref ScriptInvoker m_OnResourceRangeChangedInvoker
 
ref ScriptInvoker m_OnBuyMultiplierChangedInvoker
 
ref ScriptInvoker m_OnSellMultiplierChangedInvoker
 
ref ScriptInvoker m_OnConsumtionStateChangedInvoker
 
ref ScriptInvoker m_OnExchangeStateChangedInvoker
 
- Protected Attributes inherited from SCR_ResourceInteractor
ref ScriptInvoker m_OnResourcesChangedInvoker
 
ref ScriptInvoker 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
 

Static Protected Attributes

static const int CODEC_CONSUMER_PACKET_BYTESIZE = 38
 
- Static Protected Attributes inherited from SCR_ResourceActor
static const float UPDATE_PERIOD = 10.0 / 60.0
 
static const int CODEC_GENERATOR_PACKET_BYTESIZE = 32
 

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
 

Member Function Documentation

◆ CanInteractWith()

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

Implements SCR_ResourceInteractor.

◆ Clear()

override void SCR_ResourceConsumer.Clear ( )

◆ DebugDraw()

void SCR_ResourceConsumer.DebugDraw ( )

◆ Decode()

static bool SCR_ResourceConsumer.Decode ( ScriptBitSerializer  packet,
ScriptCtx  ctx,
SSnapSerializerBase  snapshot 
)
static
Parameters
[in]packet
[in]ctx
[in]snapshot
Returns

◆ EnableConsumtion()

bool SCR_ResourceConsumer.EnableConsumtion ( bool  shouldEnable,
bool  notifyChange = true 
)
Parameters
[in]shouldEnable
[in]notifyChange
Returns

◆ EnableExchange()

bool SCR_ResourceConsumer.EnableExchange ( bool  shouldEnable,
bool  notifyChange = true 
)
Parameters
[in]shouldEnable
[in]notifyChange
Returns

◆ Encode()

static void SCR_ResourceConsumer.Encode ( SSnapSerializerBase  snapshot,
ScriptCtx  ctx,
ScriptBitSerializer  packet 
)
static
Parameters
[in]snapshot
[in]ctx
[in]packet

◆ Extract()

static bool SCR_ResourceConsumer.Extract ( SCR_ResourceConsumer  instance,
ScriptCtx  ctx,
SSnapSerializerBase  snapshot 
)
static
Parameters
[in]instance
[in]ctx
[in]snapshot
Returns

◆ ExtractNetworkedVariables()

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

◆ FindContainer()

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

Implements SCR_ResourceInteractor.

◆ GetAggregatedMaxResourceValue()

override float SCR_ResourceConsumer.GetAggregatedMaxResourceValue ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetAggregatedResourceValue()

override float SCR_ResourceConsumer.GetAggregatedResourceValue ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetBuyMultiplier()

float SCR_ResourceConsumer.GetBuyMultiplier ( )
Returns

◆ GetContainerCount()

override int SCR_ResourceConsumer.GetContainerCount ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetContainerQueue()

override SCR_ResourceContainerQueueBase SCR_ResourceConsumer.GetContainerQueue ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetGeneratorIdentifier()

EResourceGeneratorID SCR_ResourceConsumer.GetGeneratorIdentifier ( )
Returns

◆ GetIdentifier()

override EResourceGeneratorID SCR_ResourceConsumer.GetIdentifier ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetOnBuyMultiplierChanged()

ScriptInvoker SCR_ResourceConsumer.GetOnBuyMultiplierChanged ( )
Returns

◆ GetOnConsumtionStateChanged()

ScriptInvoker SCR_ResourceConsumer.GetOnConsumtionStateChanged ( )
Returns

◆ GetOnExchangeStateChanged()

ScriptInvoker SCR_ResourceConsumer.GetOnExchangeStateChanged ( )
Returns

◆ GetOnResourceRangeChanged()

ScriptInvoker SCR_ResourceConsumer.GetOnResourceRangeChanged ( )
Returns

◆ GetOnSellMultiplierChanged()

ScriptInvoker SCR_ResourceConsumer.GetOnSellMultiplierChanged ( )
Returns

◆ GetResourceGridRange()

override float SCR_ResourceConsumer.GetResourceGridRange ( )
Returns

Implements SCR_ResourceInteractor.

◆ GetResourceRange()

float SCR_ResourceConsumer.GetResourceRange ( )
Returns

◆ GetSellMultiplier()

float SCR_ResourceConsumer.GetSellMultiplier ( )
Returns

◆ Initialize()

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

Implements SCR_ResourceInteractor.

◆ Inject()

static bool SCR_ResourceConsumer.Inject ( SSnapSerializerBase  snapshot,
ScriptCtx  ctx,
SCR_ResourceConsumer  instance 
)
static
Parameters
[in]snapshot
[in]ctx
[in]instance
Returns

◆ InjectNetworkedVariables()

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

◆ IsConsuming()

bool SCR_ResourceConsumer.IsConsuming ( )
Returns

◆ IsExchanging()

bool SCR_ResourceConsumer.IsExchanging ( )
Returns

◆ IsIgnoringItself()

bool SCR_ResourceConsumer.IsIgnoringItself ( )
Returns

◆ OnBuyMultiplierChanged()

void SCR_ResourceConsumer.OnBuyMultiplierChanged ( float  previousValue)
protected

◆ OnConsumtionStateChanged()

void SCR_ResourceConsumer.OnConsumtionStateChanged ( float  previousValue)
protected

◆ OnExchangeStateChanged()

void SCR_ResourceConsumer.OnExchangeStateChanged ( float  previousValue)
protected

◆ OnResourceRangeChanged()

void SCR_ResourceConsumer.OnResourceRangeChanged ( float  previousValue)
protected

◆ OnSellMultiplierChanged()

void SCR_ResourceConsumer.OnSellMultiplierChanged ( float  previousValue)
protected

◆ PropCompare()

static bool SCR_ResourceConsumer.PropCompare ( SCR_ResourceConsumer  instance,
SSnapSerializerBase  snapshot,
ScriptCtx  ctx 
)
static
Parameters
[in]instance
[in]snapshot
[in]ctx
Returns

◆ PropCompareNetworkedVariables()

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

◆ RegisterContainer()

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

Implements SCR_ResourceInteractor.

◆ RegisterContainerForced()

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

Implements SCR_ResourceInteractor.

◆ RequestAvailability()

SCR_ResourceConsumtionResponse SCR_ResourceConsumer.RequestAvailability ( float  resourceCost,
bool  performFullQuery = false 
)
Parameters
[in]resourceCost
[in]performFullQuery
Returns

◆ RequestConsumtion()

SCR_ResourceConsumtionResponse SCR_ResourceConsumer.RequestConsumtion ( float  resourceCost)
Parameters
[in]resourceCost
Returns

◆ SetBuyMultiplier()

bool SCR_ResourceConsumer.SetBuyMultiplier ( float  value,
bool  notifyChange = true 
)
Parameters
[in]value
[in]notifyChange
Returns

◆ SetResourceRange()

bool SCR_ResourceConsumer.SetResourceRange ( float  value,
bool  notifyChange = true 
)
Parameters
[in]value
[in]notifyChange
Returns

◆ SetSellMultiplier()

bool SCR_ResourceConsumer.SetSellMultiplier ( float  value,
bool  notifyChange = true 
)
Parameters
[in]value
[in]notifyChange
Returns

◆ ShouldUpdate()

override bool SCR_ResourceConsumer.ShouldUpdate ( )
Returns

Implements SCR_ResourceActor.

◆ SnapCompare()

static bool SCR_ResourceConsumer.SnapCompare ( SSnapSerializerBase  lhs,
SSnapSerializerBase  rhs,
ScriptCtx  ctx 
)
static
Parameters
[in]lhs
[in]rhs
[in]ctx
Returns

◆ UnregisterContainer() [1/2]

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

Implements SCR_ResourceInteractor.

◆ UnregisterContainer() [2/2]

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

Implements SCR_ResourceInteractor.

◆ UpdateContainerMaxResourceValue()

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

Implements SCR_ResourceInteractor.

◆ UpdateContainerResourceValue()

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

Implements SCR_ResourceInteractor.

Member Data Documentation

◆ CODEC_CONSUMER_PACKET_BYTESIZE

const int SCR_ResourceConsumer.CODEC_CONSUMER_PACKET_BYTESIZE = 38
staticprotected

◆ m_bIsConsuming

bool SCR_ResourceConsumer.m_bIsConsuming
protected

◆ m_bIsExchanging

bool SCR_ResourceConsumer.m_bIsExchanging
protected

◆ m_bIsIgnoringItself

bool SCR_ResourceConsumer.m_bIsIgnoringItself
protected

◆ m_ContainerQueue

ref SCR_ResourceConsumerContainerQueue SCR_ResourceConsumer.m_ContainerQueue
protected

◆ m_eGeneratorIdentifier

EResourceGeneratorID SCR_ResourceConsumer.m_eGeneratorIdentifier
protected

◆ m_fBuyMultiplier

float SCR_ResourceConsumer.m_fBuyMultiplier
protected

◆ m_fResourceRange

float SCR_ResourceConsumer.m_fResourceRange
protected

◆ m_fSellMultiplier

float SCR_ResourceConsumer.m_fSellMultiplier
protected

◆ m_OnBuyMultiplierChangedInvoker

ref ScriptInvoker SCR_ResourceConsumer.m_OnBuyMultiplierChangedInvoker
protected

◆ m_OnConsumtionStateChangedInvoker

ref ScriptInvoker SCR_ResourceConsumer.m_OnConsumtionStateChangedInvoker
protected

◆ m_OnExchangeStateChangedInvoker

ref ScriptInvoker SCR_ResourceConsumer.m_OnExchangeStateChangedInvoker
protected

◆ m_OnResourceRangeChangedInvoker

ref ScriptInvoker SCR_ResourceConsumer.m_OnResourceRangeChangedInvoker
protected

◆ m_OnSellMultiplierChangedInvoker

ref ScriptInvoker SCR_ResourceConsumer.m_OnSellMultiplierChangedInvoker
protected

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