1802 {
1804 float split_quantity_new;
1806 if (dst.IsValid())
1807 {
1808 int slot_id = dst.GetSlot();
1810
1811 if (quantity > stack_max)
1812 split_quantity_new = stack_max;
1813 else
1814 split_quantity_new = quantity;
1815
1817 {
1822
1823 if (new_item)
1824 {
1825 new_item.SetResultOfSplit(true);
1826 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1828 new_item.
SetQuantity(split_quantity_new,
false,
true);
1829 }
1830
1831 return new_item;
1832 }
1833 }
1834
1835 return null;
1836 }
const int ECE_PLACE_ON_SURFACE
const int ECE_IN_INVENTORY
InventoryLocationType
types of Inventory Location
override float GetQuantity()
bool ShouldSplitQuantity(float quantity)
override int GetTargetQuantityMax(int attSlotID=-1)
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...
static proto native EntityAI LocationCreateEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new item directly at location
script counterpart to engine's class Inventory
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)