4 override bool CanBeShown(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
6 if (!hoveredEntity || !SCR_PossessingManagerComponent.GetInstance())
13 BaseCompartmentManagerComponent compartmentManager = BaseCompartmentManagerComponent.Cast(owner.FindComponent(BaseCompartmentManagerComponent));
15 if (!compartmentManager)
18 if (!aiEntity || aiEntity.IsDestroyed())
22 return SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(aiEntity.GetOwner()) <= 0;
30 override bool CanBePerformed(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
32 if (!hoveredEntity || !SCR_PossessingManagerComponent.GetInstance())
39 SCR_BaseCompartmentManagerComponent compartmentManager = SCR_BaseCompartmentManagerComponent.Cast(owner.FindComponent(SCR_BaseCompartmentManagerComponent));
41 if (!compartmentManager)
43 return CanBeShown(hoveredEntity, selectedEntities, cursorWorldPosition, flags);
47 array<IEntity> pilots =
new array<IEntity>;
50 if (pilots.IsEmpty() || !pilots[0])
54 if (!pilotEditableEntity)
58 if (!aiEntity || aiEntity.IsDestroyed())
62 return SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(aiEntity.GetOwner()) <= 0;
66 override void Perform(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags,
int param = -1)
68 if (!hoveredEntity || !SCR_PossessingManagerComponent.GetInstance())
76 SCR_BaseCompartmentManagerComponent compartmentManager = SCR_BaseCompartmentManagerComponent.Cast(owner.FindComponent(SCR_BaseCompartmentManagerComponent));
78 if (!compartmentManager)
80 entityToControl = hoveredEntity;
84 array<IEntity> pilots =
new array<IEntity>;
87 if (pilots.IsEmpty() || !pilots[0])
97 if (!aiEntity || aiEntity.IsDestroyed())
102 if (!playerController)
105 playerController.SetPossessedEntity(aiEntity.GetOwner());
116 override int GetParam()
118 return GetGame().GetPlayerController().GetPlayerId();
120 override bool IsServer()