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

Protected Member Functions

string GetDisplayName ()
ResourceName GetPrefab (bool shorten=false)
SCR_EditableEntityComponentClass GetEditableEntityData (IEntity owner=null)
EEditableEntityType GetEntityType (IEntity owner=null)
SCR_EditableEntityInteraction GetEntityInteraction (IEntity owner=null)
SCR_UIInfo GetInfo (IEntity owner=null)
ScriptInvokerEntity GetOnDeleted ()
void SetInfoInstance (SCR_UIInfo info)
bool IsReplicated (out RplId replicationID=-1)
bool Serialize (out SCR_EditableEntityComponent outTarget=null, out int outTargetIndex=-1, out EEditableEntitySaveFlag outSaveFlags=0)
void Deserialize (SCR_EditableEntityComponent target, int targetValue)
bool IsServer ()
bool CanRpc ()
GenericEntity GetOwnerScripted ()
bool GetPos (out vector pos)
vector GetIconPos ()
bool GetTransform (out vector outTransform[4])
bool GetLocalTransform (out vector outTransform[4])
int GetPlayerID ()
void SetAuthor (int playerID)
void SetAuthor (SCR_EditableEntityAuthor author)
SCR_EditableEntityAuthor GetAuthor ()
string GetAuthorUID ()
string GetAuthorPlatformID ()
int GetAuthorPlayerID ()
int GetAuthorLastUpdated ()
PlatformKind GetAuthorPlatform ()
void SetAuthorUID (string authorUID)
void SetAuthorPlatformID (string authorPlatformID)
void SetAuthorUpdatedTime (int updatedLast)
void SetAuthorPlatform (PlatformKind authorPlatform)
Faction GetFaction ()
ScriptInvoker GetOnUIRefresh ()
ScriptInvoker GetOnUIReset ()
SCR_EditableEntityComponent GetAIGroup ()
SCR_EditableEntityComponent GetAIEntity ()
SCR_EditableEntityComponent GetVehicle ()
int GetCrew (out notnull array< CompartmentAccessComponent > crewCompartmentAccess, bool ignorePlayers=true)
float GetHealth ()
bool CanDestroy ()
bool IsDestroyed ()
void SetStatic (bool isStatic)
bool GetStatic ()
void UpdateStaticPos ()
void SetHierarchyAsDirtyInParents ()
void SetHierarchyAsDirty ()
void SetTransformWithChildren (vector transform[4])
bool SetTransform (vector transform[4], bool changedByUser=false)
void SetTransformOwner (vector transform[4])
void SetTransformBroadcast (vector transform[4])
void OnAuthorChangedServer (string authorUID, int authorID, string authorPlatformID, int platform, int lastUpdated)
void OnAuthorChanged (string authorUID, int authorID, string authorPlatformID, int platform, int lastUpdated)
bool Destroy (int editorPlayerID=0)
bool Delete (bool changedByUser=false, bool updateNavmesh=false)
RplId GetOwnerRplId ()
float GetMaxDrawDistanceSq ()
void SetMaxDrawDistance (float maxDrawDistance)
bool GetEntityBudgetCost (out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null)
bool GetEntityChildrenBudgetCost (out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null)
bool GetEntityAndChildrenBudgetCost (out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null)
bool EntityHasBudgetOfType (EEditableEntityBudget budgetToFind)
 Returns true if the entity consumes this type of budget.
bool CanDuplicate (out notnull set< SCR_EditableEntityComponent > outRecipients)
void ForceVehicleCompartments (notnull array< ECompartmentType > forceVehicleCompartments)
void OnParentEntityChanged (SCR_EditableEntityComponent parentEntity, SCR_EditableEntityComponent parentEntityPrev, bool changedByUser)
void SetParentEntityBroadcast (SCR_EditableEntityComponent parentEntity, SCR_EditableEntityComponent parentEntityPrev, bool changedByUser=false, bool isAutoRegistration=false)
void SetParentEntityBroadcastReceive (RplId parentEntityID, RplId parentEntityPrevID, bool changedByUser)
void OnRegistrationChanged (bool toRegister)
EEditableEntityRegister GetAutoRegister ()
void Register ()
void Unregister (IEntity owner=null)
void OnCreatedServer (notnull SCR_PlacingEditorComponent placedEditorComponent)
void AddToParent (SCR_EditableEntityComponent parentEntity, bool changedByUser)
void RemoveFromParent (SCR_EditableEntityComponent parentEntity, bool changedByUser)
void AddChild (SCR_EditableEntityComponent entity)
void RemoveChild (SCR_EditableEntityComponent entity)
void UpdateGameHierarchy (IEntity parent, IEntity child, bool toAdd)
void OnChildEntityChanged (SCR_EditableEntityComponent child, bool isAdded)
bool HasEntityState (EEditableEntityState state)
EEditableEntityState GetEntityStates ()
void SetEntityState (EEditableEntityState state, bool toSet)
void ResetEntityStates ()
 Reset all entity states.
bool HasEntityFlag (EEditableEntityFlag flag)
EEditableEntityFlag GetEntityFlags ()
void SetEntityFlag (EEditableEntityFlag flag, bool toSet)
void CopyEntityFlags (EEditableEntityFlag flags)
void SetEntityStateInChildren (IEntity owner, EEditableEntityState state, bool toSet, out array< Managed > components=null)
void OnVisibilityChanged ()
void OnAccessKeyChanged (EEditableEntityAccessKey accessKey)
void Refresh ()
RplComponent GetRplComponent ()
bool ValidateType ()
string GetLogText (string prefix="")
void Log (string prefix="", bool onlyDirect=false, LogLevel logLevel=LogLevel.DEBUG)
void Log (string prefix, EEditableEntityAccessKey accessKey)
void LogAccessKey ()
 Print out entity's access key.
SCR_EditableEntityComponent EOnEditorPlace (out SCR_EditableEntityComponent parent, SCR_EditableEntityComponent recipient, EEditorPlacingFlags flags, bool isQueue, int playerID=0)
void EOnEditorSessionLoad (SCR_EditableEntityComponent parent)
override bool RplSave (ScriptBitWriter writer)
override bool RplLoad (ScriptBitReader reader)
override void OnDelete (IEntity owner)
override void OnPostInit (IEntity owner)
void SCR_EditableEntityComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
void Attach (notnull SCR_EditableEntityComponent attachable)
void Detach (notnull SCR_EditableEntityComponent attachable)
set< SCR_EditableEntityComponentGetAttachedEntities ()
bool IsAttachable ()
bool IsAttached ()
SCR_EditableEntityComponent GetAttachedTo ()
Hierarchy

Functions to manage hierarchy of the entity.

