1907 {
1909 float split_quantity_new;
1911 if (destination_entity)
1912 {
1914 if (quantity > stackable)
1915 split_quantity_new = stackable;
1916 else
1917 split_quantity_new = quantity;
1918
1920 {
1921 new_item =
ItemBase.Cast(destination_entity.GetInventory().CreateEntityInCargoEx(
this.GetType(), idx, row, col,
false));
1922 if (new_item)
1923 {
1924 new_item.SetResultOfSplit(true);
1925 MiscGameplayFunctions.TransferItemProperties(this,new_item);
1927 new_item.
SetQuantity(split_quantity_new,
false,
true);
1928 }
1929 }
1930 }
1931 }
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 int GetTargetQuantityMax(int attSlotID=-1)
bool ShouldSplitQuantity(float quantity)
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)