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

Public Member Functions

ScriptInvokerInt GetOnAvailableAllocatedSuppliesChanged ()
 
ScriptInvokerInt GetOnMilitarySupplyAllocationChanged ()
 
int GetPlayerMilitarySupplyAllocation ()
 
int GetPlayerAvailableAllocatedSupplies ()
 
float GetAvailableAllocatedSuppliesReplenishmentTimer ()
 
void AddPlayerAvailableAllocatedSupplies (int amount)
 Adds param[in] amount to player Available Allocated Supplies New Available Allocated Supplies value is clamped so it does not go below 0 ar above Military Supply Allocation value.
 
void SetPlayerMilitarySupplyAllocation (int amount)
 Sets Military Supply Allocation to new value Adds the difference between old and new Military Supply Allocation value to the current Available Allocated Supplies value.
 
bool HasPlayerEnoughAvailableAllocatedSupplies (int amount)
 

Protected Member Functions

override void OnPostInit (IEntity owner)
 
bool SetUpConfigData ()
 
void AvailableAllocatedSuppliesReplicated ()
 
void MilitarySupplyAllocationReplicated ()
 
void ReplenishAvailableAllocatedSupplies ()
 If player's Available Allocated Supplies are below the threshold value it gets replenished to threshold value.
 
void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 Unsubscribes the rank changed invoker.
 
void OnCharacterPossessed (IEntity character)
 Is called when player spawns or gets control of his character after reconnect Sets up the events for supply allocation changes based on rank.
 
void OnPlayerConnected (int playerId)
 Subscribes to player XP changed invoker.
 
void OnUnspawnedPlayerXPChanged (int playerId, int currentXP, int XPToAdd, SCR_EXPRewards rewardId)
 Updates Military Supply Allocation values based on player rank in an event of a unspawned player getting XP.
 
void OnPlayerKilled (SCR_InstigatorContextData investigatorContextData)
 Reset Available Allocated Supplies value to value of Military Supply Allocation Stops Available Allocated Supplies replenishment timer.
 
void OnRankChanged (SCR_ECharacterRank prevRank, SCR_ECharacterRank newRank, IEntity owner, bool silent)
 Player rank changed - set the Supply Allocation values according to new rank.
 
void SetSupplyAllocationValuesByRank (SCR_ECharacterRank playerRank=SCR_ECharacterRank.INVALID)
 Sets new Military Supply Allocation value corresponding to player rank.
 
void OnArsenalRequestItem (notnull SCR_ResourceComponent resourceComponent, ResourceName resourceName, IEntity requesterEntity, notnull BaseInventoryStorageComponent inventoryStorageComponent, EResourceType resourceType, int itemCost)
 Adjust player Available Allocated Supplies value after requesting an item from arsenal.
 
bool IsProxy ()
 
void OnMilitarySupplyAllocationEnabledChanged (bool enable)
 
void OnEnabled (bool enable)
 Sets up the component if case Military Supply Allocation by Rank has been enabled or disabled.
 
override void EOnFrame (IEntity owner, float timeSlice)
 
override void OnDelete (IEntity owner)
 

Protected Attributes

int m_iPlayerMilitarySupplyAllocation
 
int m_iPlayerAvailableAllocatedSupplies
 
ref ScriptInvokerInt m_AvailableAllocatedSuppliesChanged
 
ref ScriptInvokerInt m_MilitarySupplyAllocationChanged
 
SCR_PlayerController m_PlayerController
 
ref SCR_MilitarySupplyAllocationConfig m_MilitarySupplyAllocationConfig
 
float m_fAvailableAllocatedSuppliesReplenishmentTimer = -1
 
bool m_bIsEnabled
 

Member Function Documentation

◆ AddPlayerAvailableAllocatedSupplies()

void SCR_PlayerSupplyAllocationComponent.AddPlayerAvailableAllocatedSupplies ( int amount)