bool CanSetParent (SCR_EditableEntityComponent parentEntity)
SCR_EditableEntityComponent SetParentEntity (SCR_EditableEntityComponent parentEntity, bool changedByUser=false)
void RestoreParentEntity ()
void RemoveParentEntity ()
SCR_EditableEntityComponent GetParentEntity ()
void GetParentEntities (out notnull array< SCR_EditableEntityComponent > entities)
bool IsChildOf (SCR_EditableEntityComponent entity)
set< SCR_EditableEntityComponentGetChildrenRef ()
void GetChildren (out notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect=false, bool skipIgnored=false)
void GetChildren (out notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect, EEditableEntityAccessKey accessKey)
int GetChildrenCount (bool onlyDirect=false)
SCR_EditableEntityComponent GetChild (int index)
bool IsLayer ()
bool CanEnterLayer (SCR_LayersEditorComponent layersManager=null, bool toExtreme=false)
bool IsRegistered ()
Visibility

Functions to manage visibility of the entity.

void SetVisible (bool show)
void EnableVisibilityReplication (bool enable)
bool CanReplicateVisibility ()
void OnRplVisibilityChanged ()
bool GetVisibleSelf ()
bool GetVisibleInHierarchy ()
Access Key

Functions to manage access key.

  • Access key is shared over network and define who has rights to edit the entity.
  • Key is a flag composed of multiple EEditableEntityAccessKey values.
  • When at least one of the values is compatible with editor key values, the entity will become available.*
void AddAccessKey (EEditableEntityAccessKey accessKey)
void RemoveAccessKey (EEditableEntityAccessKey accessKey)
void ClearAccessKeys ()
EEditableEntityAccessKey GetAccessKey ()
bool HasAccessSelf (EEditableEntityAccessKey accessKey)
bool HasAccessInHierarchy (EEditableEntityAccessKey accessKey)
bool HasAccessSelf ()
bool HasAccessInHierarchy ()

Static Protected Member Functions

static SCR_EditableEntityComponent GetEditableEntity (IEntity owner)

Protected Attributes

EEditableEntityRegister m_bAutoRegister
vector m_vIconPos
bool m_bEnabledVisibilityReplication
bool m_bVisible
bool m_bStatic
float m_fMaxDrawDistance
EEditableEntityAccessKey m_AccessKey
EEditableEntityFlag m_Flags
SCR_EditableEntityComponent m_ParentEntity
GenericEntity m_Owner
EEditableEntityState m_EntityState
SCR_UIInfo m_UIInfoInstance
ref set< SCR_EditableEntityComponentm_Entities
vector m_vStaticPos
int m_iIconBoneIndex = -1
ref ScriptInvokerEntity m_OnDeleted
ref SCR_EditableEntityAuthor m_Author
int m_iAuthorLastUpdated
ref set< SCR_EditableEntityComponentm_aAttachedEntities

Detailed Description

Component defining editable entity.

  • Any entity with this component is exposed in the editor (SCR_EditorManagerCore).
  • Editable entities are tracked locally in a list managed by SCR_EditableEntityCore.
  • Editable entity, unless it has a flag EEditableEntityFlag.LOCAL, must also have a RplComponent attached.
  • Despite the name, not every entity with this component is actually editable - those with EEditableEntityFlag.NON_INTERACTIVE are not.

Implementation Notes

  • Keep memory footprint of component instance (i.e., the size of variables) to minimum. The component can axist on thousands of entities per world.
  • Do not reference editor (e.g., SCR_EditorManagerEntity, SCR_EditorModeEntity, or SCR_BaseEditorComponent) from here!
  • Editable entities are independent on the editor. Each player has their own editor, so there is no single editor to point to anyway.
Examples
F:/Games/AReforger/scripts/Game/Editor/Containers/EditableEntityFilters/SCR_RenderedEditableEntityFilter.c.

Definition at line 13 of file SCR_EditableEntityComponent.c.

Constructor & Destructor Documentation

◆ SCR_EditableEntityComponent()

void SCR_EditableEntityComponent::SCR_EditableEntityComponent ( IEntityComponentSource src,
IEntity ent,
IEntity parent )
inlineprotected
Parameters
[in]src
[in]ent
[in]parent

Definition at line 2280 of file SCR_EditableEntityComponent.c.

Member Function Documentation

◆ AddAccessKey()

void SCR_EditableEntityComponent::AddAccessKey ( EEditableEntityAccessKey accessKey)
inlineprotected

Add access key. Available only on server!

Parameters
[in]accessKeyKey to be added

Definition at line 1861 of file SCR_EditableEntityComponent.c.

◆ AddChild()

void SCR_EditableEntityComponent::AddChild ( SCR_EditableEntityComponent entity)
inlineprotected

Definition at line 1511 of file SCR_EditableEntityComponent.c.

◆ AddToParent()

void SCR_EditableEntityComponent::AddToParent ( SCR_EditableEntityComponent parentEntity,
bool changedByUser )
inlineprotected

Definition at line 1473 of file SCR_EditableEntityComponent.c.

◆ Attach()

void SCR_EditableEntityComponent::Attach ( notnull SCR_EditableEntityComponent attachable)
inlineprotected

Add the received attachable waypoint to the attached entities (runs on parent)

Parameters
[in]targetto link current entity to

Definition at line 2335 of file SCR_EditableEntityComponent.c.

◆ CanDestroy()

bool SCR_EditableEntityComponent::CanDestroy ( )
inlineprotected
Returns
if destroying of entity is allowed. Does not check if entity is destroyed already. Use IsDestroyed() for this

Definition at line 545 of file SCR_EditableEntityComponent.c.

◆ CanDuplicate()

bool SCR_EditableEntityComponent::CanDuplicate ( out notnull set< SCR_EditableEntityComponent > outRecipients)
inlineprotected

Can entity be duplicated by editor and which recipients should be passed to the duplicated entity Overridden by other EditableEntityComponents

Parameters
[out]outRecipientseditableEntityComponents that will be passed to the duplicated entity (Groupcomponent / FactionComponent)
Returns
true if entity can be duplicated

Definition at line 1010 of file SCR_EditableEntityComponent.c.

◆ CanEnterLayer()

bool SCR_EditableEntityComponent::CanEnterLayer ( SCR_LayersEditorComponent layersManager = null,
bool toExtreme = false )
inlineprotected

Checks if can enter layer.

Parameters
[in]layersManagergive a layermanager ref, it will find the layer manager if left empty
[in]toExtremeWhen enable, it will not move just one layer up, but all the way to root. And the same when moving down
Returns
false if no layermanager or if unable to enter layer

Definition at line 1299 of file SCR_EditableEntityComponent.c.

◆ CanReplicateVisibility()

bool SCR_EditableEntityComponent::CanReplicateVisibility ( )
inlineprotected
Returns

Definition at line 1786 of file SCR_EditableEntityComponent.c.

◆ CanRpc()

bool SCR_EditableEntityComponent::CanRpc ( )
inlineprotected

Definition at line 244 of file SCR_EditableEntityComponent.c.

◆ CanSetParent()

bool SCR_EditableEntityComponent::CanSetParent ( SCR_EditableEntityComponent parentEntity)
inlineprotected

Check if the entity can be moved to intended parent.

Parameters
[in]parentEntityNew parent. Null when evaluating root.
Returns

Definition at line 1043 of file SCR_EditableEntityComponent.c.

◆ ClearAccessKeys()

void SCR_EditableEntityComponent::ClearAccessKeys ( )
inlineprotected

