Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditableEntityCore Class Reference
Inheritance diagram for SCR_EditableEntityCore:

Protected Member Functions

void AddToRoot (SCR_EditableEntityComponent entity)
void RemoveFromRoot (SCR_EditableEntityComponent entity)
void RegisterEntity (SCR_EditableEntityComponent entity)
void UnRegisterEntity (SCR_EditableEntityComponent entity, IEntity owner=null)
void AddOrphan (RplId parentId, RplId orphanId)
int RemoveOrphans (RplId parentId, out notnull array< SCR_EditableEntityComponent > outOrphans)
void GetAllEntities (out notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect=false, bool skipIgnored=false)
void GetAllEntities (out notnull set< SCR_EditableEntityComponent > entities, EEditableEntityAccessKey accessKey)
int GetAllEntitiesByAuthorUID (out notnull set< SCR_EditableEntityComponent > entities, string playerUID)
int GetAllEntitiesByAuthorID (out notnull set< SCR_EditableEntityComponent > entities, int playerID)
SCR_EditableEntityComponent FindNearestEntity (vector pos, EEditableEntityType type, EEditableEntityFlag flags=0, bool onlyDirect=true)
SCR_EditableEntityInteraction GetEntityInteraction (EEditableEntityType type)
bool GetEntityCanBeControlled (EEditableEntityType type)
EEditableEntityBudget GetBudgetForEntityType (EEditableEntityType entityType)
void GetBudgets (out notnull array< ref SCR_EditableEntityCoreBudgetSetting > budgets)
bool GetBudget (EEditableEntityBudget budgetType, out SCR_EditableEntityCoreBudgetSetting budgetSettings)
void UpdateBudgetForEntity (SCR_EditableEntityComponent entity, bool added, IEntity owner)
void QueueBudgetChange (EEditableEntityBudget budgetType, bool added, SCR_EditableEntityComponent entity, SCR_EntityBudgetValue budgetCost=null)
void ApplyQueuedBudgetChanges ()
void UpdateBudget (EEditableEntityBudget budgetType, bool added, SCR_EditableEntityComponent entity, SCR_EntityBudgetValue budgetCost=null)
void DeleteAllEntitiesThatHaveBudgetOfType (EEditableEntityBudget budgetToFree)
void RegisterAuthorServer (SCR_EditableEntityAuthor newAuthor)
void AuthorEntityRemovedServer (SCR_EditableEntityAuthor newAuthor)
set< SCR_EditableEntityAuthor > GetAllAuthorsServer ()
void RequestAllAuthors ()
void AddAuthorOnRequest (notnull SCR_EditableEntityAuthor newAuthor)
 Do not call this function yourself, this has to be requested by server.
void OnAuthorRequestFinished ()
SCR_EditableEntityAuthor FindAuthorByIdentity (UUID authorIdentity)
void OnPlayerIdentityAvailable (int playerId)
override void OnUpdate (float timeSlice)
override void OnGameStart ()
override void OnBeforeWorldCleanup ()
void Restart ()
void Init ()
void SCR_EditableEntityCore ()

Static Protected Member Functions

static int GetAllEntitiesByAuthorUIDExt (out notnull set< SCR_EditableEntityComponent > entities, string playerUID)
static int GetAllEntitiesByAuthorIDExt (out notnull set< SCR_EditableEntityComponent > entities, int playerID)

Protected Attributes

float m_fPlayerDrawDistance
float m_fPlayerVehicleDistanceModifier
bool m_bAuthorRequesting
ref ScriptInvoker_AuthorRequestedFinishedEvent Event_OnAuthorsRegisteredFinished = new ScriptInvoker_AuthorRequestedFinishedEvent

Detailed Description

Core component to manage SCR_EditableEntityComponent. The list of editable entities tracked here is local!

Examples
F:/Games/AReforger/scripts/Game/Editor/Containers/EditableEntityFilters/SCR_RenderedEditableEntityFilter.c.

Definition at line 19 of file SCR_EditableEntityCore.c.

Constructor & Destructor Documentation

◆ SCR_EditableEntityCore()

void SCR_EditableEntityCore::SCR_EditableEntityCore ( )
inlineprotected

Definition at line 1359 of file SCR_EditableEntityCore.c.

