Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ResourceGrid.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_ResourceGridCell
 

Functions

int GetGridUpdateId ()
 
int GetFrameBudget ()
 
void ResetFrameBudget ()
 
int ComputeIndex (int x, int z)
 
int ComputeIndex (int x, int y, int z)
 
int ComputeIndex (vector position)
 
int IncreaseGridUpdateId ()
 
void FlagResourceItem (notnull SCR_ResourceComponent item)
 
void UnflagResourceItem (notnull SCR_ResourceComponent item)
 
void ProcessFlaggedItems ()
 
void UpdateResourceStaticItem (notnull SCR_ResourceComponent item)
 
void UpdateResourceDynamicItem (notnull SCR_ResourceComponent item)
 
void PromoteResourceItemToDynamic (notnull SCR_ResourceComponent item)
 
void PromoteResourceItemToStatic (notnull SCR_ResourceComponent item)
 
protected void QueryGridCells (int mins, int maxs, inout notnull array< SCR_ResourceGridCell > gridCells)
 
void QueryContainers (vector boundsMins, vector boundsMaxs, EResourceType resourceType)
 
void QueryContainers (int mins, int maxs, EResourceType resourceType)
 
void QueryContainers (vector boundsMins, vector boundsMaxs, EResourceType resourceType, int gridUpdateId)
 
void QueryContainers (int mins, int maxs, EResourceType resourceType, int gridUpdateId)
 
void UpdateInteractor (notnull SCR_ResourceInteractor interactor, bool useFrameBudget=false)
 
array< SCR_ResourceGeneratorQueryGenerators (float range, vector origin)
 
array< SCR_ResourceGeneratorQueryGenerators (vector mins, vector maxs, vector transform[4])
 
bool ProcessResourceItem (notnull SCR_ResourceComponent item)
 
void UnregisterResourceItem (notnull SCR_ResourceComponent item)
 
void SCR_ResourceGrid ()
 
void ~SCR_ResourceGrid ()
 

Variables

SCR_ResourceGridCell MAX_FRAME_BUDGET = 20
 
protected ref map< int, ref SCR_ResourceGridCellm_Cells
 
protected ref array< SCR_ResourceComponent > m_aFlaggedItems = {}
 
protected ref set< SCR_ResourceContainerm_aQueriedContainers = new set<SCR_ResourceContainer>()
 
protected int m_iGridUpdateId = int.MIN
 
protected int m_iGridPerimeter
 
protected int m_iGridPerimeterMinusOne
 
protected int m_iFrameBudget
 

Function Documentation

◆ ComputeIndex() [1/3]

int ComputeIndex ( int  x,
int  y,
int  z 
)

Definition at line 206 of file SCR_ResourceGrid.c.

◆ ComputeIndex() [2/3]

int ComputeIndex ( int  x,
int  z 
)

Definition at line 200 of file SCR_ResourceGrid.c.

◆ ComputeIndex() [3/3]

int ComputeIndex ( vector  position)

Definition at line 212 of file SCR_ResourceGrid.c.

◆ FlagResourceItem()

void FlagResourceItem ( notnull SCR_ResourceComponent  item)

Definition at line 227 of file SCR_ResourceGrid.c.

◆ GetFrameBudget()

int GetFrameBudget ( )

Definition at line 188 of file SCR_ResourceGrid.c.

◆ GetGridUpdateId()

int GetGridUpdateId ( )

Definition at line 182 of file SCR_ResourceGrid.c.

◆ IncreaseGridUpdateId()

int IncreaseGridUpdateId ( )

Definition at line 218 of file SCR_ResourceGrid.c.

◆ ProcessFlaggedItems()

void ProcessFlaggedItems ( )

Definition at line 239 of file SCR_ResourceGrid.c.

◆ ProcessResourceItem()

bool ProcessResourceItem ( notnull SCR_ResourceComponent  item)

TODO: Remove this hack.

Definition at line 705 of file SCR_ResourceGrid.c.

◆ PromoteResourceItemToDynamic()

void PromoteResourceItemToDynamic ( notnull SCR_ResourceComponent  item)

Definition at line 400 of file SCR_ResourceGrid.c.

◆ PromoteResourceItemToStatic()

void PromoteResourceItemToStatic ( notnull SCR_ResourceComponent  item)

Definition at line 415 of file SCR_ResourceGrid.c.

◆ QueryContainers() [1/4]

void QueryContainers ( int  mins,
int  maxs,
EResourceType  resourceType 
)

Extract grid bounds's components from the previous grid bounds.

Definition at line 488 of file SCR_ResourceGrid.c.