Clear all access keys. Available only on server!

Definition at line 1889 of file SCR_EditableEntityComponent.c.

◆ CopyEntityFlags()

void SCR_EditableEntityComponent::CopyEntityFlags ( EEditableEntityFlag flags)
inlineprotected

Override the Entity flags.

Parameters
[in]flagsThe flags to override to

Definition at line 1701 of file SCR_EditableEntityComponent.c.

◆ Delete()

bool SCR_EditableEntityComponent::Delete ( bool changedByUser = false,
bool updateNavmesh = false )
inlineprotected

Delete this editable entity.

Parameters
[in]changedByUserTrue when the change was initiated by user
[in]updateNavmeshTrue to update navmesh after the entity is deleted (set to false when deleting children of already deleted entity)
Returns
true if deleted

Definition at line 842 of file SCR_EditableEntityComponent.c.

◆ Deserialize()

void SCR_EditableEntityComponent::Deserialize ( SCR_EditableEntityComponent target,
int targetValue )
inlineprotected

Deserialise the entity based on given params.

Parameters
[in]targetEntity to which this entity is attached to outside of hierarchy structure, e.g., character in a vehicle or waypoint on a target
[in]targetIndexFurther specification of the target, e.g., crew position index in a vehicle

Definition at line 230 of file SCR_EditableEntityComponent.c.

◆ Destroy()

bool SCR_EditableEntityComponent::Destroy ( int editorPlayerID = 0)
inlineprotected

Kill/destroy this editable entity.

Returns
true if destroyed

Definition at line 812 of file SCR_EditableEntityComponent.c.

◆ Detach()

void SCR_EditableEntityComponent::Detach ( notnull SCR_EditableEntityComponent attachable)
inlineprotected

Removes the received attachable waypoint from the attached entities (runs on parent)

Parameters
[in]attachabletarget to remove link

Definition at line 2344 of file SCR_EditableEntityComponent.c.

◆ EnableVisibilityReplication()

void SCR_EditableEntityComponent::EnableVisibilityReplication ( bool enable)
inlineprotected
Parameters
[in]enable

Definition at line 1774 of file SCR_EditableEntityComponent.c.

◆ EntityHasBudgetOfType()

bool SCR_EditableEntityComponent::EntityHasBudgetOfType ( EEditableEntityBudget budgetToFind)
inlineprotected

Returns true if the entity consumes this type of budget.

Definition at line 970 of file SCR_EditableEntityComponent.c.

◆ EOnEditorPlace()

SCR_EditableEntityComponent SCR_EditableEntityComponent::EOnEditorPlace ( out SCR_EditableEntityComponent parent,
SCR_EditableEntityComponent recipient,
EEditorPlacingFlags flags,
bool isQueue,
int playerID = 0 )
inlineprotected

Event called on server when the entity is placed in the editor.

Parameters
[out]parentEditable entity in which the new one is being created (rewrite the variable the change the parent)
[in]recipientEntity that receives this editable entity (e.g., a group receiving a waypoint)
[in]flagsPlacing flags enabled by user
[in]isQueuetrue if the entity was placed in a queue (i.e., placing remains active)
[in]playerIDID of the player placing the entity.
Returns
Editable entity which is added to editor hieraechy (can be overloaded, e.g., to provide group after spawning a character)

Definition at line 2118 of file SCR_EditableEntityComponent.c.

◆ EOnEditorSessionLoad()

void SCR_EditableEntityComponent::EOnEditorSessionLoad ( SCR_EditableEntityComponent parent)
inlineprotected

Event called on server when the session is being loaded by SCR_EditableEntityStruct

Parameters
[in]parentEditable entity in which the new one is being created

Definition at line 2126 of file SCR_EditableEntityComponent.c.

◆ ForceVehicleCompartments()

void SCR_EditableEntityComponent::ForceVehicleCompartments ( notnull array< ECompartmentType > forceVehicleCompartments)
protected

Authority Only, forces entities such as Character and Group to place characters into a specific vehicle position

Parameters
[in]forceVehicleCompartmentscompartment types to force for entity

◆ GetAccessKey()

EEditableEntityAccessKey SCR_EditableEntityComponent::GetAccessKey ( )
inlineprotected

Get entity's access key.

Returns
Access key

Definition at line 1903 of file SCR_EditableEntityComponent.c.

◆ GetAIEntity()

SCR_EditableEntityComponent SCR_EditableEntityComponent::GetAIEntity ( )
inlineprotected

Get entity which represents this entity as AI

Returns
Editable entity

Definition at line 507 of file SCR_EditableEntityComponent.c.

◆ GetAIGroup()

SCR_EditableEntityComponent SCR_EditableEntityComponent::GetAIGroup ( )
inlineprotected

Get entity's AI group.

Returns
Editable entity of the group

Definition at line 499 of file SCR_EditableEntityComponent.c.

◆ GetAttachedEntities()

set< SCR_EditableEntityComponent > SCR_EditableEntityComponent::GetAttachedEntities ( )
inlineprotected

Returns attached entities of self

Returns
set containing the attached entities

Definition at line 2352 of file SCR_EditableEntityComponent.c.

◆ GetAttachedTo()

SCR_EditableEntityComponent SCR_EditableEntityComponent::GetAttachedTo ( )
inlineprotected

Returns current entity which this editable task is attached to

Returns
current entity which this editable task is attached to

Definition at line 2383 of file SCR_EditableEntityComponent.c.

◆ GetAuthor()

SCR_EditableEntityAuthor SCR_EditableEntityComponent::GetAuthor ( )
inlineprotected

Definition at line 374 of file SCR_EditableEntityComponent.c.

◆ GetAuthorLastUpdated()

int SCR_EditableEntityComponent::GetAuthorLastUpdated ( )
inlineprotected

Returns Unix Time of last modification

Returns

Definition at line 415 of file SCR_EditableEntityComponent.c.

◆ GetAuthorPlatform()

PlatformKind SCR_EditableEntityComponent::GetAuthorPlatform ( )
inlineprotected
Returns
Author's platform or PlatformKind.NONE when author is not set

Definition at line 425 of file SCR_EditableEntityComponent.c.

◆ GetAuthorPlatformID()

string SCR_EditableEntityComponent::GetAuthorPlatformID ( )
inlineprotected

Returns author Platform ID

Returns

Definition at line 393 of file SCR_EditableEntityComponent.c.

◆ GetAuthorPlayerID()

int SCR_EditableEntityComponent::GetAuthorPlayerID ( )
inlineprotected

Returns author Player ID

Returns

Definition at line 404 of file SCR_EditableEntityComponent.c.

◆ GetAuthorUID()

string SCR_EditableEntityComponent::GetAuthorUID ( )
inlineprotected

Returns author UID

Returns

Definition at line 382 of file SCR_EditableEntityComponent.c.

◆ GetAutoRegister()

EEditableEntityRegister SCR_EditableEntityComponent::GetAutoRegister ( )
inlineprotected

Definition at line 1424 of file SCR_EditableEntityComponent.c.

◆ GetChild()

