7 if( !item.GetInventory().CanRemoveEntity() || !player.CanManipulateInventory() )
13 if( item_base.GetTargetQuantityMax(il.
GetSlot()) >= item_base.GetQuantity() )
17 player.PredictiveTakeEntityToTargetAttachmentEx(il.
GetParent(), item, il.
GetSlot());
22 if (item.GetInventory().GetCurrentInventoryLocation(src))
23 player.PredictiveTakeToDst(src, il);
37 int slot = dst.GetSlot();
39 if( !dst.GetItem().GetInventory().CanRemoveEntity() || !player.CanManipulateInventory() )
42 float stack_max = item_base.GetTargetQuantityMax(slot);
44 if( stack_max >= item_base.GetQuantity() )
47 if (dst.GetItem().GetInventory().GetCurrentInventoryLocation(src))
49 player.PredictiveTakeToDst(src, dst);
52 Error(
"TakeIntoCargoEx cannot get src for dst=" + dst.DumpToString());
56 item_base.SplitIntoStackMaxToInventoryLocationClient( dst );
FindInventoryLocationType
flags for searching locations in inventory
InventoryLocationType
types of Inventory Location
proto native EntityAI GetParent()
returns parent of current inventory location
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetType()
returns type of InventoryLocation
static void TakeOrSplitToInventoryLocation(notnull PlayerBase player, notnull InventoryLocation dst)
static void TakeOrSplitToInventory(notnull PlayerBase player, notnull EntityAI target, notnull EntityAI item)
void Error(string err)
Messagebox with error message.