Member Function Documentation

◆ AddAuthorOnRequest()

void SCR_EditableEntityCore::AddAuthorOnRequest ( notnull SCR_EditableEntityAuthor newAuthor)
inlineprotected

Do not call this function yourself, this has to be requested by server.

Definition at line 1146 of file SCR_EditableEntityCore.c.

◆ AddOrphan()

void SCR_EditableEntityCore::AddOrphan ( RplId parentId,
RplId orphanId )
inlineprotected

Add orphaned entity. This can happen when an entity is intialised, but its parent was not yet streamed in. In such case the entity is added to the list of orphans. Once the parent is initialised, it will be added to it.

Parameters
parentIdReplication ID of the parent entity
parentIdReplication ID of the orphan entity

Definition at line 160 of file SCR_EditableEntityCore.c.

◆ AddToRoot()

void SCR_EditableEntityCore::AddToRoot ( SCR_EditableEntityComponent entity)
inlineprotected
Parameters
entity

Definition at line 99 of file SCR_EditableEntityCore.c.

◆ ApplyQueuedBudgetChanges()

void SCR_EditableEntityCore::ApplyQueuedBudgetChanges ( )
inlineprotected

Definition at line 952 of file SCR_EditableEntityCore.c.

◆ AuthorEntityRemovedServer()

void SCR_EditableEntityCore::AuthorEntityRemovedServer ( SCR_EditableEntityAuthor newAuthor)
inlineprotected

Definition at line 1092 of file SCR_EditableEntityCore.c.

◆ DeleteAllEntitiesThatHaveBudgetOfType()

void SCR_EditableEntityCore::DeleteAllEntitiesThatHaveBudgetOfType ( EEditableEntityBudget budgetToFree)
inlineprotected

Definition at line 1035 of file SCR_EditableEntityCore.c.

◆ FindAuthorByIdentity()

SCR_EditableEntityAuthor SCR_EditableEntityCore::FindAuthorByIdentity ( UUID authorIdentity)
inlineprotected

Definition at line 1181 of file SCR_EditableEntityCore.c.

◆ FindNearestEntity()

SCR_EditableEntityComponent SCR_EditableEntityCore::FindNearestEntity ( vector pos,
EEditableEntityType type,
EEditableEntityFlag flags = 0,
bool onlyDirect = true )
inlineprotected

Find nearest entity to given position.

Parameters
posPosition from which the distance is measured
typeRequired entity type
flagsRequired entity flags
onlyDirectTrue to scan only root entities, false to scan all editable entities in the world
Returns
Editable entity

Definition at line 350 of file SCR_EditableEntityCore.c.

◆ GetAllAuthorsServer()

set< SCR_EditableEntityAuthor > SCR_EditableEntityCore::GetAllAuthorsServer ( )
inlineprotected

Definition at line 1111 of file SCR_EditableEntityCore.c.

◆ GetAllEntities() [1/2]

void SCR_EditableEntityCore::GetAllEntities ( out notnull set< SCR_EditableEntityComponent > entities,
bool onlyDirect = false,
bool skipIgnored = false )
inlineprotected

Get all entities.

Parameters
[out]entitiesArray to be filled with child entities
onlyDirectWhen true, only the direct descendants are returned, otherwise all children, children of children etc. are returned.
skipIgnoredWhen true, entities flagged by IGNORE_LAYERS will not be included in the list

Definition at line 209 of file SCR_EditableEntityCore.c.

◆ GetAllEntities() [2/2]

void SCR_EditableEntityCore::GetAllEntities ( out notnull set< SCR_EditableEntityComponent > entities,
EEditableEntityAccessKey accessKey )
inlineprotected

Get all editable entities with specified access keys.

Parameters
[out]entitiesArray to be filled with editable entities
accessKeyAccess key. Only entities with at least one compatible key will be returned.

Definition at line 224 of file SCR_EditableEntityCore.c.

◆ GetAllEntitiesByAuthorID()

int SCR_EditableEntityCore::GetAllEntitiesByAuthorID ( out notnull set< SCR_EditableEntityComponent > entities,
int playerID )
inlineprotected

Get all editable entities with specified PlayerID. Works only if this session wasn't reloaded. -> only works for Streamed in Entities