SCR_EditableEntityComponent SCR_EditableEntityComponent::GetChild ( int index)
inlineprotected

Get child on given index.

Parameters
[in]indexChild index
Returns
Editable entity

Definition at line 1278 of file SCR_EditableEntityComponent.c.

◆ GetChildren() [1/2]

void SCR_EditableEntityComponent::GetChildren ( out notnull set< SCR_EditableEntityComponent > entities,
bool onlyDirect,
EEditableEntityAccessKey accessKey )
inlineprotected

Get child entities with compatible key.

Parameters
[out]entitiesArray to be filled with child entities
[in]onlyDirectWhen true, only the direct descendants are returned, otherwise all children, children of children etc. are returned.
[in]accessKeyReturn only entities with at least one key matching this value

Definition at line 1227 of file SCR_EditableEntityComponent.c.

◆ GetChildren() [2/2]

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

Get child entities.

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

Definition at line 1206 of file SCR_EditableEntityComponent.c.

◆ GetChildrenCount()

int SCR_EditableEntityComponent::GetChildrenCount ( bool onlyDirect = false)
inlineprotected

Get number of child entities.

Parameters
[in]onlyDirectWhen true, return only direct children, othwise count recursively in their children as well
Returns
number of child entities

Definition at line 1251 of file SCR_EditableEntityComponent.c.

◆ GetChildrenRef()

set< SCR_EditableEntityComponent > SCR_EditableEntityComponent::GetChildrenRef ( )
inlineprotected

Get direct reference to entity's immediate children. Use when performance is important. DO NOT MODIFY THE LIST!

Returns
Set of child entities, or null when the entity has no children

Definition at line 1195 of file SCR_EditableEntityComponent.c.

◆ GetCrew()

int SCR_EditableEntityComponent::GetCrew ( out notnull array< CompartmentAccessComponent > crewCompartmentAccess,
bool ignorePlayers = true )
protected

Get crew of vehicle or if in a vehicle get self.

Parameters
[out]crewCompartmentAccessan array of CompartmentAccessComponent of all crew memebers
[in]ignorePlayerswill never return player CompartmentAccessComponent if true
Returns
count of crew members

◆ GetDisplayName()

string SCR_EditableEntityComponent::GetDisplayName ( )
inlineprotected

Get entity name from info component. When info is undefined, use entity's variable name, or, if that one is also undefined, its class name.

Returns
Type

Definition at line 57 of file SCR_EditableEntityComponent.c.

◆ GetEditableEntity()

SCR_EditableEntityComponent SCR_EditableEntityComponent::GetEditableEntity ( IEntity owner)
inlinestaticprotected

Get editable entity component on given entity.

Parameters
[in]entity
Returns
Editable entity component (if the entity has one)

Definition at line 919 of file SCR_EditableEntityComponent.c.

◆ GetEditableEntityData()

SCR_EditableEntityComponentClass SCR_EditableEntityComponent::GetEditableEntityData ( IEntity owner = null)
inlineprotected

Get prefab data of this editable entity.

Parameters
[in]Ownerentity of this component, used when m_Owner==null, after deletion
Returns
Component prefab data

Definition at line 110 of file SCR_EditableEntityComponent.c.

◆ GetEntityAndChildrenBudgetCost()

bool SCR_EditableEntityComponent::GetEntityAndChildrenBudgetCost ( out notnull array< ref SCR_EntityBudgetValue > outBudgets,
IEntity owner = null )
inlineprotected

Get budgets for both, entity and it's children.

Parameters
[out]outBudgetsArray to be filled with budget values

Definition at line 959 of file SCR_EditableEntityComponent.c.

◆ GetEntityBudgetCost()

bool SCR_EditableEntityComponent::GetEntityBudgetCost ( out notnull array< ref SCR_EntityBudgetValue > outBudgets,
IEntity owner = null )
inlineprotected

Get entity budget costs.

Parameters
[out]outBudgetsArray to be filled with budget values
[in]owner
Returns
true if the entity cost should be based on outBudgets array, return false to fallback on entityType cost, return true with an empty array to avoid fallback entityType cost

Definition at line 932 of file SCR_EditableEntityComponent.c.

◆ GetEntityChildrenBudgetCost()

bool SCR_EditableEntityComponent::GetEntityChildrenBudgetCost ( out notnull array< ref SCR_EntityBudgetValue > outBudgets,
IEntity owner = null )
inlineprotected

Get entity budget costs including cost of children (for groups/compositions)

Parameters
[out]outBudgetsArray to be filled with budget values
[in]owner
Returns
true if the entity cost should be based on outBudgets, return false to fallback on entityType cost, return true with an empty array to avoid fallback entityType cost

Definition at line 946 of file SCR_EditableEntityComponent.c.

◆ GetEntityFlags()

EEditableEntityFlag SCR_EditableEntityComponent::GetEntityFlags ( )
inlineprotected

Get entity flags

Returns
Entity flags

Definition at line 1671 of file SCR_EditableEntityComponent.c.

◆ GetEntityInteraction()

SCR_EditableEntityInteraction SCR_EditableEntityComponent::GetEntityInteraction ( IEntity owner = null)
inlineprotected

Get entity interaction rules of this entity. If it doesn't contain any custom rules, those for its type will be used.

Returns
Interaction rules

Definition at line 139 of file SCR_EditableEntityComponent.c.

◆ GetEntityStates()

EEditableEntityState SCR_EditableEntityComponent::GetEntityStates ( )
inlineprotected

Check bit array with all currently active states

Returns
Bit array

Definition at line 1598 of file SCR_EditableEntityComponent.c.

◆ GetEntityType()

EEditableEntityType SCR_EditableEntityComponent::GetEntityType ( IEntity owner = null)
inlineprotected

Get entity type. Avoid basing your functionality on specific entity types! If everyone checked for specific types, adding a new type would mean all conditions have to be revised. Instead, base your system on a function inside this class. Such function can be overrided by inherited classes to give desired result.

Parameters
[in]Ownerentity of this component
Returns
Type

Definition at line 127 of file SCR_EditableEntityComponent.c.

◆ GetFaction()

Faction SCR_EditableEntityComponent::GetFaction ( )
inlineprotected

Get entity's faction.

Returns
Faction

Definition at line 473 of file SCR_EditableEntityComponent.c.

◆ GetHealth()

float SCR_EditableEntityComponent::GetHealth ( )
inlineprotected

Get entity health

Returns
Health value in range 0-1

Definition at line 531 of file SCR_EditableEntityComponent.c.

◆ GetIconPos()

vector SCR_EditableEntityComponent::GetIconPos ( )
inlineprotected

Get icon offset

Parameters
[in]Offset

Definition at line 299 of file SCR_EditableEntityComponent.c.

◆ GetInfo()

SCR_UIInfo SCR_EditableEntityComponent::GetInfo ( IEntity owner = null)
inlineprotected

Get information about the entity. When none exist, create a dummy one.

Returns
Info class

Definition at line 151 of file SCR_EditableEntityComponent.c.

◆ GetLocalTransform()

