Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_ResourceGrid Interface Reference
Inheritance diagram for SCR_ResourceGrid:
AABGridMap BaseGridMap

Public Member Functions

int GetGridUpdateId ()
 
int GetFrameBudget ()
 
void ResetFrameBudget ()
 
int IncreaseGridUpdateId ()
 Increases the update ID of the grid by 1.
 
void FlagResourceItem (notnull SCR_ResourceComponent item)
 Flags a resource component (Considered items in this context) to be registered into the grid.
 
void UnflagResourceItem (notnull SCR_ResourceComponent item)
 Unflags a resource component (Considered items in this context) from being registered into the grid.
 
void ProcessFlaggedItems ()
 Registers all resource components that are flagged into the grid.
 
void UpdateResourceItem (notnull SCR_ResourceComponent item)
 Updates the state of a resource component (Considered items in this context) in the grid.
 
void UnregisterResourceItem (notnull SCR_ResourceComponent item)
 Unregisters a resource component (Considered items in this context) from the grid.
 
void UpdateInteractor (notnull SCR_ResourceInteractor interactor, bool useFrameBudget=false)
 Attempts to update the state of a resource interactor, basically will try to perform a query on the grid for containers it can reach with it's detection radius and then perform a check to see if it can be registered as valid container for the interactor.
 
- Public Member Functions inherited from AABGridMap
void AABGridMap (float cellSize=100.0)
 
proto external void Insert (IEntity entity, vector mins, vector maxs, bool isDynamic, int mask=0)
 Insert the entity inside the GridMap with specific params.
 
proto external void UpdateAABB (IEntity entity, vector mins, vector maxs)
 Update the AABB of the specified entity.
 
- Public Member Functions inherited from BaseGridMap
void BaseGridMap (float cellSize=100.0)
 
proto external void UpdatePosition (notnull IEntity entity, vector newPosition)
 Force update the position of an entity.
 
proto external void Remove (IEntity entity)
 Remove the entity from the GridMap.
 
proto external void Update ()
 Update the grid map entities positions. Update the position of dynamic entities and static entities if set up.
 
proto external int FindEntitiesInRange (out notnull array< IEntity > entities, vector origin, float range, int mask=0)
 Returns registered entities in given categories within a given range with a specific mask.
 
proto external void SetUpdateOfStaticEntities (bool state)
 Set if the static entities should still be checked during the update.
 
proto external void SetNmbOfStaticEntitiesUpdated (int nmb)
 Set the number of static entities updated per update.
 

Static Public Attributes

static const int MAX_FRAME_BUDGET = 20
 

Protected Member Functions

bool ProcessResourceItem (notnull SCR_ResourceComponent item)
 Registers a resource component (Considered items in this context) in the grid.
 

Protected Attributes

ref array< SCR_ResourceComponentm_aFlaggedItems = {}
 
ref set< SCR_ResourceContainerm_aQueriedContainers = new set<SCR_ResourceContainer>()
 
int m_iGridUpdateId = int.MIN
 
int m_iFrameBudget
 

Member Function Documentation

◆ FlagResourceItem()

void SCR_ResourceGrid.FlagResourceItem ( notnull SCR_ResourceComponent item)

Flags a resource component (Considered items in this context) to be registered into the grid.

Parameters
[in]itemThe resource component to flag for registration.

◆ GetFrameBudget()

int SCR_ResourceGrid.GetFrameBudget ( )
Returns
The current frame budget remaining for the amount of containers to process in the iteration.

◆ GetGridUpdateId()

int SCR_ResourceGrid.GetGridUpdateId ( )
Returns
The latest update ID of the grid.

◆ IncreaseGridUpdateId()

int SCR_ResourceGrid.IncreaseGridUpdateId ( )

Increases the update ID of the grid by 1.

Returns
The latest update ID of the grid.

◆ ProcessFlaggedItems()

void SCR_ResourceGrid.ProcessFlaggedItems ( )

Registers all resource components that are flagged into the grid.

◆ ProcessResourceItem()

bool SCR_ResourceGrid.ProcessResourceItem ( notnull SCR_ResourceComponent item)
protected

Registers a resource component (Considered items in this context) in the grid.

Parameters
[in]itemThe resource component to register.

◆ ResetFrameBudget()

void SCR_ResourceGrid.ResetFrameBudget ( )

◆ UnflagResourceItem()

void SCR_ResourceGrid.UnflagResourceItem ( notnull SCR_ResourceComponent item)

Unflags a resource component (Considered items in this context) from being registered into the grid.

Parameters
[in]itemThe resource component to unflag from registration.

◆ UnregisterResourceItem()

void SCR_ResourceGrid.UnregisterResourceItem ( notnull SCR_ResourceComponent item)

Unregisters a resource component (Considered items in this context) from the grid.

Parameters
[in]itemThe resource component to unregister.

◆ UpdateInteractor()

void SCR_ResourceGrid.UpdateInteractor ( notnull SCR_ResourceInteractor interactor,
bool useFrameBudget = false )

Attempts to update the state of a resource interactor, basically will try to perform a query on the grid for containers it can reach with it's detection radius and then perform a check to see if it can be registered as valid container for the interactor.

It will also recheck the current queue of containers to see if anything should be kept.

Parameters
[in]interactorThe resource interactor to update.
[in]useFrameBudgetIf the frame budgeting should be used.

◆ UpdateResourceItem()

void SCR_ResourceGrid.UpdateResourceItem ( notnull SCR_ResourceComponent item)

Updates the state of a resource component (Considered items in this context) in the grid.

Parameters
[in]itemThe resource component to update.

Member Data Documentation

◆ m_aFlaggedItems

ref array<SCR_ResourceComponent> SCR_ResourceGrid.m_aFlaggedItems = {}
protected

◆ m_aQueriedContainers

ref set<SCR_ResourceContainer> SCR_ResourceGrid.m_aQueriedContainers = new set<SCR_ResourceContainer>()
protected

◆ m_iFrameBudget

int SCR_ResourceGrid.m_iFrameBudget
protected

◆ m_iGridUpdateId

int SCR_ResourceGrid.m_iGridUpdateId = int.MIN
protected

◆ MAX_FRAME_BUDGET

const int SCR_ResourceGrid.MAX_FRAME_BUDGET = 20
static

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