1695 {
1697 return;
1698
1699 float split_quantity_new;
1703 InventoryLocation loc = new InventoryLocation;
1704
1705 if (destination_entity && slot_id != -1 && InventorySlots.IsSlotIdValid(slot_id))
1706 {
1708 split_quantity_new = stack_max;
1709 else
1711
1712 new_item =
ItemBase.Cast(destination_entity.GetInventory().CreateAttachmentEx(
this.GetType(), slot_id));
1713 if (new_item)
1714 {
1715 new_item.SetResultOfSplit(true);
1716 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1718 new_item.SetQuantity(split_quantity_new);
1719 }
1720 }
1721 else if (destination_entity && slot_id == -1)
1722 {
1723 if (quantity > stack_max)
1724 split_quantity_new = stack_max;
1725 else
1726 split_quantity_new = quantity;
1727
1729 {
1732 }
1733
1734 if (new_item)
1735 {
1736 new_item.SetResultOfSplit(true);
1737 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1739 new_item.SetQuantity(split_quantity_new);
1740 }
1741 }
1742 else
1743 {
1744 if (stack_max != 0)
1745 {
1747 {
1749 }
1750
1752
1753 if (new_item)
1754 {
1755 new_item.SetResultOfSplit(true);
1756 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1758 new_item.SetQuantity(stack_max);
1759 new_item.PlaceOnSurface();
1760 }
1761 }
1762 }
1763 }
eBleedingSourceType GetType()
const int ECE_PLACE_ON_SURFACE
const int ECE_IN_INVENTORY
FindInventoryLocationType
flags for searching locations in inventory
override float GetQuantity()
bool AddQuantity(float value, bool destroy_config=true, bool destroy_forced=false)
add item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity re...
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Set item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity re...
override int GetTargetQuantityMax(int attSlotID=-1)
override bool CanBeSplit()
proto native CGame GetGame()