bool SCR_EditableEntityComponent::GetLocalTransform ( out vector outTransform[4])
inlineprotected

Get local transformation matrix of editable entity.

Parameters
[out]outTransformTransformation matrix

Definition at line 319 of file SCR_EditableEntityComponent.c.

◆ GetLogText()

string SCR_EditableEntityComponent::GetLogText ( string prefix = "")
inlineprotected
Parameters
[in]prefix
Returns

Definition at line 2008 of file SCR_EditableEntityComponent.c.

◆ GetMaxDrawDistanceSq()

float SCR_EditableEntityComponent::GetMaxDrawDistanceSq ( )
inlineprotected

Get squared maximum distance in which this entity is drawn in editor (e.g., with an icon).

Returns
Squared distance in metres
Examples
F:/Games/AReforger/scripts/Game/Editor/Containers/EditableEntityFilters/SCR_RenderedEditableEntityFilter.c.

Definition at line 897 of file SCR_EditableEntityComponent.c.

◆ GetOnDeleted()

ScriptInvokerEntity SCR_EditableEntityComponent::GetOnDeleted ( )
inlineprotected

Get event called when entity is deleted

Returns
Script invoker

Definition at line 170 of file SCR_EditableEntityComponent.c.

◆ GetOnUIRefresh()

ScriptInvoker SCR_EditableEntityComponent::GetOnUIRefresh ( )
inlineprotected

Get event called when GUI should refresh entity's GUI, i.e., update faction color and call events in GUI widgets. To be overridden by inherited classes.

Returns
Script invoker

Definition at line 482 of file SCR_EditableEntityComponent.c.

◆ GetOnUIReset()

ScriptInvoker SCR_EditableEntityComponent::GetOnUIReset ( )
inlineprotected

Get event called when GUI should reset widgets that are used for entity visualization. To be overridden by inherited classes.

Returns
Script invoker

Definition at line 491 of file SCR_EditableEntityComponent.c.

◆ GetOwnerRplId()

RplId SCR_EditableEntityComponent::GetOwnerRplId ( )
inlineprotected
Returns

Definition at line 885 of file SCR_EditableEntityComponent.c.

◆ GetOwnerScripted()

GenericEntity SCR_EditableEntityComponent::GetOwnerScripted ( )
inlineprotected
Returns
Owner entity.

Definition at line 252 of file SCR_EditableEntityComponent.c.

◆ GetParentEntities()

void SCR_EditableEntityComponent::GetParentEntities ( out notnull array< SCR_EditableEntityComponent > entities)
inlineprotected

Get hierarchy of all parent entities, all the way to the root.

Parameters
[out]entitiesArray to be filled with parent entities

Definition at line 1162 of file SCR_EditableEntityComponent.c.

◆ GetParentEntity()

SCR_EditableEntityComponent SCR_EditableEntityComponent::GetParentEntity ( )
inlineprotected

◆ GetPlayerID()

int SCR_EditableEntityComponent::GetPlayerID ( )
inlineprotected

Get player controlling this entity.

Returns
Player ID

Definition at line 346 of file SCR_EditableEntityComponent.c.

◆ GetPos()

bool SCR_EditableEntityComponent::GetPos ( out vector pos)
inlineprotected

Get position representing the entity.

Parameters
[out]posEntity's position
Returns
true if the entity has a position
Examples
F:/Games/AReforger/scripts/Game/Editor/Containers/EditableEntityFilters/SCR_RenderedEditableEntityFilter.c.

Definition at line 261 of file SCR_EditableEntityComponent.c.

◆ GetPrefab()

ResourceName SCR_EditableEntityComponent::GetPrefab ( bool shorten = false)
inlineprotected

Get entity prefab.

Parameters
[in]shortenTrue to include only GUID, not file path
Returns
Prefab path

Definition at line 82 of file SCR_EditableEntityComponent.c.

◆ GetRplComponent()

RplComponent SCR_EditableEntityComponent::GetRplComponent ( )
inlineprotected

Definition at line 1969 of file SCR_EditableEntityComponent.c.

◆ GetStatic()

bool SCR_EditableEntityComponent::GetStatic ( )
inlineprotected

Check if the entity is marked as static.

Returns
true if static

Definition at line 590 of file SCR_EditableEntityComponent.c.

◆ GetTransform()

bool SCR_EditableEntityComponent::GetTransform ( out vector outTransform[4])
inlineprotected

Get world transformation matrix of editable entity.

Parameters
[out]outTransformTransformation matrix

Definition at line 307 of file SCR_EditableEntityComponent.c.

◆ GetVehicle()

SCR_EditableEntityComponent SCR_EditableEntityComponent::GetVehicle ( )
inlineprotected

Get vehicle the entity's in

Returns
Editable entity of the vehicle

Definition at line 515 of file SCR_EditableEntityComponent.c.

◆ GetVisibleInHierarchy()

bool SCR_EditableEntityComponent::GetVisibleInHierarchy ( )
inlineprotected

Check visibility setting of the entity in hierarchy (e.g., if an entity is set as visible, but its parent is not, false will be returned).

Returns
true if the entity is visible in hierarchy

Definition at line 1810 of file SCR_EditableEntityComponent.c.

◆ GetVisibleSelf()

bool SCR_EditableEntityComponent::GetVisibleSelf ( )
inlineprotected

Check visibility setting of the entity.

Returns
true if the entity is set as visible

Definition at line 1801 of file SCR_EditableEntityComponent.c.

◆ HasAccessInHierarchy() [1/2]

bool SCR_EditableEntityComponent::HasAccessInHierarchy ( )
inlineprotected

Check access key of the entity in hierarchy (e.g., if an entity is compatible, but its parent is not, false will be returned). Compared with the key defined in SCR_AccessKeysEditorComponent.

Returns
true if given access key and entity's access key are compatible

Definition at line 1945 of file SCR_EditableEntityComponent.c.

◆ HasAccessInHierarchy() [2/2]

bool SCR_EditableEntityComponent::HasAccessInHierarchy ( EEditableEntityAccessKey accessKey)
inlineprotected

Check acces keys of the entity in hierarchy (e.g., if an entity is compatible, but its parent is not, false will be returned).

Parameters
[in]accessKeyAccess key which be checked in entity's access key
Returns
true if given access key and entity's access key is compatible

Definition at line 1921 of file SCR_EditableEntityComponent.c.

◆ HasAccessSelf() [1/2]

bool SCR_EditableEntityComponent::HasAccessSelf ( )
inlineprotected

Check access key of the entity compared to those defined in SCR_AccessKeysEditorComponent.

Returns
true if given access key and entity's access key are compatible

Definition at line 1932 of file SCR_EditableEntityComponent.c.

◆ HasAccessSelf() [2/2]

bool SCR_EditableEntityComponent::HasAccessSelf ( EEditableEntityAccessKey accessKey)
inlineprotected

Check access key of the entity.

Parameters
[in]accessKeyAccess key which be checked in entity's access key
Returns
true if given access key and entity's access key is compatible

Definition at line 1912 of file SCR_EditableEntityComponent.c.