Parameters
[out]entitiesArray to be filled with editable entities
playerIDPlayer Unique Identifier. Returns all entities with author of this identifier.

Definition at line 299 of file SCR_EditableEntityCore.c.

◆ GetAllEntitiesByAuthorIDExt()

int SCR_EditableEntityCore::GetAllEntitiesByAuthorIDExt ( out notnull set< SCR_EditableEntityComponent > entities,
int playerID )
inlinestaticprotected

Static call for GetAllEntitiesByAuthorUID for ease of use -> only works for Streamed in Entities

Parameters
[out]entitiesArray to be filled with editable entities
playerIDPlayer Unique Identifier. Returns all entities with author of this identifier.

Definition at line 334 of file SCR_EditableEntityCore.c.

◆ GetAllEntitiesByAuthorUID()

int SCR_EditableEntityCore::GetAllEntitiesByAuthorUID ( out notnull set< SCR_EditableEntityComponent > entities,
string playerUID )
inlineprotected

Get all editable entities with specified PlayerUID. Works even after World Save/Load -> only works for Streamed in Entities

Parameters
[out]entitiesArray to be filled with editable entities
playerUIDPlayer Unique Identifier. Returns all entities with author of this identifier.

Definition at line 251 of file SCR_EditableEntityCore.c.

◆ GetAllEntitiesByAuthorUIDExt()

int SCR_EditableEntityCore::GetAllEntitiesByAuthorUIDExt ( out notnull set< SCR_EditableEntityComponent > entities,
string playerUID )
inlinestaticprotected

Static call for GetAllEntitiesByAuthorUID for ease of use -> only works for Streamed in Entities

Parameters
[out]entitiesArray to be filled with editable entities
playerUIDPlayer Unique Identifier. Returns all entities with author of this identifier.

Definition at line 286 of file SCR_EditableEntityCore.c.

◆ GetBudget()

bool SCR_EditableEntityCore::GetBudget ( EEditableEntityBudget budgetType,
out SCR_EditableEntityCoreBudgetSetting budgetSettings )
inlineprotected

Get current budget settings of given type

Parameters
[out]SCR_EditableEntityCoreBudgetSetting

Definition at line 452 of file SCR_EditableEntityCore.c.

◆ GetBudgetForEntityType()

EEditableEntityBudget SCR_EditableEntityCore::GetBudgetForEntityType ( EEditableEntityType entityType)
inlineprotected
Parameters
entityType
Returns

Definition at line 407 of file SCR_EditableEntityCore.c.

◆ GetBudgets()

void SCR_EditableEntityCore::GetBudgets ( out notnull array< ref SCR_EditableEntityCoreBudgetSetting > budgets)
inlineprotected

Get all entity budget settings

Parameters
[out]Arraywith entity budget settings

Definition at line 441 of file SCR_EditableEntityCore.c.

◆ GetEntityCanBeControlled()

bool SCR_EditableEntityCore::GetEntityCanBeControlled ( EEditableEntityType type)
inlineprotected

Check if entity can be controlled by player, used for delaying budget update/AI check

Parameters
EEditableEntityTypetype of the entity to check
Returns
bool if given entity can be controlled by player

Definition at line 397 of file SCR_EditableEntityCore.c.

◆ GetEntityInteraction()

SCR_EditableEntityInteraction SCR_EditableEntityCore::GetEntityInteraction ( EEditableEntityType type)
inlineprotected

Get interaction class for given entity type.

Parameters
typeEntity type
Returns
Interaction rules

Definition at line 384 of file SCR_EditableEntityCore.c.

◆ Init()

void SCR_EditableEntityCore::Init ( )
inlineprotected

Definition at line 1288 of file SCR_EditableEntityCore.c.

◆ OnAuthorRequestFinished()

void SCR_EditableEntityCore::OnAuthorRequestFinished ( )
inlineprotected

Definition at line 1167 of file SCR_EditableEntityCore.c.

◆ OnBeforeWorldCleanup()

override void SCR_EditableEntityCore::OnBeforeWorldCleanup ( )
inlineprotected

Definition at line 1230 of file SCR_EditableEntityCore.c.

◆ OnGameStart()

override void SCR_EditableEntityCore::OnGameStart ( )
inlineprotected