Adds param[in] amount to player Available Allocated Supplies New Available Allocated Supplies value is clamped so it does not go below 0 ar above Military Supply Allocation value.

Parameters
[in]amount

◆ AvailableAllocatedSuppliesReplicated()

void SCR_PlayerSupplyAllocationComponent.AvailableAllocatedSuppliesReplicated ( )
protected

◆ EOnFrame()

override void SCR_PlayerSupplyAllocationComponent.EOnFrame ( IEntity owner,
float timeSlice )
protected

◆ GetAvailableAllocatedSuppliesReplenishmentTimer()

float SCR_PlayerSupplyAllocationComponent.GetAvailableAllocatedSuppliesReplenishmentTimer ( )

◆ GetOnAvailableAllocatedSuppliesChanged()

ScriptInvokerInt SCR_PlayerSupplyAllocationComponent.GetOnAvailableAllocatedSuppliesChanged ( )

◆ GetOnMilitarySupplyAllocationChanged()

ScriptInvokerInt SCR_PlayerSupplyAllocationComponent.GetOnMilitarySupplyAllocationChanged ( )

◆ GetPlayerAvailableAllocatedSupplies()

int SCR_PlayerSupplyAllocationComponent.GetPlayerAvailableAllocatedSupplies ( )

◆ GetPlayerMilitarySupplyAllocation()

int SCR_PlayerSupplyAllocationComponent.GetPlayerMilitarySupplyAllocation ( )

◆ HasPlayerEnoughAvailableAllocatedSupplies()

bool SCR_PlayerSupplyAllocationComponent.HasPlayerEnoughAvailableAllocatedSupplies ( int amount)
Parameters
[in]amount
Returns
true if player has at least the same amount of Available Allocated Supplies as param[in] amount

◆ IsProxy()

bool SCR_PlayerSupplyAllocationComponent.IsProxy ( )
protected
Returns

◆ MilitarySupplyAllocationReplicated()

void SCR_PlayerSupplyAllocationComponent.MilitarySupplyAllocationReplicated ( )
protected

◆ OnArsenalRequestItem()

void SCR_PlayerSupplyAllocationComponent.OnArsenalRequestItem ( notnull SCR_ResourceComponent resourceComponent,
ResourceName resourceName,
IEntity requesterEntity,
notnull BaseInventoryStorageComponent inventoryStorageComponent,
EResourceType resourceType,
int itemCost )
protected

Adjust player Available Allocated Supplies value after requesting an item from arsenal.

Parameters
[in]resourceComponent
[in]resourceName
[in]inventoryStorageComponent
[in]resourceType
[in]itemCost

◆ OnCharacterPossessed()

void SCR_PlayerSupplyAllocationComponent.OnCharacterPossessed ( IEntity character)
protected

Is called when player spawns or gets control of his character after reconnect Sets up the events for supply allocation changes based on rank.

Parameters
[in]possessedcharacter

◆ OnDelete()

override void SCR_PlayerSupplyAllocationComponent.OnDelete ( IEntity owner)
protected

◆ OnEnabled()

void SCR_PlayerSupplyAllocationComponent.OnEnabled ( bool enable)
protected

Sets up the component if case Military Supply Allocation by Rank has been enabled or disabled.

Parameters
[in]ifMilitary Supply Allocation by Rank is enabled or disabled

◆ OnMilitarySupplyAllocationEnabledChanged()

void SCR_PlayerSupplyAllocationComponent.OnMilitarySupplyAllocationEnabledChanged ( bool enable)
protected

◆ OnPlayerConnected()

void SCR_PlayerSupplyAllocationComponent.OnPlayerConnected ( int playerId)
protected

Subscribes to player XP changed invoker.

Parameters
[in]playerId

◆ OnPlayerDisconnected()

void SCR_PlayerSupplyAllocationComponent.OnPlayerDisconnected ( int playerId,
KickCauseCode cause,
int timeout )
protected