◆ QueryContainers() [2/4]

void QueryContainers ( int  mins,
int  maxs,
EResourceType  resourceType,
int  gridUpdateId 
)

Extract grid bounds's components from the previous grid bounds.

Definition at line 568 of file SCR_ResourceGrid.c.

◆ QueryContainers() [3/4]

void QueryContainers ( vector  boundsMins,
vector  boundsMaxs,
EResourceType  resourceType 
)

Extract grid bounds's components from the previous grid bounds.

Definition at line 455 of file SCR_ResourceGrid.c.

◆ QueryContainers() [4/4]

void QueryContainers ( vector  boundsMins,
vector  boundsMaxs,
EResourceType  resourceType,
int  gridUpdateId 
)

Extract grid bounds's components from the previous grid bounds.

Definition at line 521 of file SCR_ResourceGrid.c.

◆ QueryGenerators() [1/2]

array<SCR_ResourceGenerator> QueryGenerators ( float  range,
vector  origin 
)

NOTE: Expensive, used only for specific cases and/or debugging.

Definition at line 690 of file SCR_ResourceGrid.c.

◆ QueryGenerators() [2/2]

array<SCR_ResourceGenerator> QueryGenerators ( vector  mins,
vector  maxs,
vector  transform[4] 
)

NOTE: Expensive, used only for specific cases and/or debugging.

Definition at line 699 of file SCR_ResourceGrid.c.

◆ QueryGridCells()

protected void QueryGridCells ( int  mins,
int  maxs,
inout notnull array< SCR_ResourceGridCell gridCells 
)

Extract grid bounds's components from the previous grid bounds.

Definition at line 430 of file SCR_ResourceGrid.c.

◆ ResetFrameBudget()

void ResetFrameBudget ( )

Definition at line 194 of file SCR_ResourceGrid.c.

◆ SCR_ResourceGrid()

void SCR_ResourceGrid ( )

Definition at line 785 of file SCR_ResourceGrid.c.

◆ UnflagResourceItem()

void UnflagResourceItem ( notnull SCR_ResourceComponent  item)

Definition at line 233 of file SCR_ResourceGrid.c.

◆ UnregisterResourceItem()

void UnregisterResourceItem ( notnull SCR_ResourceComponent  item)

Get the previous grid bounds.

Cancel the operation if any of the previous grid bounds is invalid.

Extract grid bounds's items from the previous grid bounds.

Unregister item from every grid cell.

Set the item grid bounds to be invalid.

Definition at line 746 of file SCR_ResourceGrid.c.

◆ UpdateInteractor()

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

Definition at line 615 of file SCR_ResourceGrid.c.

◆ UpdateResourceDynamicItem()

void UpdateResourceDynamicItem ( notnull SCR_ResourceComponent  item)

Get the previous grid bounds.

Cancel the operation if any of the previous grid bounds is invalid.

Extract grid bounds's items from the previous grid bounds.

Definition at line 328 of file SCR_ResourceGrid.c.

◆ UpdateResourceStaticItem()

void UpdateResourceStaticItem ( notnull SCR_ResourceComponent  item)

Get the previous grid bounds.

Cancel the operation if any of the previous grid bounds is invalid.

Extract grid bounds's items from the previous grid bounds.

Definition at line 256 of file SCR_ResourceGrid.c.

◆ ~SCR_ResourceGrid()

void ~SCR_ResourceGrid ( )

Definition at line 808 of file SCR_ResourceGrid.c.

Variable Documentation

◆ m_aFlaggedItems

protected ref array<SCR_ResourceComponent> m_aFlaggedItems = {}

Definition at line 174 of file SCR_ResourceGrid.c.

◆ m_aQueriedContainers

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

Definition at line 175 of file SCR_ResourceGrid.c.

◆ m_Cells

protected ref map<int, ref SCR_ResourceGridCell> m_Cells

Definition at line 173 of file SCR_ResourceGrid.c.

◆ m_iFrameBudget

protected int m_iFrameBudget

Definition at line 179 of file SCR_ResourceGrid.c.

◆ m_iGridPerimeter

protected int m_iGridPerimeter

Definition at line 177 of file SCR_ResourceGrid.c.

◆ m_iGridPerimeterMinusOne

protected int m_iGridPerimeterMinusOne

Definition at line 178 of file SCR_ResourceGrid.c.

◆ m_iGridUpdateId

protected int m_iGridUpdateId = int.MIN

Definition at line 176 of file SCR_ResourceGrid.c.

◆ MAX_FRAME_BUDGET

SCR_ResourceGridCell MAX_FRAME_BUDGET = 20