Definition at line 1216 of file SCR_EditableEntityCore.c.

◆ OnPlayerIdentityAvailable()

void SCR_EditableEntityCore::OnPlayerIdentityAvailable ( int playerId)
inlineprotected

Definition at line 1187 of file SCR_EditableEntityCore.c.

◆ OnUpdate()

override void SCR_EditableEntityCore::OnUpdate ( float timeSlice)
inlineprotected

Definition at line 1196 of file SCR_EditableEntityCore.c.

◆ QueueBudgetChange()

void SCR_EditableEntityCore::QueueBudgetChange ( EEditableEntityBudget budgetType,
bool added,
SCR_EditableEntityComponent entity,
SCR_EntityBudgetValue budgetCost = null )
inlineprotected

Definition at line 919 of file SCR_EditableEntityCore.c.

◆ RegisterAuthorServer()

void SCR_EditableEntityCore::RegisterAuthorServer ( SCR_EditableEntityAuthor newAuthor)
inlineprotected

Definition at line 1073 of file SCR_EditableEntityCore.c.

◆ RegisterEntity()

void SCR_EditableEntityCore::RegisterEntity ( SCR_EditableEntityComponent entity)
inlineprotected
Parameters
entity

Definition at line 122 of file SCR_EditableEntityCore.c.

◆ RemoveFromRoot()

void SCR_EditableEntityCore::RemoveFromRoot ( SCR_EditableEntityComponent entity)
inlineprotected
Parameters
entity

Definition at line 111 of file SCR_EditableEntityCore.c.

◆ RemoveOrphans()

int SCR_EditableEntityCore::RemoveOrphans ( RplId parentId,
out notnull array< SCR_EditableEntityComponent > outOrphans )
inlineprotected

Remove orphaned entities belonging to given parent.

Parameters
parentIdReplication ID of the parent entity
[out]outOrphansArray to be filled with orphaned entities
Returns
Number of orphans

Definition at line 175 of file SCR_EditableEntityCore.c.

◆ RequestAllAuthors()

void SCR_EditableEntityCore::RequestAllAuthors ( )
inlineprotected

Definition at line 1127 of file SCR_EditableEntityCore.c.

◆ Restart()

void SCR_EditableEntityCore::Restart ( )
inlineprotected

Definition at line 1255 of file SCR_EditableEntityCore.c.

◆ UnRegisterEntity()

void SCR_EditableEntityCore::UnRegisterEntity ( SCR_EditableEntityComponent entity,
IEntity owner = null )
inlineprotected
Parameters
entity
owner

Definition at line 148 of file SCR_EditableEntityCore.c.

◆ UpdateBudget()

void SCR_EditableEntityCore::UpdateBudget ( EEditableEntityBudget budgetType,
bool added,
SCR_EditableEntityComponent entity,
SCR_EntityBudgetValue budgetCost = null )
inlineprotected
Parameters
budgetType
added
entity
budgetCost

Definition at line 1009 of file SCR_EditableEntityCore.c.

◆ UpdateBudgetForEntity()

void SCR_EditableEntityCore::UpdateBudgetForEntity ( SCR_EditableEntityComponent entity,
bool added,
IEntity owner )
inlineprotected
Parameters
entity
added
owner

Definition at line 891 of file SCR_EditableEntityCore.c.

Member Data Documentation

◆ Event_OnAuthorsRegisteredFinished

ref ScriptInvoker_AuthorRequestedFinishedEvent SCR_EditableEntityCore::Event_OnAuthorsRegisteredFinished = new ScriptInvoker_AuthorRequestedFinishedEvent
protected

Definition at line 94 of file SCR_EditableEntityCore.c.

◆ m_bAuthorRequesting

bool SCR_EditableEntityCore::m_bAuthorRequesting
protected

Definition at line 92 of file SCR_EditableEntityCore.c.

◆ m_fPlayerDrawDistance

float SCR_EditableEntityCore::m_fPlayerDrawDistance
protected

Definition at line 25 of file SCR_EditableEntityCore.c.

◆ m_fPlayerVehicleDistanceModifier

float SCR_EditableEntityCore::m_fPlayerVehicleDistanceModifier
protected

Definition at line 28 of file SCR_EditableEntityCore.c.


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