1[
ComponentEditorProps(
category:
"GameScripted/Editor", description:
"Content browser component. Works only with SCR_EditorBaseEntity!", icon:
"WBData/ComponentEditorProps/componentEditor.png")]
7 [
Attribute(
category:
"Placing", uiwidget:
UIWidgets.ResourcePickerThumbnail,
desc:
"Editable entity used for testing. Should be a sphere 1 m in diameter.")]
11 protected ref array<ref SCR_PlaceableEntitiesRegistry>
m_Registries;
45 for (
int i =
m_aIndexes.Count() - 1; i >= 0; i--)
48 if (
index >= registryIndex)
62 int index = registry.GetPrefabs().Find(prefab);
81 int GetPrefabs(out notnull array<ResourceName> outPrefabs,
bool onlyExposed =
false)
85 outPrefabs.InsertAll(registry.GetPrefabs(onlyExposed));
87 return outPrefabs.Count();
120 [
Attribute(defvalue:
"10",
category:
"Placing",
desc:
"Spacing between entities placed for multiple recipients")]
131 private int m_iEntityIndex;
133 private vector m_vFixedPosition;
134 private float m_fPreviewAnimationProgress = -1;
137 private ref set<SCR_EditableEntityComponent> m_Recipients;
204 if (prefab.IsEmpty())
224 if (!prefabData || !m_SelectedPrefab)
247 params.m_PlacingFlags = m_PlacingFlags;
252 if (
params.m_iActionInfo < 0)
262 int prefabID = prefabData.
GetPrefabID(m_SelectedPrefab);
265 Print(
string.Format(
"Cannot place prefab @\"%1\", it's not registered in placeable entities!", m_SelectedPrefab.GetPath()),
LogLevel.WARNING);
274 if (notification != -1)
305 array<ref SCR_EntityBudgetValue> budgetCosts = {};
307 if (!resource.IsValid())
309 Print(
"Cannot load prefab " + m_SelectedPrefab +
" | " +
FilePath.StripPath(__FILE__) +
":" + __LINE__,
LogLevel.WARNING);
314 m_BudgetManager.GetVehicleOccupiedBudgetCosts(source, m_PlacingFlags, budgetCosts,
false);
318 SCR_NotificationsComponent.SendLocal(
ENotification.EDITOR_PLACING_BUDGET_MAX_FOR_VEHICLE_OCCUPANTS);
324 if (
IsProxy() || simulatedDelay > 0)
325 m_WaitingPreviews.Insert(m_iEntityIndex,
m_PreviewManager.CreateWaitingPreview());
327 array<RplId> recipientIds;
335 recipientIds.Insert(
id);
346 m_StatesManager.SetIsWaiting(
true);
347 Event_OnRequestEntity.Invoke(prefabID,
params.m_vTransform, null);
352 if (simulatedDelay > 0 && !
Replication.IsRunning())
353 GetGame().GetCallqueue().CallLater(
CreateEntityServer, simulatedDelay,
false,
params, prefabID, playerID, m_iEntityIndex, !unselectPrefab, recipientIds, canBePlayer, holderId);
385 m_SelectedPrefab = prefab;
386 m_Recipients = recipients;
388 return CreateEntity(unselectPrefab, canBePlayer, holder, sourceAction);
394 array<RplId> entityIds = {};
408 PrintFormat(
"WARNING: Editor %1: Editor that belongs to player %2 was trying to spawn prefab while providing different player id (%3)!",
GetEditorModeLogInfo(),
SCR_PlayerIdentityUtils.GetPlayerLogInfo(playerID), playerMgr.GetPlayerName(playerID) +
" (playerID = " + playerID +
")", level:
LogLevel.WARNING);
424 if (prefab.IsEmpty())
435 if (!prefabResource.IsValid())
443 if (!editableEntitySource)
445 PrintFormat(
"INFO: Editor %1: Cannot create entity, prefab '%2' does not contain SCR_EditableEntityComponent! Editor owned by player with ID = %3",
GetEditorModeLogInfo(), prefab, playerID, level:
LogLevel.ERROR);
453 if (blockingBudget > -1)
476 bool hasRecipients =
false;
477 RplId currentLayerID;
478 array<SCR_EditableEntityComponent> entities = {};
479 if (recipientIds && !recipientIds.IsEmpty())
482 array<SCR_EditableEntityComponent> recipients = {};
483 foreach (
RplId id: recipientIds)
487 recipients.Insert(recipient);
489 array<vector> offsets =
GetOffsets(recipients.Count());
490 array<ref array<int>> distances = {};
492 for (
int i = 0; i < recipients.Count(); i++)
494 array<int> distToPosition = {};
497 for (
int j = 0; j < offsets.Count(); j++)
500 distToPosition.Insert(
Math.Clamp(
vector.DistanceSq(
position, offsets[j]), 0,
int.MAX));
502 distances.Insert(distToPosition);
507 array<int> permutation = {};
512 params.m_Offset = offsets[permutation[i]];
517 entities.Insert(entity);
520 hasRecipients =
true;
521 currentLayerID =
Replication.FindItemId(recipients[0].GetParentEntity());
530 entities.Insert(entity);
545 ent.SetParentEntity(holder);
553 Rpc(
CreateEntityOwner, prefabID, entityIds, entityIndex, isQueue, hasRecipients, currentLayerID, 0);
554 Event_OnPlaceEntityServer.Invoke(prefabID, entity, playerID);
566 return typename.EnumToString(
EEditorMode, modeEnt.GetModeType());
581 array<ref SCR_EntityBudgetValue> budgetCosts = {};
583 SCR_EditableEntityCoreBudgetSetting budgetSettings;
585 m_BudgetManager.GetEntitySourcePreviewBudgetCosts(entitySource, budgetCosts);
587 bool budgetFound =
false;
591 int accumulatedBudgetCost = 0;
592 int maxBudgetForType = 0;
594 bool found = tempBudgetAggregation.Find(budgetType, accumulatedBudgetCost);
598 int currentBudgetValue = 0;
601 currentBudgetValue = budgetSettings.GetCurrentBudget();
607 const int newAggregatedBudget = budget.GetBudgetValue() + accumulatedBudgetCost;
608 const int estimatedBudget = newAggregatedBudget + currentBudgetValue;
611 if(estimatedBudget > maxBudgetForType)
614 bool canPlace =
m_BudgetManager.CanPlaceEntitySource(entitySource, blockingBudget,
false,
false);
619 tempBudgetAggregation[budgetType] = newAggregatedBudget;
640 protected void CreateEntityOwner(
int prefabID, array<RplId> entityIds,
int entityIndex,
int isQueue,
bool hasRecipients,
RplId currentLayerID,
int attempt)
655 if (m_WaitingPreviews.Find(entityIndex, waitingPreview))
657 m_WaitingPreviews.Remove(entityIndex);
658 delete waitingPreview;
661 if (m_StatesManager && !m_StatesManager.SetIsWaiting(
false))
667 set<SCR_EditableEntityComponent> entities =
new set<SCR_EditableEntityComponent>();
669 for (
int i, count = entityIds.Count(); i < count; i++)
673 entities.Insert(entity);
677 if (entities.IsEmpty())
681 GetGame().GetCallqueue().CallLater(
CreateEntityOwner, 1,
false, prefabID, entityIds, entityIndex, isQueue, hasRecipients, currentLayerID, attempt + 1);
686 Print(
string.Format(
"Error when creating entity from prefab '%1' (id = %2)!", prefabData.
GetPrefab(prefabID), prefabID),
LogLevel.ERROR);
695 selectedFilter.
Replace(entities);
699 if (!currentLayerID.IsValid() || currentLayer)
717 Event_OnPlaceEntity.Invoke(prefabID, entity);
721 entities[0].GetPos(pos);
745 params.GetWorldTransform(mat);
749 outNotification =
ENotification.EDITOR_TRANSFORMING_INCORRECT_POSITION;
758 float surfaceY =
GetGame().GetWorld().GetSurfaceY(x, z);
766 outNotification =
ENotification.EDITOR_TRANSFORMING_INCORRECT_POSITION;
774 param.Start = mat[3] +
vector.Up * 0.5;
778 float distPercentage =
GetGame().GetWorld().TraceMove(param);
779 if (distPercentage == 1 && param.TraceEnt == null)
782 outNotification =
ENotification.EDITOR_TRANSFORMING_INCORRECT_POSITION;
872 if (
Replication.IsClient() || !prefabResource|| !prefabResource.IsValid())
881 if (!respawnComponent)
894 owner = slot.SpawnEntityInSlot(prefabResource,
Math3D.MatrixToAngles(
params.m_vTransform)[0], -1);
900 spawnParams.TransformMode = ETransformMode.WORLD;
902 owner =
GetGame().SpawnEntityPrefab(prefabResource,
GetGame().GetWorld(), spawnParams);
910 spawnParams.TransformMode = ETransformMode.WORLD;
911 params.GetWorldTransform(spawnParams.Transform);
912 owner =
GetGame().SpawnEntityPrefab(prefabResource,
GetGame().GetWorld(), spawnParams);
918 if (respawnComponent.RequestSpawn(spawnData))
922 if (!playerFaction || playerFaction != entityFaction)
930 SCR_PlayerControllerGroupComponent playerContGroupComp = SCR_PlayerControllerGroupComponent.GetPlayerControllerComponent(playerID);
931 playerContGroupComp.CreateAndJoinGroup(playerFaction);
936 Print(
string.Format(
"@\"%1\" control cannot be given to playerID=%2, error in RequestSpawn!", prefabResource.GetResource().GetResourceName().GetPath(), playerID),
LogLevel.ERROR);
946 SCR_EditableCommentComponent comment = SCR_EditableCommentComponent.Cast(
params.m_Target);
947 SCR_CompositionSlotManagerComponent slotManager = SCR_CompositionSlotManagerComponent.GetInstance();
948 if (comment && slotManager)
949 slotManager.SetOccupant(comment.GetOwnerScripted(), owner);
965 SCR_EditableVehicleComponent vehicle = SCR_EditableVehicleComponent.Cast(
params.m_Parent);
977 if (childEntity != entity)
978 params.m_Parent = childEntity;
1006 SCR_RefPreviewEntity.SpawnAndApplyReference(entity,
params);
1015 params.GetWorldTransform(logTransform);
1018 Print(
string.Format(
"@\"%1\" placed for %3 at %2", prefabResource.GetResource().GetResourceName().GetPath(), logTransform, recipient.GetDisplayName()),
LogLevel.VERBOSE);
1019 else if (prefabResource)
1020 Print(
string.Format(
"@\"%1\" placed at %2", prefabResource.GetResource().GetResourceName().GetPath(), logTransform),
LogLevel.VERBOSE);
1022 Print(
string.Format(
"@\"%1\" placed at %2",
"Entity", logTransform),
LogLevel.VERBOSE);
1030 if (!editableEntityFaction)
1033 PlayerController playerController =
GetGame().GetPlayerManager().GetPlayerController(playerID);
1034 if (!playerController)
1038 if (!playerFactionAff)
1076 if (uiInfo.CanFillWithCrew())
1080 if (uiInfo.CanFillWithPassengers())
1083 return vehiclePlacingFlags;
1110 bool validAction =
true;
1128 return CanPlaceEntityServer(editableEntitySource, blockingBudget, updatePreview, showBudgetMaxNotification);
1133 array<vector> result = {};
1139 result.Insert(
vector.Zero);
1143 int rowCount =
Math.Round(
Math.Sqrt(count));
1144 int columnCount =
Math.Ceil(
Math.Sqrt(count));
1148 for (
int i = 0; i < count; i++)
1150 row =
Math.Floor(i / columnCount);
1151 column = i % columnCount;
1158 int index = m_Recipients.Find(entity);
1161 m_Recipients.Remove(
index);
1164 if (m_Recipients.IsEmpty())
1186 if (prefab == m_SelectedPrefab)
return true;
1190 bool isPrefabEmpty = prefab.IsEmpty();
1200 m_StatesManager.SetSafeDialog(
true);
1201 m_SelectedPrefab = prefab;
1202 m_Recipients = recipients;
1209 if (!isPrefabEmpty && prefabData.
GetPrefabID(prefab) == -1)
1211 Print(
string.Format(
"Cannot initiate placing of prefab @\"%1\", it's not registered in placeable entities!", prefab),
LogLevel.WARNING);
1220 if (m_StatesManager && isPrefabEmpty)
1224 if (!isPrefabEmpty && recipients)
1228 else if (isPrefabEmpty && m_Recipients)
1235 m_SelectedPrefab = prefab;
1236 m_Recipients = recipients;
1239 int instanceCount = 1;
1240 if (recipients) instanceCount = recipients.Count();
1245 if (m_StatesManager && !m_StatesManager.SetState(
EEditorState.PLACING))
1259 if (teleportComponent) teleportComponent.TeleportCamera(previewEntity.
GetOrigin(),
true,
true);
1279 Event_OnSelectedPrefabChange.Invoke(prefab, prefabPrev);
1281 if (prefab && !prefabPrev)
1283 else if (!prefab && prefabPrev && !onConfirm)
1294 return m_SelectedPrefab;
1298 return !m_SelectedPrefab.IsEmpty();
1326 Print(
string.Format(
"Cannot enable placing flag %1, placing manager does not allow it!",
typename.EnumToString(
EEditorPlacingFlags, flag)),
LogLevel.WARNING);
1333 m_PlacingFlags |= flag;
1335 m_PlacingFlags &= ~flag;
1338 if (m_PlacingFlags != prevPlacingFlag)
1339 Event_OnPlacingFlagsChange.Invoke(flag, toAdd);
1354 if (m_SelectedPrefab.IsEmpty())
1362 if (!resource.IsValid())
1364 Print(
"Cannot load " + selectedPrefab +
" | " +
FilePath.StripPath(__FILE__) +
":" + __LINE__,
LogLevel.WARNING);
1373 array<ref SCR_EntityBudgetValue> budgetCosts = {};
1375 if ( !resource.IsValid())
1377 Print(
"Cannot load " + selectedPrefab +
" | " +
FilePath.StripPath(__FILE__) +
":" + __LINE__,
LogLevel.WARNING);
1382 m_BudgetManager.GetVehicleOccupiedBudgetCosts(source, currentPlacingFlag, budgetCosts);
1402 return SCR_Enum.HasFlag(m_PlacingFlags, flag);
1411 return SCR_Enum.HasFlag(m_CompatiblePlacingFlags, flag);
1429 return Event_OnSelectedPrefabChange;
1438 return Event_OnPlacingFlagsChange;
1447 return Event_OnRequestEntity;
1456 return Event_OnPlaceEntity;
1461 return Event_OnPlaceEntityServer;
1467 if (m_SelectedPrefab)
1469 debugTexts.Insert(
string.Format(
"Placing prefab: %1",
FilePath.StripPath(m_SelectedPrefab.GetPath())));
1473 debugTexts.Insert(
"Placing prefab: N/A");
1480 super.EOnEditorInitServer();
1500 super.EOnEditorDeleteServer();
1547 array<RplId> recipientIds = {};
1552 recipientIds.Insert(
id);
1560 group.EnableCycledWaypoints(value);
1569 foreach (
RplId group : selectedGroups)
ArmaReforgerScripted GetGame()
RplMode
Mode of replication.
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_EditableGroupComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_FactionManager(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
proto external bool IsActive()
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 vector GetOrigin()
proto external void GetWorldTransform(out vector mat[])
See IEntity::GetTransform.
Object holding reference to resource. In destructor release the resource.
Replication item identifier.
ScriptInvokerBase< ScriptInvokerAIGroup > GetOnAllDelayedEntitySpawned()
ResourceName GetCommandPrefab()
bool Replace(SCR_EditableEntityComponent entityInsert, bool onlyDirect=false, bool keepExisting=false)
static SCR_BaseEditableEntityFilter GetInstance(EEditableEntityState state, bool showError=false)
void SCR_BaseEditorComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
SCR_EditorManagerEntity m_Manager
static Managed GetInstance(typename type, bool showError=false, bool modeFirst=false)
EntityComponentPrefabData GetEditorComponentData()
void SendNotification(ENotification notificationID, int selfID=0, int targetID=0, vector position=vector.Zero)
SCR_BaseEditorComponent FindEditorComponent(typename type, bool showError=false, bool modeFirst=false)
SCR_EditorManagerEntity GetManager()
SCR_EditorBaseEntity m_Owner
static SCR_ManualCamera GetCameraInstance()
bool IsPrefabIDAvailable(int prefabID)
ResourceName GetResourceNamePrefabID(int prefabID)
static ResourceName GetRandomVariant(ResourceName prefab)
EEditableEntityType GetEntityType()
static IEntityComponentSource GetEditableEntitySource(Resource entityResource)
bool HasEntityFlag(EEditableEntityFlag flag)
SCR_EditableEntityComponent EOnEditorPlace(out SCR_EditableEntityComponent parent, SCR_EditableEntityComponent recipient, EEditorPlacingFlags flags, bool isQueue, int playerID=0)
void ForceVehicleCompartments(notnull array< ECompartmentType > forceVehicleCompartments)
static SCR_EditableEntityComponent GetEditableEntity(IEntity owner)
void SetAuthor(int playerID)
SCR_EditableEntityComponent SetParentEntity(SCR_EditableEntityComponent parentEntity, bool changedByUser=false)
void OnCreatedServer(notnull SCR_PlacingEditorComponent placedEditorComponent)
SCR_EditableEntityComponent GetParentEntity()
Network packet of variables for entity placing and transformation.
static SCR_EditorPreviewParams CreateParamsFromPreview(SCR_PreviewEntityEditorComponent previewManager, SCR_EditableEntityComponent parent=null, bool parentChanged=false)
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 int PackActionInfo(notnull SCR_BaseEditorAction action, notnull IEntity actionCompOwner)
static void SetFaction(IEntity owner, Faction faction)
static bool IsPositionWithinTerrainBounds(vector pos)
SCR_EditableEntityComponent GetCurrentLayer()
void SetCurrentLayer(SCR_EditableEntityComponent entity)
SCR_BaseManualCameraComponent FindCameraComponent(typename type)
ResourceName GetTestPrefab()
ref array< ref SCR_BaseEditorEffect > m_EffectsPlaceConfirm
ResourceName GetPrefab(int index)
ref array< ref SCR_BaseEditorEffect > m_EffectsPlaceCancel
int GetPrefabID(ResourceName prefab)
array< ref SCR_BaseEditorEffect > GetEffectsPlaceConfirm()
ref array< ref SCR_BaseEditorEffect > m_EffectsPlaceStart
int GetPrefabs(out notnull array< ResourceName > outPrefabs, bool onlyExposed=false)
array< ref SCR_BaseEditorEffect > GetEffectsPlaceCancel()
ref array< int > m_aIndexes
ref array< ref SCR_PlaceableEntitiesRegistry > m_Registries
void SCR_PlacingEditorComponentClass(IEntityComponentSource componentSource, IEntitySource parentSource, IEntitySource prefabSource)
EEditorPlacingFlags m_AllowedPlacingFlags
array< ref SCR_BaseEditorEffect > GetEffectsPlaceStart()
bool HasPlacingFlag(EEditorPlacingFlags flag)
ResourceName m_TestPrefab
bool IsPlacingFlagAllowed(EEditorPlacingFlags flag)
static ref SCR_EditorPreviewParams m_DelayedSpawnPreviewParams
static SCR_EditableEntityComponent SpawnEntityResource(SCR_EditorPreviewParams params, Resource prefabResource, int playerID=0, bool isQueue=false, SCR_EditableEntityComponent recipient=null, bool canBePlayer=false)
array< vector > GetOffsets(int count)
override void EOnEditorDeactivate()
static SCR_EditableEntityComponent SpawnEntityResource(ResourceName prefab, vector transform[4])
override void EOnEditorDebug(array< string > debugTexts)
bool HasPlacingFlag(EEditorPlacingFlags flag)
static EEditorPlacingFlags GetCompatiblePlacingFlags(Resource prefabResource)
SCR_PreviewEntityEditorComponent m_PreviewManager
bool CreateEntity(ResourceName prefab, SCR_EditorPreviewParams param, bool unselectPrefab=true, bool canBePlayer=false, set< SCR_EditableEntityComponent > recipients=null, SCR_EditableEntityComponent holder=null, SCR_BaseEditorAction sourceAction=null)
bool IsActionValid(int prefabID, notnull SCR_EditorPreviewParams params)
bool IsThereEnoughBudgetToSpawnVehicleOccupants(array< ResourceName > resources)
void SetPlacingFlag(EEditorPlacingFlags flag, bool toAdd)
bool SetSelectedPrefab(ResourceName prefab="", bool onConfirm=false, bool showBudgetMaxNotification=true, set< SCR_EditableEntityComponent > recipients=null, SCR_BaseEditorAction sourceAction=null)
void SetCycleWaypoints(notnull set< SCR_EditableGroupComponent > selectedGroups, bool value)
void EOnEditorInitServer()
ScriptInvoker GetOnSelectedPrefabChange()
bool IsThereEnoughBudgetToSpawn(IEntityComponentSource entitySource)
bool CreateEntity(bool unselectPrefab=true, bool canBePlayer=false, SCR_EditableEntityComponent holder=null, SCR_BaseEditorAction sourceAction=null)
static SCR_EditableEntityComponent m_DelayedSpawnEntity
static void ClearAccumulatedBudgetChanges()
int GetPrefabID(ResourceName prefab)
void SetPlacingBlocked(bool blocked)
bool IsPlacingFlagCompatible(EEditorPlacingFlags flag)
ref SCR_EditorPreviewParams m_InstantPlacingParam
void CreateEntityServer(SCR_EditorPreviewParams params, RplId prefabID, int playerID, int entityIndex, bool isQueue, array< RplId > recipientIds, bool canBePlayer, RplId holderId)
ScriptInvoker GetOnPlacingFlagsChange()
string GetEditorModeLogInfo()
SCR_EditableEntityCore m_editableEntityCore
ScriptInvoker GetOnPlaceEntityServer()
static void UpdatePlayerFactionFromEditableEntity(Faction editableEntityFaction, int playerID)
helper function to avoid nesting
void SetInstantPlacing(SCR_EditorPreviewParams param)
void SetSlot(SCR_SiteSlotEntity slot)
void OnBudgetMaxReached(EEditableEntityBudget entityBudget, bool maxReached)
bool CanSelectEntityPrefab(ResourceName prefab, out EEditableEntityBudget blockingBudget, bool updatePreview=true, bool showBudgetMaxNotification=true)
void OnEntityUnregistered(SCR_EditableEntityComponent entity)
bool CanCreateEntity(out ENotification outNotification=-1, inout SCR_EPreviewState previewStateToShow=SCR_EPreviewState.PLACEABLE, SCR_EditorPreviewParams params=null, int prefabID=-1)
const float MAX_HEIGHT_ABOVE_TERRAIN
the height above the terrain [m], that is a margin of error when player is trying to spawn something ...
void SetCycleWaypointsServer(array< RplId > selectedGroups, bool value)
void EOnEditorDeleteServer()
SCR_SiteSlotEntity GetSlot()
static bool m_accumulatedBudgetChangesClearQueued
void TogglePlacingFlag(EEditorPlacingFlags flag)
ScriptInvoker GetOnRequestEntity()
override void EOnEditorActivate()
SCR_BudgetEditorComponent m_BudgetManager
ScriptInvoker GetOnPlaceEntity()
bool CanPlaceEntityServer(IEntityComponentSource editableEntitySource, out EEditableEntityBudget blockingBudget, bool updatePreview, bool showNotification, int prefabID=-1, int playerID=-1, SCR_EditorPreviewParams params=null)
void CreateEntityOwner(int prefabID, array< RplId > entityIds, int entityIndex, int isQueue, bool hasRecipients, RplId currentLayerID, int attempt)
void OnEntityCreatedServer(array< SCR_EditableEntityComponent > entities)
static void OnAIGroupAllEntitiesSpawned(SCR_AIGroup group)
Callback reacting to all delayed spawned entities being created.
void OnBeforeEntityCreatedServer(ResourceName prefab)
static SCR_PlacingEditorComponent serverPlacingEditorComponent
ref map< EEditableEntityBudget, int > m_accumulatedBudgetChanges
void UpdatePlacingFlagBudget(ResourceName selectedPrefab, EEditorPlacingFlags flagChanged, EEditorPlacingFlags currentPlacingFlag, EEditorPlacingFlags prevPlacingFlag)
ResourceName GetSelectedPrefab()
bool SetFaction_S(Faction faction)
static SCR_PossessSpawnData FromEntity(notnull IEntity entity)
override void SetSkipPreload(bool skip)
Teleport the camera to the cursor's world position.
proto external GenericEntity GetOwner()
Get owner entity.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
EEditableEntityFlag
Unique flags of the entity.
SCR_FieldOfViewSettings Attribute
EEditorMode
Editor mode that defines overall functionality.
EEditorTransformVertical
Vertical transformation mode.
EEditorState
Unique editor state.
EEditableEntityInteraction
Type of suggested interaction when hovering edited entity on top of another entity.
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
proto native vector Vector(float x, float y, float z)