139 {
141
142 if ( player && target_entity )
143 {
145 target_entity.GetActionComponentNameList( target.GetComponentIndex(),selections );
146
147 if ( target_entity && target_entity.GetInventory() && target_entity.GetInventory().AttachmentCount() > 0 )
148 {
149 for(int i = 0; i < selections.Count(); i++ )
150 {
152 {
154 EntityAI att = target_entity.GetInventory().FindAttachment(target_slot_id);
155
156 if ( att && player.GetInventory().CanAddEntityIntoHands(att) )
157 {
158 if ( att.CanDetachAttachment( target_entity ) && target_entity.CanReleaseAttachment( att ) )
159 return target_slot_id;
160 }
161 }
162 }
163 }
164 }
166 }
ActionDetachFromTarget m_slotToDetach
const int INVALID
Invalid slot (-1)
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
Result for an object found in CGame.IsBoxCollidingGeometryProxy.