30 {
32 EntityAI item_entity = action_data.m_MainItem;
33
34
35 InventoryLocation target_location = new InventoryLocation;
36 if ( target_entity.GetInventory().FindFirstFreeLocationForNewEntity( item_entity.GetType(),
FindInventoryLocationType.ATTACHMENT, target_location ) )
37 {
38 action_data.m_Player.PredictiveTakeEntityToTargetAttachmentEx( target_entity, item_entity, target_location.
GetSlot() );
39 }
40 }
FindInventoryLocationType
flags for searching locations in inventory
proto native int GetSlot()
returns slot id if current type is Attachment