◆ HasEntityFlag()

bool SCR_EditableEntityComponent::HasEntityFlag ( EEditableEntityFlag flag)
inlineprotected

Check if a flag is active.

Parameters
[in]flag
Returns
true if the flag is active

Definition at line 1663 of file SCR_EditableEntityComponent.c.

◆ HasEntityState()

bool SCR_EditableEntityComponent::HasEntityState ( EEditableEntityState state)
inlineprotected

Check if given entity state is active.

Parameters
[in]state
Returns
true if the state is active
Examples
F:/Games/AReforger/scripts/Game/Editor/Containers/EditableEntityFilters/SCR_RenderedEditableEntityFilter.c.

Definition at line 1590 of file SCR_EditableEntityComponent.c.

◆ IsAttachable()

bool SCR_EditableEntityComponent::IsAttachable ( )
inlineprotected

Returns if current entity is attachable

Returns
bool

Definition at line 2367 of file SCR_EditableEntityComponent.c.

◆ IsAttached()

bool SCR_EditableEntityComponent::IsAttached ( )
inlineprotected

Returns if current entity is attached

Returns
bool

Definition at line 2375 of file SCR_EditableEntityComponent.c.

◆ IsChildOf()

bool SCR_EditableEntityComponent::IsChildOf ( SCR_EditableEntityComponent entity)
inlineprotected

Check if the entity is in hierarchy of given entity.

Parameters
[in]entityQueried entity
Returns
true if it's in entity's hierarchy.

Definition at line 1177 of file SCR_EditableEntityComponent.c.

◆ IsDestroyed()

bool SCR_EditableEntityComponent::IsDestroyed ( )
inlineprotected

Check if the entity is destroyed.

Returns
true when destroyed

Definition at line 554 of file SCR_EditableEntityComponent.c.

◆ IsLayer()

bool SCR_EditableEntityComponent::IsLayer ( )
inlineprotected

Check if the entity is also a layer, i.e., has some child entities.

Returns
true when layer.

Definition at line 1289 of file SCR_EditableEntityComponent.c.

◆ IsRegistered()

bool SCR_EditableEntityComponent::IsRegistered ( )
inlineprotected

Check if the entity is registered. Registered entity is a child of either root in SCR_EditableEntityCore or one of already registered entities.

Returns
true when registered

Definition at line 1318 of file SCR_EditableEntityComponent.c.

◆ IsReplicated()

bool SCR_EditableEntityComponent::IsReplicated ( out RplId replicationID = -1)
inlineprotected

Check component's replication. Show an error when it's not registered for replication (e.g., RplComponent is missing)

Parameters
[out]replicationIDID used by Replication.FindItem()
Returns
true if replicated

Definition at line 191 of file SCR_EditableEntityComponent.c.

◆ IsServer()

bool SCR_EditableEntityComponent::IsServer ( )
inlineprotected

Definition at line 237 of file SCR_EditableEntityComponent.c.

◆ Log() [1/2]

void SCR_EditableEntityComponent::Log ( string prefix,
EEditableEntityAccessKey accessKey )
inlineprotected

Print out the entity and all its descendants which are compatible with given key.

Parameters
[in]prefixText added before the printed text
[in]accessKeyAccess key which be checked in entity's access key

Definition at line 2062 of file SCR_EditableEntityComponent.c.

◆ Log() [2/2]

void SCR_EditableEntityComponent::Log ( string prefix = "",
bool onlyDirect = false,
LogLevel logLevel = LogLevel.DEBUG )
inlineprotected

Print out entity information.

Parameters
[in]prefixText added before the printed text
[in]onlyDirectWhen true, only the direct descendants are logged, otherwise all children, children of children etc. are logged.
[in]logLevelLog level type

Definition at line 2030 of file SCR_EditableEntityComponent.c.

◆ LogAccessKey()

void SCR_EditableEntityComponent::LogAccessKey ( )
inlineprotected

Print out entity's access key.

Definition at line 2084 of file SCR_EditableEntityComponent.c.

◆ OnAccessKeyChanged()

void SCR_EditableEntityComponent::OnAccessKeyChanged ( EEditableEntityAccessKey accessKey)
inlineprotected

Definition at line 1825 of file SCR_EditableEntityComponent.c.

◆ OnAuthorChanged()

void SCR_EditableEntityComponent::OnAuthorChanged ( string authorUID,
int authorID,
string authorPlatformID,
int platform,
int lastUpdated )
inlineprotected

Definition at line 800 of file SCR_EditableEntityComponent.c.

◆ OnAuthorChangedServer()

void SCR_EditableEntityComponent::OnAuthorChangedServer ( string authorUID,
int authorID,
string authorPlatformID,
int platform,
int lastUpdated )
inlineprotected

Definition at line 770 of file SCR_EditableEntityComponent.c.

◆ OnChildEntityChanged()

void SCR_EditableEntityComponent::OnChildEntityChanged ( SCR_EditableEntityComponent child,
bool isAdded )
protected

◆ OnCreatedServer()

void SCR_EditableEntityComponent::OnCreatedServer ( notnull SCR_PlacingEditorComponent placedEditorComponent)
protected
Parameters
[in]placedEditorComponent

◆ OnDelete()

override void SCR_EditableEntityComponent::OnDelete ( IEntity owner)
inlineprotected

Definition at line 2190 of file SCR_EditableEntityComponent.c.

◆ OnParentEntityChanged()

void SCR_EditableEntityComponent::OnParentEntityChanged ( SCR_EditableEntityComponent parentEntity,
SCR_EditableEntityComponent parentEntityPrev,
bool changedByUser )
inlineprotected

Definition at line 1331 of file SCR_EditableEntityComponent.c.

◆ OnPostInit()

override void SCR_EditableEntityComponent::OnPostInit ( IEntity owner)
inlineprotected

Definition at line 2219 of file SCR_EditableEntityComponent.c.

◆ OnRegistrationChanged()

void SCR_EditableEntityComponent::OnRegistrationChanged ( bool toRegister)
inlineprotected

Definition at line 1400 of file SCR_EditableEntityComponent.c.

◆ OnRplVisibilityChanged()

void SCR_EditableEntityComponent::OnRplVisibilityChanged ( )
inlineprotected

Definition at line 1793 of file SCR_EditableEntityComponent.c.

◆ OnVisibilityChanged()

void SCR_EditableEntityComponent::OnVisibilityChanged ( )
inlineprotected

Definition at line 1745 of file SCR_EditableEntityComponent.c.

◆ Refresh()

void SCR_EditableEntityComponent::Refresh ( )
inlineprotected

Definition at line 1961 of file SCR_EditableEntityComponent.c.

◆ Register()

void SCR_EditableEntityComponent::Register ( )
inlineprotected

Definition at line 1430 of file SCR_EditableEntityComponent.c.

◆ RemoveAccessKey()

void SCR_EditableEntityComponent::RemoveAccessKey ( EEditableEntityAccessKey accessKey)
inlineprotected

Remove access key. Available only on server!

Parameters
[in]accessKeyKey to be removed

Definition at line 1876 of file SCR_EditableEntityComponent.c.

