1918 {
1920 float split_quantity_new =
Math.
Floor(quantity * 0.5);
1921
1923 return;
1924
1929
1930 if (new_item)
1931 {
1932 if (new_item.GetQuantityMax() < split_quantity_new)
1933 {
1934 split_quantity_new = new_item.GetQuantityMax();
1935 }
1936
1937 new_item.SetResultOfSplit(true);
1938 MiscGameplayFunctions.TransferItemProperties(this, new_item);
1939
1941 {
1944 }
1945 else
1946 {
1948 new_item.
SetQuantity(split_quantity_new,
false,
true);
1949 }
1950 }
1951 }
eBleedingSourceType GetType()
const int ECE_PLACE_ON_SURFACE
const int ECE_IN_INVENTORY
InventoryLocationType
types of Inventory Location
override float GetQuantity()
bool ShouldSplitQuantity(float quantity)
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)
static proto float Floor(float f)
Returns floor of value.