Unsubscribes the rank changed invoker.

Parameters
[in]playerId
[in]kickcause
[in]timeout

◆ OnPlayerKilled()

void SCR_PlayerSupplyAllocationComponent.OnPlayerKilled ( SCR_InstigatorContextData investigatorContextData)
protected

Reset Available Allocated Supplies value to value of Military Supply Allocation Stops Available Allocated Supplies replenishment timer.

Parameters
[in]investigatorContextData

◆ OnPostInit()

override void SCR_PlayerSupplyAllocationComponent.OnPostInit ( IEntity owner)
protected

◆ OnRankChanged()

void SCR_PlayerSupplyAllocationComponent.OnRankChanged ( SCR_ECharacterRank prevRank,
SCR_ECharacterRank newRank,
IEntity owner,
bool silent )
protected

Player rank changed - set the Supply Allocation values according to new rank.

Parameters
[in]prevRank
[in]newRank
[in]owner
[in]silent

◆ OnUnspawnedPlayerXPChanged()

void SCR_PlayerSupplyAllocationComponent.OnUnspawnedPlayerXPChanged ( int playerId,
int currentXP,
int XPToAdd,
SCR_EXPRewards rewardId )
protected

Updates Military Supply Allocation values based on player rank in an event of a unspawned player getting XP.

Parameters
[in]playerId
[in]currentXP
[in]XPToAdd
[in]rewardId

◆ ReplenishAvailableAllocatedSupplies()

void SCR_PlayerSupplyAllocationComponent.ReplenishAvailableAllocatedSupplies ( )
protected

If player's Available Allocated Supplies are below the threshold value it gets replenished to threshold value.

◆ SetPlayerMilitarySupplyAllocation()

void SCR_PlayerSupplyAllocationComponent.SetPlayerMilitarySupplyAllocation ( int amount)

Sets Military Supply Allocation to new value Adds the difference between old and new Military Supply Allocation value to the current Available Allocated Supplies value.

Parameters
[in]amount

◆ SetSupplyAllocationValuesByRank()

void SCR_PlayerSupplyAllocationComponent.SetSupplyAllocationValuesByRank ( SCR_ECharacterRank playerRank = SCR_ECharacterRank::INVALID)
protected

Sets new Military Supply Allocation value corresponding to player rank.

Parameters
[in]playerRank

◆ SetUpConfigData()

bool SCR_PlayerSupplyAllocationComponent.SetUpConfigData ( )
protected
Returns
Whether config is set up correctly

Member Data Documentation

◆ m_AvailableAllocatedSuppliesChanged

ref ScriptInvokerInt SCR_PlayerSupplyAllocationComponent.m_AvailableAllocatedSuppliesChanged
protected

◆ m_bIsEnabled

bool SCR_PlayerSupplyAllocationComponent.m_bIsEnabled
protected

◆ m_fAvailableAllocatedSuppliesReplenishmentTimer

float SCR_PlayerSupplyAllocationComponent.m_fAvailableAllocatedSuppliesReplenishmentTimer = -1
protected

◆ m_iPlayerAvailableAllocatedSupplies

int SCR_PlayerSupplyAllocationComponent.m_iPlayerAvailableAllocatedSupplies
protected

◆ m_iPlayerMilitarySupplyAllocation

int SCR_PlayerSupplyAllocationComponent.m_iPlayerMilitarySupplyAllocation
protected

◆ m_MilitarySupplyAllocationChanged

ref ScriptInvokerInt SCR_PlayerSupplyAllocationComponent.m_MilitarySupplyAllocationChanged
protected

◆ m_MilitarySupplyAllocationConfig

ref SCR_MilitarySupplyAllocationConfig SCR_PlayerSupplyAllocationComponent.m_MilitarySupplyAllocationConfig
protected

◆ m_PlayerController

SCR_PlayerController SCR_PlayerSupplyAllocationComponent.m_PlayerController
protected

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