◆ RemoveChild()

void SCR_EditableEntityComponent::RemoveChild ( SCR_EditableEntityComponent entity)
inlineprotected

Definition at line 1531 of file SCR_EditableEntityComponent.c.

◆ RemoveFromParent()

void SCR_EditableEntityComponent::RemoveFromParent ( SCR_EditableEntityComponent parentEntity,
bool changedByUser )
inlineprotected

Definition at line 1492 of file SCR_EditableEntityComponent.c.

◆ RemoveParentEntity()

void SCR_EditableEntityComponent::RemoveParentEntity ( )
inlineprotected

Remove entity from its parent. This will unregister the entity from the system, making it not editable. Later, it can be enabled again by adding it to editable parent.

Definition at line 1137 of file SCR_EditableEntityComponent.c.

◆ ResetEntityStates()

void SCR_EditableEntityComponent::ResetEntityStates ( )
inlineprotected

Reset all entity states.

Definition at line 1636 of file SCR_EditableEntityComponent.c.

◆ RestoreParentEntity()

void SCR_EditableEntityComponent::RestoreParentEntity ( )
inlineprotected

Add the entity to its previous parent after it was unregistered using RemoveParentEntity() Allowed only on server.

Definition at line 1119 of file SCR_EditableEntityComponent.c.

◆ RplLoad()

override bool SCR_EditableEntityComponent::RplLoad ( ScriptBitReader reader)
inlineprotected

Definition at line 2166 of file SCR_EditableEntityComponent.c.

◆ RplSave()

override bool SCR_EditableEntityComponent::RplSave ( ScriptBitWriter writer)
inlineprotected

Definition at line 2139 of file SCR_EditableEntityComponent.c.

◆ Serialize()

bool SCR_EditableEntityComponent::Serialize ( out SCR_EditableEntityComponent outTarget = null,
out int outTargetIndex = -1,
out EEditableEntitySaveFlag outSaveFlags = 0 )
inlineprotected

Check if the entity can be serialized during session saving managed by SCR_EditableEntityStruct.

Parameters
[out]targetEntity to which this entity is attached to outside of hierarchy structure, e.g., character in a vehicle or waypoint on a target
[out]targetIndexFurther specification of the target, e.g., crew position index in a vehicle
[out]isDestroyedVariable to be set to true if the entity is destroyed
Returns
true if it can be serialized

Definition at line 213 of file SCR_EditableEntityComponent.c.

◆ SetAuthor() [1/2]

void SCR_EditableEntityComponent::SetAuthor ( int playerID)
inlineprotected

Sets AuthorID (player that modified this entity last) in Session

Parameters
[in]authorID

Definition at line 354 of file SCR_EditableEntityComponent.c.

◆ SetAuthor() [2/2]

void SCR_EditableEntityComponent::SetAuthor ( SCR_EditableEntityAuthor author)
inlineprotected

Sets AuthorID (player that modified this entity last) from a Save

Parameters
[in]author

Definition at line 368 of file SCR_EditableEntityComponent.c.

◆ SetAuthorPlatform()

void SCR_EditableEntityComponent::SetAuthorPlatform ( PlatformKind authorPlatform)
inlineprotected

Definition at line 462 of file SCR_EditableEntityComponent.c.

◆ SetAuthorPlatformID()

void SCR_EditableEntityComponent::SetAuthorPlatformID ( string authorPlatformID)
inlineprotected

Definition at line 445 of file SCR_EditableEntityComponent.c.

◆ SetAuthorUID()

void SCR_EditableEntityComponent::SetAuthorUID ( string authorUID)
inlineprotected

Set Author UID (for normal usage use SetAuthor())

Parameters
[in]authorUID

Definition at line 436 of file SCR_EditableEntityComponent.c.

◆ SetAuthorUpdatedTime()

void SCR_EditableEntityComponent::SetAuthorUpdatedTime ( int updatedLast)
inlineprotected

Set Time of last update

Parameters
[in]authorUID

Definition at line 456 of file SCR_EditableEntityComponent.c.

◆ SetEntityFlag()

void SCR_EditableEntityComponent::SetEntityFlag ( EEditableEntityFlag flag,
bool toSet )
inlineprotected

Set entity flag.

Parameters
[in]flagFlag type
Returns
toSet True to set the flag

Definition at line 1680 of file SCR_EditableEntityComponent.c.

◆ SetEntityState()

void SCR_EditableEntityComponent::SetEntityState ( EEditableEntityState state,
bool toSet )
inlineprotected

Set value of an entity state. Multiple states can exist at the same time (e.g., HOVER and SELECTED).

State has only informational value! For example setting it to SELECTED will not actually select the entity.

Parameters
[in]stateTarget state
[in]toSetTrue to activate the state, false to deactivate

Definition at line 1609 of file SCR_EditableEntityComponent.c.

◆ SetEntityStateInChildren()

void SCR_EditableEntityComponent::SetEntityStateInChildren ( IEntity owner,
EEditableEntityState state,
bool toSet,
out array< Managed > components = null )
inlineprotected

Definition at line 1707 of file SCR_EditableEntityComponent.c.

◆ SetHierarchyAsDirty()

void SCR_EditableEntityComponent::SetHierarchyAsDirty ( )
inlineprotected

Mark entity hierarchy as dirty, i.e., modified by user. Used for example to evaluate if the entity should be saved into a save file in its entirety.

Definition at line 627 of file SCR_EditableEntityComponent.c.

◆ SetHierarchyAsDirtyInParents()

void SCR_EditableEntityComponent::SetHierarchyAsDirtyInParents ( )
inlineprotected

Mark hierarchy in all parents of the entity as dirty, i.e., modified by user. Used for example to evaluate if the entity should be saved into a save file in its entirety.

Definition at line 611 of file SCR_EditableEntityComponent.c.

◆ SetInfoInstance()

void SCR_EditableEntityComponent::SetInfoInstance ( SCR_UIInfo info)
inlineprotected

Set information about the entity on entity instance, locally on this machine. This is a weak ref! The info needs to be held somewhere else, the entity will merely link to it.

Parameters
[in]infoInfo class

Definition at line 182 of file SCR_EditableEntityComponent.c.

◆ SetMaxDrawDistance()

void SCR_EditableEntityComponent::SetMaxDrawDistance ( float maxDrawDistance)
inlineprotected

Set maximum distance in which this entity is drawn in editor (e.g., with an icon).

Parameters
[in]maxDrawDistanceDistance in metres

Definition at line 905 of file SCR_EditableEntityComponent.c.

◆ SetParentEntity()

SCR_EditableEntityComponent SCR_EditableEntityComponent::SetParentEntity ( SCR_EditableEntityComponent parentEntity,
bool changedByUser = false )
inlineprotected

Set parent of the entity. When placed inside a parent, the entity will inherit some of its settings, like access key or visibility settings. Changing it is allowed only on server.

Parameters
[in]parentEntityNew parent. When null, the entity will be moved to the root.
[in]changedByUserTrue when the change was initiated by user
Returns
New parent (in case it changes inside)

