14 if (targetEntity.HasEnergyManager())
16 string selection = targetEntity.GetActionComponentName(target.GetComponentIndex());
20 return targetEntity.GetCompEM().GetPlugOwner(selection) !=
null;
22 return targetEntity.GetCompEM().IsSelectionAPlug(selection);
28 override void OnExecuteServer(
ActionData action_data)
30 Object targetObject = action_data.m_Target.GetObject();
34 string selection = targetObject.GetActionComponentName(action_data.m_Target.GetComponentIndex());
36 EntityAI device =
EntityAI.Cast(targetEntity.GetCompEM().GetPlugOwner(selection));
38 device.GetCompEM().UnplugThis();
41 if (action_data.m_Player.IsPlacingServer())
42 action_data.m_Player.PlacingCancelServer();