7 override bool CanBeShown(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
9 if (hoveredEntity && (!selectedEntities.Contains(hoveredEntity) || SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(hoveredEntity.GetOwner()) > 0))
14 if (entity.GetEntityType() ==
EEditableEntityType.CHARACTER && SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(entity.GetOwner()) <= 0)
22 override bool CanBePerformed(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
30 if (entity.GetEntityType() ==
EEditableEntityType.CHARACTER && SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(entity.GetOwner()) <= 0)
36 if (parentGroup ==
null)
37 parentGroup = newParentGroup;
38 else if (parentGroup != newParentGroup)
43 return (parentGroup && parentGroup.GetChildrenCount() != entityCount);
47 override void Perform(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags,
int param = -1)
50 SCR_EditableCharacterComponent newLeader;
54 if (entity.GetEntityType() !=
EEditableEntityType.CHARACTER || SCR_PossessingManagerComponent.GetPlayerIdFromMainEntity(entity.GetOwner()) > 0)
59 newLeader = SCR_EditableCharacterComponent.Cast(entity);
62 group = newLeader.CreateGroupForCharacter();
67 entity.SetParentEntity(group);