Definition at line 1068 of file SCR_EditableEntityComponent.c.

◆ SetParentEntityBroadcast()

void SCR_EditableEntityComponent::SetParentEntityBroadcast ( SCR_EditableEntityComponent parentEntity,
SCR_EditableEntityComponent parentEntityPrev,
bool changedByUser = false,
bool isAutoRegistration = false )
inlineprotected

Definition at line 1346 of file SCR_EditableEntityComponent.c.

◆ SetParentEntityBroadcastReceive()

void SCR_EditableEntityComponent::SetParentEntityBroadcastReceive ( RplId parentEntityID,
RplId parentEntityPrevID,
bool changedByUser )
inlineprotected

Definition at line 1378 of file SCR_EditableEntityComponent.c.

◆ SetStatic()

void SCR_EditableEntityComponent::SetStatic ( bool isStatic)
inlineprotected

Set entity as static. When static, entity's position is not calculated each frame. Instead, cached position is used. Calling this function with isStatic=true refreshes cached position based on the current position. Use only for entities that are not expected to move! Certain entity types cannot be set as static, and this command will ignore them. Ignored types are GROUP, CHARACTER and VEHICLE.

Parameters
[in]isStaticTrue to set as static

Definition at line 574 of file SCR_EditableEntityComponent.c.

◆ SetTransform()

bool SCR_EditableEntityComponent::SetTransform ( vector transform[4],
bool changedByUser = false )
inlineprotected

Update entity's transformation and broadcast the changes to all clients.

Parameters
[in]transformTarget transformation
[in]changedByUserTrue when the change was initiated by user

Definition at line 648 of file SCR_EditableEntityComponent.c.

◆ SetTransformBroadcast()

void SCR_EditableEntityComponent::SetTransformBroadcast ( vector transform[4])
inlineprotected

Definition at line 751 of file SCR_EditableEntityComponent.c.

◆ SetTransformOwner()

void SCR_EditableEntityComponent::SetTransformOwner ( vector transform[4])
inlineprotected

Definition at line 732 of file SCR_EditableEntityComponent.c.

◆ SetTransformWithChildren()

void SCR_EditableEntityComponent::SetTransformWithChildren ( vector transform[4])
inlineprotected

Update transformation of the entity and all its editor children and broadcast the changes to all clients.

Parameters
[in]transformTarget transformation

Definition at line 635 of file SCR_EditableEntityComponent.c.

◆ SetVisible()

void SCR_EditableEntityComponent::SetVisible ( bool show)
inlineprotected

Set entity visibility. When set to false, the entity will not be shown to the user. Visibility is local to editor user.

Parameters
[in]showtrue to show, false to hide

Definition at line 1761 of file SCR_EditableEntityComponent.c.

◆ Unregister()

void SCR_EditableEntityComponent::Unregister ( IEntity owner = null)
inlineprotected

Definition at line 1455 of file SCR_EditableEntityComponent.c.

◆ UpdateGameHierarchy()

void SCR_EditableEntityComponent::UpdateGameHierarchy ( IEntity parent,
IEntity child,
bool toAdd )
inlineprotected

Definition at line 1554 of file SCR_EditableEntityComponent.c.

◆ UpdateStaticPos()

void SCR_EditableEntityComponent::UpdateStaticPos ( )
inlineprotected

Update static cached position. Doesn't do anything when the entity is not marked as static.

Definition at line 598 of file SCR_EditableEntityComponent.c.

◆ ValidateType()

bool SCR_EditableEntityComponent::ValidateType ( )
inlineprotected

Definition at line 1975 of file SCR_EditableEntityComponent.c.

Member Data Documentation

◆ m_aAttachedEntities

ref set<SCR_EditableEntityComponent> SCR_EditableEntityComponent::m_aAttachedEntities
protected

Definition at line 51 of file SCR_EditableEntityComponent.c.

◆ m_AccessKey

EEditableEntityAccessKey SCR_EditableEntityComponent::m_AccessKey
protected

Definition at line 34 of file SCR_EditableEntityComponent.c.

◆ m_Author

ref SCR_EditableEntityAuthor SCR_EditableEntityComponent::m_Author
protected

Definition at line 48 of file SCR_EditableEntityComponent.c.

◆ m_bAutoRegister

EEditableEntityRegister SCR_EditableEntityComponent::m_bAutoRegister
protected

Definition at line 16 of file SCR_EditableEntityComponent.c.

◆ m_bEnabledVisibilityReplication

bool SCR_EditableEntityComponent::m_bEnabledVisibilityReplication
protected

Definition at line 22 of file SCR_EditableEntityComponent.c.

◆ m_bStatic

bool SCR_EditableEntityComponent::m_bStatic
protected

Definition at line 28 of file SCR_EditableEntityComponent.c.

◆ m_bVisible

bool SCR_EditableEntityComponent::m_bVisible
protected

Definition at line 25 of file SCR_EditableEntityComponent.c.

◆ m_Entities

ref set<SCR_EditableEntityComponent> SCR_EditableEntityComponent::m_Entities
protected

Definition at line 43 of file SCR_EditableEntityComponent.c.

◆ m_EntityState

EEditableEntityState SCR_EditableEntityComponent::m_EntityState
protected

Definition at line 41 of file SCR_EditableEntityComponent.c.

◆ m_Flags

EEditableEntityFlag SCR_EditableEntityComponent::m_Flags
protected

Definition at line 37 of file SCR_EditableEntityComponent.c.

◆ m_fMaxDrawDistance

float SCR_EditableEntityComponent::m_fMaxDrawDistance
protected

Definition at line 31 of file SCR_EditableEntityComponent.c.

◆ m_iAuthorLastUpdated

int SCR_EditableEntityComponent::m_iAuthorLastUpdated
protected

Definition at line 49 of file SCR_EditableEntityComponent.c.

◆ m_iIconBoneIndex

int SCR_EditableEntityComponent::m_iIconBoneIndex = -1
protected

Definition at line 45 of file SCR_EditableEntityComponent.c.

◆ m_OnDeleted

ref ScriptInvokerEntity SCR_EditableEntityComponent::m_OnDeleted
protected

Definition at line 46 of file SCR_EditableEntityComponent.c.

◆ m_Owner

GenericEntity SCR_EditableEntityComponent::m_Owner
protected

Definition at line 40 of file SCR_EditableEntityComponent.c.

◆ m_ParentEntity

SCR_EditableEntityComponent SCR_EditableEntityComponent::m_ParentEntity
protected

Definition at line 39 of file SCR_EditableEntityComponent.c.

◆ m_UIInfoInstance

SCR_UIInfo SCR_EditableEntityComponent::m_UIInfoInstance
protected

Definition at line 42 of file SCR_EditableEntityComponent.c.

◆ m_vIconPos

vector SCR_EditableEntityComponent::m_vIconPos
protected

Definition at line 19 of file SCR_EditableEntityComponent.c.

◆ m_vStaticPos

vector SCR_EditableEntityComponent::m_vStaticPos
protected

Definition at line 44 of file SCR_EditableEntityComponent.c.


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