16 if (!super.ActionCondition(player, target, item))
20 if (!targetEntity || targetEntity && !targetEntity.GetInventory())
33 if (!codeLock.GetHierarchyRoot())
36 if (codeLock.
IsLocked() || codeLock.IsLockedInSlot())
41 codeLock.GetActionComponentNameList(target.GetComponentIndex(), selections);
43 bool isFactingBackSide;
44 foreach (
string selectionName : selections)
48 isFactingBackSide =
true;
53 if (!isFactingBackSide)
57 if (player.GetInventory().CanAddEntityIntoHands(attachment))
59 if (attachment.CanDetachAttachment(targetEntity) && targetEntity.CanReleaseAttachment(attachment))
61 m_Text =
"#detach_battery " + attachment.GetDisplayName();