Arma Reforger Script API
|
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. | |
![]() | |
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. | |
![]() | |
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_ResourceComponent > | m_aFlaggedItems = {} |
ref set< SCR_ResourceContainer > | m_aQueriedContainers = new set<SCR_ResourceContainer>() |
int | m_iGridUpdateId = int.MIN |
int | m_iFrameBudget |
void SCR_ResourceGrid.FlagResourceItem | ( | notnull SCR_ResourceComponent | item | ) |
Flags a resource component (Considered items in this context) to be registered into the grid.
[in] | item | The resource component to flag for registration. |
int SCR_ResourceGrid.GetFrameBudget | ( | ) |
int SCR_ResourceGrid.GetGridUpdateId | ( | ) |
int SCR_ResourceGrid.IncreaseGridUpdateId | ( | ) |
Increases the update ID of the grid by 1.
void SCR_ResourceGrid.ProcessFlaggedItems | ( | ) |
Registers all resource components that are flagged into the grid.
|
protected |
Registers a resource component (Considered items in this context) in the grid.
[in] | item | The resource component to register. |
void SCR_ResourceGrid.ResetFrameBudget | ( | ) |
void SCR_ResourceGrid.UnflagResourceItem | ( | notnull SCR_ResourceComponent | item | ) |
Unflags a resource component (Considered items in this context) from being registered into the grid.
[in] | item | The resource component to unflag from registration. |
void SCR_ResourceGrid.UnregisterResourceItem | ( | notnull SCR_ResourceComponent | item | ) |
Unregisters a resource component (Considered items in this context) from the grid.
[in] | item | The resource component to unregister. |
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.
[in] | interactor | The resource interactor to update. |
[in] | useFrameBudget | If the frame budgeting should be used. |
void SCR_ResourceGrid.UpdateResourceItem | ( | notnull SCR_ResourceComponent | item | ) |
Updates the state of a resource component (Considered items in this context) in the grid.
[in] | item | The resource component to update. |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |