24 [
RplProp(onRplName:
"OnRplVisibilityChanged", condition:
RplCondition.Custom, customConditionName:
"CanReplicateVisibility"),
Attribute(
"1",
category:
"Visualization",
desc:
"Set entity's visibility setting. Apart from this custom value, visibility of an entitymay be influenced by other factors like distance to the camera or active layer.")]
27 [
Attribute(
category:
"Visualization",
desc:
"Mark entity as static. When static, entity's position is not calculated each frame. Instead, cached position is used.")]
30 [
Attribute(
"0",
category:
"Visualization",
desc:
"Max distance in which the entity is drawn.\nWhen 0 or below, default for given type is used.")]
33 [
Attribute(
"1",
UIWidgets.Flags,
category:
"Editable Entity",
desc:
"For editor users to edit or even see the entity, at least one of their editor keys must match entity's keys.\nFOr example, if the entity has KEY_1 and KEY_2, while the editor has KEY_2 and KEY_8, the entity will be available, since both have KEY_2.", enums: ParamEnumArray.FromEnum(
EEditableEntityAccessKey))]
43 protected ref set<SCR_EditableEntityComponent>
m_Entities;
48 protected ref SCR_EditableEntityAuthor
m_Author;
64 displayName = info.GetName();
66 if (!displayName.IsEmpty() || !
m_Owner)
70 displayName =
m_Owner.GetName();
71 if (!displayName.IsEmpty())
72 return "[" + displayName +
"]";
75 return "{" +
m_Owner.Type().ToString() +
"}";
95 if (shorten && prefab)
98 int guidIndex = prefab.LastIndexOf(
"}");
100 prefab = prefab.Substring(0, guidIndex + 1);
198 if (replicationID == -1)
212 [
Obsolete(
"Only used for backwards compatiblity for GM saves. Will be removed entirely.")]
229 [
Obsolete(
"Only used for backwards compatiblity for GM saves. Will be removed entirely.")]
312 m_Owner.GetTransform(outTransform);
327 m_Owner.GetLocalTransform(outTransform);
332 m_Owner.GetTransform(outTransform);
335 vector parentTransform[4];
337 Math3D.MatrixInvMultiply4(parentTransform, outTransform, outTransform);
357 m_Author =
new SCR_EditableEntityAuthor();
398 return m_Author.m_sAuthorPlatformID;
450 m_Author.m_sAuthorPlatformID = authorPlatformID;
467 m_Author.m_ePlatform = authorPlatform;
526 int GetCrew(out notnull array<CompartmentAccessComponent> crewCompartmentAccess,
bool ignorePlayers =
true);
538 return damageManager.GetHealthScaled();
548 return damageManager && damageManager.IsDamageHandlingEnabled();
561 return damageManager.GetState() ==
EDamageState.DESTROYED;
578 Print(
string.Format(
"Cannot mark '%1' as static, it's marked as EntityFlags.ACTIVE!",
m_Owner),
LogLevel.WARNING);
641 SCR_RefPreviewEntity.SpawnAndApplyReference(
this,
params);
658 if (phys && (phys.IsDynamic() || phys.IsKinematic()) &&
position[1] > terrainY ||
float.AlmostEqual(
position[1], terrainY, 0.01))
661 transform[3][1] = terrainY;
664 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.FindResourceComponent(
m_Owner);
665 if (resourceComponent)
674 RplComponent rpl = RplComponent.Cast(
m_Owner.FindComponent(RplComponent));
677 m_Owner.GetWorldTransform(prevTransform);
685 if(!
System.IsCLIParam(
"clientVehicles"))
723 core.Event_OnEntityTransformChangedServer.Invoke(
this, prevTransform);
726 rpl.ForceNodeMovement(prevTransform[3]);
734 BaseGameEntity baseGameEntity = BaseGameEntity.Cast(
m_Owner);
737 baseGameEntity.Teleport(transform);
740 Physics phys = baseGameEntity.GetPhysics();
743 phys.SetVelocity(
vector.Zero);
744 phys.SetAngularVelocity(
vector.Zero);
757 m_Owner.SetWorldTransform(transform);
765 core.Event_OnEntityTransformChanged.Invoke(
this);
770 protected void OnAuthorChangedServer(
string authorUID,
int authorID,
string authorPlatformID,
int platform,
int lastUpdated)
782 if (entityCore && newAuthor !=
m_Author.m_sAuthorUID && !
m_Author.m_sAuthorUID.IsEmpty() && !newAuthor.IsEmpty())
785 m_Author.m_ePlatform = backendApi.GetPlayerPlatformKind(authorID);
786 m_Author.m_sAuthorPlatformID = backendApi.GetPlayerPlatformId(authorID);
792 if (entityCore && oldAuthor !=
m_Author.m_sAuthorUID)
800 protected void OnAuthorChanged(
string authorUID,
int authorID,
string authorPlatformID,
int platform,
int lastUpdated)
803 m_Author.m_sAuthorPlatformID = authorPlatformID;
820 damageManager.SetAndReplicateInstigator(instigator);
822 SCR_DamageManagerComponent scrDamageManager = SCR_DamageManagerComponent.Cast(damageManager);
823 if (scrDamageManager)
825 scrDamageManager.Kill(instigator);
842 bool Delete(
bool changedByUser =
false,
bool updateNavmesh =
false)
861 array<ref Tuple2<vector, vector>> areas = {};
862 array<bool> redoAreas = {};
878 RplComponent.DeleteRplEntity(
m_Owner,
false);
891 return RplId.Invalid();
907 if (maxDrawDistance <= 0)
935 if (editableEntityUIInfo)
938 return !outBudgets.IsEmpty();
949 if (editableEntityUIInfo)
953 return !outBudgets.IsEmpty();
962 if (editableEntityUIInfo)
965 return !outBudgets.IsEmpty();
974 if(!editableEntityUIInfo)
989 array<ref SCR_EntityBudgetValue> entityBudgetCosts = {};
996 if(budgetCost.GetBudgetType() != budgetToFind)
1010 bool CanDuplicate(out notnull set<SCR_EditableEntityComponent> outRecipients)
1016 if (factionAffiliationComponent)
1018 Faction faction = factionAffiliationComponent.GetAffiliatedFaction();
1020 if (delegateFactionManager)
1022 SCR_EditableFactionComponent factionDelegate = delegateFactionManager.
GetFactionDelegate(faction);
1023 if (factionDelegate)
1024 outRecipients.Insert(factionDelegate);
1058 return interaction.
CanSetParent(parentEntity, interactionFlags);
1072 return parentEntity;
1076 return parentEntity;
1080 if (parentEntity && SCR_ChimeraCharacter.Cast(parentEntity.GetOwner()) && parentEntity.
IsDestroyed())
1086 if (parentEntity ==
this)
1088 Log(
"Cannot set parent to itself!",
true,
LogLevel.WARNING);
1089 return parentEntity;
1095 Log(
string.Format(
"Cannot set parent to its own child %1!", parentEntity),
true,
LogLevel.WARNING);
1096 return parentEntity;
1104 return parentEntity;
1113 return parentEntity;
1168 entities.Insert(parent);
1182 if (parent == entity)
1206 void GetChildren(out notnull set<SCR_EditableEntityComponent> entities,
bool onlyDirect =
false,
bool skipIgnored =
false)
1216 entities.Insert(entity);
1218 entity.GetChildren(entities, onlyDirect, skipIgnored);
1238 if (entity.HasAccessSelf(accessKey))
1240 entities.Insert(entity);
1242 entity.GetChildren(entities, onlyDirect, accessKey);
1268 count += child.GetChildrenCount(onlyDirect);
1309 return this != layersManager.GetCurrentLayer()
1311 && (!toExtreme ||
GetParentEntity() != layersManager.GetCurrentLayer());
1335 if (parentEntity != parentEntityPrev)
1342 core.Event_OnParentEntityChanged.Invoke(
this, parentEntity, parentEntityPrev);
1385 (parentEntityID.IsValid() && !parentEntity)
1402 set<SCR_EditableEntityComponent> children =
new set<SCR_EditableEntityComponent>();
1446 array<SCR_EditableEntityComponent> orphans = {};
1449 orphans[i].SetParentEntityBroadcast(
this, orphans[i].
GetParentEntity());
1450 Print(
string.Format(
"Editor parent %1 restored for orphan %2",
this, orphans[i]),
LogLevel.VERBOSE);
1518 m_Entities =
new set<SCR_EditableEntityComponent>();
1556 if (!parent || !child)
1665 return (
m_Flags & flag) == flag;
1724 for (
int i = 0; i < componentsCount; i++)
1727 if (component && component.CanApply(state))
1749 core.Event_OnEntityVisibilityChanged.Invoke(
this);
1767 if (rpl && !rpl.IsProxy())
1777 if (!rpl || rpl.IsProxy())
1833 core.Event_OnEntityAccessKeyChanged.Invoke(
this);
1836 SCR_AccessKeysEditorComponent accessKeysComponent = SCR_AccessKeysEditorComponent.Cast(SCR_AccessKeysEditorComponent.GetInstance(SCR_AccessKeysEditorComponent));
1838 if (accessKeysComponent)
1839 editorAccessKey = accessKeysComponent.GetAccessKey();
1841 set<SCR_EditableEntityComponent> children =
new set<SCR_EditableEntityComponent>;
1845 core.Event_OnEntityAccessKeyChanged.Invoke(child);
1934 SCR_AccessKeysEditorComponent accessKeysComponent = SCR_AccessKeysEditorComponent.Cast(SCR_AccessKeysEditorComponent.GetInstance(SCR_AccessKeysEditorComponent));
1935 if (!accessKeysComponent)
1947 SCR_AccessKeysEditorComponent accessKeysComponent = SCR_AccessKeysEditorComponent.Cast(SCR_AccessKeysEditorComponent.GetInstance(SCR_AccessKeysEditorComponent));
1948 if (!accessKeysComponent)
1965 core.Event_OnEntityRefreshed.Invoke(
this);
1987 return m_Owner.IsInherited(AIGroup);
1990 return m_Owner.IsInherited(AIWaypoint);
1993 return this.
IsInherited(SCR_EditableCommentComponent);
2014 prefabName =
FilePath.StripPath(prefabData.GetPrefabName());
2017 for (
int i = 0; i < 50 - prefix.Length() - displayName.Length(); i++)
2022 return string.Format(
"%1%2 | entity: %3, prefab: '%4', pos: %5, flags: %6", displayName, space,
m_Owner, prefabName,
m_Owner.GetOrigin(),
SCR_Enum.FlagsToString(
EEditableEntityFlag,
m_Flags));
2034 Print(
string.Format(prefix +
" - Error: Null m_Owner in %1",
this),
LogLevel.WARNING);
2047 entity.Log(prefix +
" ");
2049 Log(
string.Format(prefix +
" - Error: Null child in %1!",
this),
true,
LogLevel.WARNING)
2073 entity.Log(prefix +
" ", accessKey);
2088 int enumCount = enumType.GetVariableCount();
2089 for (
int i = 0; i < enumCount; i++)
2092 if (enumType.GetVariableType(i) ==
int && enumType.GetVariableValue(null, i, val))
2096 if (!output.IsEmpty())
2099 output += enumType.GetVariableName(i);
2141 string authorUID, authorPlatformID;
2142 int platform, authorID;
2149 authorPlatformID =
m_Author.m_sAuthorPlatformID;
2152 writer.WriteString(authorUID);
2153 writer.WriteString(authorPlatformID);
2154 writer.WriteInt(platform);
2155 writer.WriteInt(authorID);
2159 writer.WriteRplId(parentID);
2168 string authorUID, authorPlatformID;
2169 int platform, authorID;
2172 reader.ReadString(authorUID);
2173 reader.ReadString(authorPlatformID);
2174 reader.ReadInt(platform);
2175 reader.ReadInt(authorID);
2178 m_Author =
new SCR_EditableEntityAuthor();
2179 m_Author.Initialize(authorUID, authorPlatformID, platform, authorID);
2182 reader.ReadRplId(parentID);
2203 for (
int i =
m_Entities.Count() - 1; i >= 0; i--)
2238 RplComponent rpl = RplComponent.Cast(
m_Owner.FindComponent(RplComponent));
2243 Print(
string.Format(
"Editable entity @\"%1\" is flagged as LOCAL, but contains RplComponent!",
GetPrefab()),
LogLevel.ERROR);
2252 Print(
string.Format(
"Editable entity @\"%1\" is missing RplComponent! Maybe try regenerating it again.",
GetPrefab()),
LogLevel.ERROR);
2271 persistence.StartTracking(owner);
2299 if (!boneName.IsEmpty())
2354 set<SCR_EditableEntityComponent> entities =
new set<SCR_EditableEntityComponent>();
2358 entities.Insert(entity);
2389class SCR_EditableEntityAuthor
2412 Print(
"GetAllOwnedEntities(): SCR_EditableEntityCore was not found!",
LogLevel.ERROR);
2424 static bool Extract(SCR_EditableEntityAuthor instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
2426 snapshot.SerializeString(instance.m_sAuthorUID);
2427 snapshot.SerializeString(instance.m_sAuthorPlatformID);
2428 snapshot.SerializeInt(instance.m_ePlatform);
2429 snapshot.SerializeInt(instance.m_iAuthorID);
2430 snapshot.SerializeInt(instance.m_iEntityCount);
2439 static bool Inject(SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_EditableEntityAuthor instance)
2441 snapshot.SerializeString(instance.m_sAuthorUID);
2442 snapshot.SerializeString(instance.m_sAuthorPlatformID);
2443 snapshot.SerializeInt(instance.m_ePlatform);
2444 snapshot.SerializeInt(instance.m_iAuthorID);
2445 snapshot.SerializeInt(instance.m_iEntityCount);
2453 static void Encode(SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
2455 snapshot.EncodeString(packet);
2456 snapshot.EncodeString(packet);
2457 snapshot.EncodeInt(packet);
2458 snapshot.EncodeInt(packet);
2459 snapshot.EncodeInt(packet);
2467 static bool Decode(ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
2469 snapshot.DecodeString(packet);
2470 snapshot.DecodeString(packet);
2471 snapshot.DecodeInt(packet);
2472 snapshot.DecodeInt(packet);
2473 snapshot.DecodeInt(packet);
2482 static bool SnapCompare(SSnapSerializerBase lhs, SSnapSerializerBase rhs , ScriptCtx ctx)
2484 return lhs.CompareStringSnapshots(rhs);
2492 static bool PropCompare(SCR_EditableEntityAuthor instance, SSnapSerializerBase snapshot, ScriptCtx ctx)
2494 return snapshot.CompareString(instance.m_sAuthorUID);
SCR_EAIThreatSectorFlags flags
ArmaReforgerScripted GetGame()
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
SCR_CharacterSoundComponentClass GetComponentData()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_EditableEntityBaseChildComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
string m_sAuthorPlatformID
int GetAllOwnedEntities(out notnull set< SCR_EditableEntityComponent > entities)
override SCR_UIInfo GetInfo()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvokerBase< ScriptInvokerEntityMethod > ScriptInvokerEntity
proto native external bool IsInherited(typename type)
proto external GenericComponent FindComponent(typename typeName)
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
proto external Managed FindComponent(typename typeName)
proto external int AddChild(notnull IEntity child, TNodeId pivot, EAddChildFlags flags=EAddChildFlags.AUTO_TRANSFORM)
Add Entity to hierarchy. Pivot is pivot index, or -1 for center of parent.
proto external IEntity GetChildren()
proto external void GetWorldTransform(out vector mat[])
See IEntity::GetTransform.
proto external int FindComponents(typename typeName, notnull array< Managed > outComponents)
proto external bool SetWorldTransform(vector mat[4])
See IEntity::SetTransform. Returns false, if there is no change in transformation.
proto external void RemoveChild(notnull IEntity child, bool keepTransform=false)
Remove Entity from hierarchy.
proto external IEntity GetSibling()
proto external bool IsDeleted()
Replication item identifier.
void GetNavmeshRebuildAreas(IEntity entity, out notnull array< ref Tuple2< vector, vector > > outAreas, out notnull array< bool > redoRoads)
void RequestNavmeshRebuildAreas(notnull array< ref Tuple2< vector, vector > > areas, notnull array< bool > redoRoads)
void RequestNavmeshRebuildEntity(IEntity entity)
static Managed GetInstance(typename type, bool showError=false, bool modeFirst=false)
SCR_EditableFactionComponent GetFactionDelegate(Faction faction)
static SCR_DelegateFactionManagerComponent GetInstance()
EEditableEntityType GetEntityType()
SCR_EditableEntityInteraction GetEntityInteraction()
void SetAuthorUpdatedTime(int updatedLast)
void Unregister(IEntity owner=null)
string GetLogText(string prefix="")
bool IsChildOf(SCR_EditableEntityComponent entity)
int GetAuthorLastUpdated()
void SetTransformBroadcast(vector transform[4])
EEditableEntityAccessKey m_AccessKey
bool Serialize(out SCR_EditableEntityComponent outTarget=null, out int outTargetIndex=-1, out EEditableEntitySaveFlag outSaveFlags=0)
override void OnDelete(IEntity owner)
void GetChildren(out notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect=false, bool skipIgnored=false)
bool EntityHasBudgetOfType(EEditableEntityBudget budgetToFind)
Returns true if the entity consumes this type of budget.
EEditableEntityRegister m_bAutoRegister
void SetHierarchyAsDirty()
void SetAuthorPlatformID(string authorPlatformID)
string GetAuthorPlatformID()
void EnableVisibilityReplication(bool enable)
SCR_EditableEntityComponentClass GetEditableEntityData(IEntity owner=null)
ResourceName GetPrefab(bool shorten=false)
EEditableEntityAccessKey GetAccessKey()
bool HasAccessInHierarchy()
void LogAccessKey()
Print out entity's access key.
bool HasEntityFlag(EEditableEntityFlag flag)
bool HasAccessInHierarchy(EEditableEntityAccessKey accessKey)
bool SetTransform(vector transform[4], bool changedByUser=false)
SCR_EditableEntityComponent GetChild(int index)
set< SCR_EditableEntityComponent > GetChildrenRef()
void SetParentEntityBroadcastReceive(RplId parentEntityID, RplId parentEntityPrevID, bool changedByUser)
void SetVisible(bool show)
override void OnPostInit(IEntity owner)
RplComponent GetRplComponent()
void RemoveAccessKey(EEditableEntityAccessKey accessKey)
ref set< SCR_EditableEntityComponent > m_aAttachedEntities
void GetParentEntities(out notnull array< SCR_EditableEntityComponent > entities)
void Log(string prefix="", bool onlyDirect=false, LogLevel logLevel=LogLevel.DEBUG)
void SetAuthorPlatform(PlatformKind authorPlatform)
void OnRplVisibilityChanged()
SCR_EditableEntityComponent EOnEditorPlace(out SCR_EditableEntityComponent parent, SCR_EditableEntityComponent recipient, EEditorPlacingFlags flags, bool isQueue, int playerID=0)
bool GetEntityAndChildrenBudgetCost(out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null)
void SetStatic(bool isStatic)
GenericEntity GetOwnerScripted()
SCR_EditableEntityComponent GetAttachedTo()
void OnVisibilityChanged()
void ForceVehicleCompartments(notnull array< ECompartmentType > forceVehicleCompartments)
void SetTransformOwner(vector transform[4])
SCR_EditableEntityComponent m_ParentEntity
void ResetEntityStates()
Reset all entity states.
void SetInfoInstance(SCR_UIInfo info)
void OnParentEntityChanged(SCR_EditableEntityComponent parentEntity, SCR_EditableEntityComponent parentEntityPrev, bool changedByUser)
void OnAccessKeyChanged(EEditableEntityAccessKey accessKey)
SCR_EditableEntityComponent GetAIEntity()
SCR_UIInfo m_UIInfoInstance
ScriptInvoker GetOnUIRefresh()
PlatformKind GetAuthorPlatform()
void SetEntityState(EEditableEntityState state, bool toSet)
void SetMaxDrawDistance(float maxDrawDistance)
void SCR_EditableEntityComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
EEditableEntityFlag m_Flags
bool GetLocalTransform(out vector outTransform[4])
bool HasEntityState(EEditableEntityState state)
SCR_EditableEntityComponent GetVehicle()
bool Delete(bool changedByUser=false, bool updateNavmesh=false)
static SCR_EditableEntityComponent GetEditableEntity(IEntity owner)
void SetAuthor(SCR_EditableEntityAuthor author)
bool GetPos(out vector pos)
void SetEntityStateInChildren(IEntity owner, EEditableEntityState state, bool toSet, out array< Managed > components=null)
void EOnEditorSessionLoad(SCR_EditableEntityComponent parent)
void SetAuthor(int playerID)
EEditableEntityType GetEntityType(IEntity owner=null)
bool CanReplicateVisibility()
void SetAuthorUID(string authorUID)
int GetChildrenCount(bool onlyDirect=false)
bool CanEnterLayer(SCR_LayersEditorComponent layersManager=null, bool toExtreme=false)
void AddAccessKey(EEditableEntityAccessKey accessKey)
void Detach(notnull SCR_EditableEntityComponent attachable)
bool CanSetParent(SCR_EditableEntityComponent parentEntity)
ScriptInvoker GetOnUIReset()
void RemoveFromParent(SCR_EditableEntityComponent parentEntity, bool changedByUser)
ScriptInvokerEntity GetOnDeleted()
SCR_EditableEntityAuthor GetAuthor()
EEditableEntityFlag GetEntityFlags()
bool GetTransform(out vector outTransform[4])
bool GetEntityChildrenBudgetCost(out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null)
void CopyEntityFlags(EEditableEntityFlag flags)
SCR_EditableEntityComponent SetParentEntity(SCR_EditableEntityComponent parentEntity, bool changedByUser=false)
EEditableEntityRegister GetAutoRegister()
void UpdateGameHierarchy(IEntity parent, IEntity child, bool toAdd)
override bool RplLoad(ScriptBitReader reader)
void GetChildren(out notnull set< SCR_EditableEntityComponent > entities, bool onlyDirect, EEditableEntityAccessKey accessKey)
int GetCrew(out notnull array< CompartmentAccessComponent > crewCompartmentAccess, bool ignorePlayers=true)
void RemoveParentEntity()
bool IsReplicated(out RplId replicationID=-1)
set< SCR_EditableEntityComponent > GetAttachedEntities()
float GetMaxDrawDistanceSq()
ref ScriptInvokerEntity m_OnDeleted
void SetParentEntityBroadcast(SCR_EditableEntityComponent parentEntity, SCR_EditableEntityComponent parentEntityPrev, bool changedByUser=false, bool isAutoRegistration=false)
bool m_bEnabledVisibilityReplication
bool GetVisibleInHierarchy()
void SetTransformWithChildren(vector transform[4])
void Log(string prefix, EEditableEntityAccessKey accessKey)
void OnAuthorChanged(string authorUID, int authorID, string authorPlatformID, int platform, int lastUpdated)
ref set< SCR_EditableEntityComponent > m_Entities
void SetEntityFlag(EEditableEntityFlag flag, bool toSet)
bool HasAccessSelf(EEditableEntityAccessKey accessKey)
void SetHierarchyAsDirtyInParents()
bool Destroy(int editorPlayerID=0)
void AddToParent(SCR_EditableEntityComponent parentEntity, bool changedByUser)
void OnChildEntityChanged(SCR_EditableEntityComponent child, bool isAdded)
bool CanDuplicate(out notnull set< SCR_EditableEntityComponent > outRecipients)
EEditableEntityState GetEntityStates()
SCR_EditableEntityInteraction GetEntityInteraction(IEntity owner=null)
override bool RplSave(ScriptBitWriter writer)
void RestoreParentEntity()
ref SCR_EditableEntityAuthor m_Author
void Attach(notnull SCR_EditableEntityComponent attachable)
void OnAuthorChangedServer(string authorUID, int authorID, string authorPlatformID, int platform, int lastUpdated)
void Deserialize(SCR_EditableEntityComponent target, int targetValue)
void OnCreatedServer(notnull SCR_PlacingEditorComponent placedEditorComponent)
SCR_UIInfo GetInfo(IEntity owner=null)
void RemoveChild(SCR_EditableEntityComponent entity)
bool GetEntityBudgetCost(out notnull array< ref SCR_EntityBudgetValue > outBudgets, IEntity owner=null)
void AddChild(SCR_EditableEntityComponent entity)
SCR_EditableEntityComponent GetParentEntity()
void OnRegistrationChanged(bool toRegister)
EEditableEntityState m_EntityState
SCR_EditableEntityComponent GetAIGroup()
EEditableEntityBudget GetBudgetForEntityType(EEditableEntityType entityType)
void RemoveFromRoot(SCR_EditableEntityComponent entity)
int RemoveOrphans(RplId parentId, out notnull array< SCR_EditableEntityComponent > outOrphans)
void RegisterEntity(SCR_EditableEntityComponent entity)
void UnRegisterEntity(SCR_EditableEntityComponent entity, IEntity owner=null)
void AddOrphan(RplId parentId, RplId orphanId)
int GetAllEntitiesByAuthorUID(out notnull set< SCR_EditableEntityComponent > entities, string playerUID)
void RegisterAuthorServer(SCR_EditableEntityAuthor newAuthor)
void AuthorEntityRemovedServer(SCR_EditableEntityAuthor newAuthor)
void AddToRoot(SCR_EditableEntityComponent entity)
sealed bool CanSetParent(SCR_EditableEntityComponent parentEntity, EEditableEntityInteractionFlag interactionFlags=int.MAX)
void GetEntityAndChildrenBudgetCost(out notnull array< ref SCR_EntityBudgetValue > outBudgets)
Get Entity and its children budgets.
EEditableEntityType GetEntityType()
bool GetEntityBudgetCost(out notnull array< ref SCR_EntityBudgetValue > outBudgets)
void GetEntityChildrenBudgetCost(out notnull array< ref SCR_EntityBudgetValue > outBudgets)
Get only Entity's children budget costs, i.e. cost of entities inside a composition entitiy.
Network packet of variables for entity placing and transformation.
static SCR_EditorPreviewParams CreateParams(vector transform[4], RplId parentID=Replication.INVALID_ID, EEditorTransformVertical verticalMode=EEditorTransformVertical.SEA, bool isUnderwater=false, SCR_EditableEntityComponent target=null, EEditableEntityInteraction targetInteraction=EEditableEntityInteraction.NONE)
static bool IsPositionWithinTerrainBounds(vector pos)
static sealed SCR_PersistenceSystem GetByEntityWorld(IEntity entity)
void UpdateResourceItem(notnull SCR_ResourceComponent item)
int IncreaseGridUpdateId()
proto external GenericEntity GetOwner()
Get owner entity.
enum EPhysicsLayerPresets Vehicle
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
SCR_EditableEntityComponent m_sAuthorUID
EEditableEntityFlag
Unique flags of the entity.
SCR_FieldOfViewSettings Attribute
EEditorTransformVertical
Vertical transformation mode.
EEditableEntityInteractionFlag
Details of entity interaction.
EntityFlags
Various entity flags.
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplCondition
Conditional replication rule. Fine grained selection of receivers.
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.