21 if (targetItem && targetItem.HasEnergyManager())
23 string selection = targetItem.GetActionComponentName(target.GetComponentIndex());
25 if (targetItem.GetCompEM() && targetItem.GetCompEM().GetPlugOwner(selection))
26 return targetItem.GetCompEM().GetPlugOwner(selection).GetDisplayName();
29 return super.GetTargetName(player, target);
36 if (targetItem && targetItem.HasEnergyManager())
38 string selection = targetItem.GetActionComponentName(target.GetComponentIndex());
44 if (selection == Spotlight.SEL_CORD_PLUGGED_U)
54 targetItem.GetCompEM().UnplugThis();
56 if (targetItem.IsInherited(Spotlight))
58 targetItem.HideSelection(Spotlight.SEL_CORD_PLUGGED_U);
59 targetItem.ShowSelection(Spotlight.SEL_CORD_FOLDED_U);
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
void ActionInteractBase()
override void OnExecuteServer(ActionData action_data)
override string GetTargetName(PlayerBase player, ActionTarget target)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool DisplayTargetInActionText()
void ActionUnplugThisByCord()
override bool HasProgress()
static const string SEL_CORD_PLUGGED