|
Arma Reforger Script API
|
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 |
| 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.
| [in] | amount |
|
protected |
|
protected |
| float SCR_PlayerSupplyAllocationComponent.GetAvailableAllocatedSuppliesReplenishmentTimer | ( | ) |
| ScriptInvokerInt SCR_PlayerSupplyAllocationComponent.GetOnAvailableAllocatedSuppliesChanged | ( | ) |
| ScriptInvokerInt SCR_PlayerSupplyAllocationComponent.GetOnMilitarySupplyAllocationChanged | ( | ) |
| int SCR_PlayerSupplyAllocationComponent.GetPlayerAvailableAllocatedSupplies | ( | ) |
| int SCR_PlayerSupplyAllocationComponent.GetPlayerMilitarySupplyAllocation | ( | ) |
| bool SCR_PlayerSupplyAllocationComponent.HasPlayerEnoughAvailableAllocatedSupplies | ( | int | amount | ) |
| [in] | amount |
|
protected |
|
protected |
|
protected |
Adjust player Available Allocated Supplies value after requesting an item from arsenal.
| [in] | resourceComponent | |
| [in] | resourceName | |
| [in] | inventoryStorageComponent | |
| [in] | resourceType | |
| [in] | itemCost |
|
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.
| [in] | possessed | character |
|
protected |
|
protected |
Sets up the component if case Military Supply Allocation by Rank has been enabled or disabled.
| [in] | if | Military Supply Allocation by Rank is enabled or disabled |
|
protected |
|
protected |
Subscribes to player XP changed invoker.
| [in] | playerId |
|
protected |
Unsubscribes the rank changed invoker.
| [in] | playerId | |
| [in] | kick | cause |
| [in] | timeout |
|
protected |
Reset Available Allocated Supplies value to value of Military Supply Allocation Stops Available Allocated Supplies replenishment timer.
| [in] | investigatorContextData |
|
protected |
|
protected |
Player rank changed - set the Supply Allocation values according to new rank.
| [in] | prevRank | |
| [in] | newRank | |
| [in] | owner | |
| [in] | silent |
|
protected |
Updates Military Supply Allocation values based on player rank in an event of a unspawned player getting XP.
| [in] | playerId | |
| [in] | currentXP | |
| [in] | XPToAdd | |
| [in] | rewardId |
|
protected |
If player's Available Allocated Supplies are below the threshold value it gets replenished to threshold value.
| 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.
| [in] | amount |
|
protected |
Sets new Military Supply Allocation value corresponding to player rank.
| [in] | playerRank |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |