534 {
535 if( GetInventory().CanAddAttachment( item ) )
536 {
538 }
539 else
540 {
541 GameInventory inventory = GetInventory();
542 GameInventory itemInventory = item.GetInventory();
544 {
545 int slot_id = itemInventory.
GetSlotId(i);
548 {
550 }
551 }
552 }
553 return false;
554 }
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
proto native int GetSlotId(int index)
attachments
proto native int GetSlotIdCount()
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)