Interface IInventoryChangeSet
Assembly: Eco.Gameplay.dll
Syntax
public interface IInventoryChangeSet
Methods
AddItem(Item, Int32, Inventory)
Declaration
void AddItem(Item item, int count = 1, Inventory inventory = null)
Parameters
Type |
Name |
Description |
Item |
item |
|
System.Int32 |
count |
|
Inventory |
inventory |
|
AddItemNonUnique(Type, Inventory)
Declaration
void AddItemNonUnique(Type itemType, Inventory inventory = null)
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
Inventory |
inventory |
|
AddItemNonUnique<T>(Inventory)
Declaration
void AddItemNonUnique<T>(Inventory inventory = null)
Parameters
Type Parameters
AddItemsNonUnique(Type, Int32, Inventory)
Declaration
void AddItemsNonUnique(Type itemType, int quantity, Inventory inventory = null)
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
System.Int32 |
quantity |
|
Inventory |
inventory |
|
AddItemsNonUnique<T>(Int32, Inventory)
Declaration
void AddItemsNonUnique<T>(int quantity, Inventory inventory = null)
Parameters
Type |
Name |
Description |
System.Int32 |
quantity |
|
Inventory |
inventory |
|
Type Parameters
Clear(Inventory)
Declaration
void Clear(Inventory inventory = null)
Parameters
ClearStack(ItemStack)
Declaration
void ClearStack(ItemStack stack)
Parameters
MergeStack(ItemStack, Int32, Item, Boolean)
Declaration
void MergeStack(ItemStack stack, int delta, Item newItem, bool splittingStack)
Parameters
Type |
Name |
Description |
ItemStack |
stack |
|
System.Int32 |
delta |
|
Item |
newItem |
|
System.Boolean |
splittingStack |
|
ModifyStack(ItemStack, Int32)
Declaration
void ModifyStack(ItemStack stack, int delta)
Parameters
Type |
Name |
Description |
ItemStack |
stack |
|
System.Int32 |
delta |
|
MoveAllItems(Item, Int32, Inventory, Inventory, Boolean, Func<ItemStack, Boolean>)
Declaration
ValResult<int> MoveAllItems(Item sourceItem, int quantity, Inventory source, Inventory destination, bool allowPartial, Func<ItemStack, bool> sourceStackPredicate = null)
Parameters
Type |
Name |
Description |
Item |
sourceItem |
|
System.Int32 |
quantity |
|
Inventory |
source |
|
Inventory |
destination |
|
System.Boolean |
allowPartial |
|
System.Func<ItemStack, System.Boolean> |
sourceStackPredicate |
|
Returns
MoveItemsNonUnique(Type, Int32, Inventory, Inventory)
Declaration
void MoveItemsNonUnique(Type itemType, int quantity, Inventory source, Inventory destination)
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
System.Int32 |
quantity |
|
Inventory |
source |
|
Inventory |
destination |
|
MoveItemsNonUnique<TKey>(Type, Int32, Inventory, Inventory, Func<ItemStack, Boolean>, Func<ItemStack, TKey>)
Declaration
void MoveItemsNonUnique<TKey>(Type itemType, int quantity, Inventory source, Inventory destination, Func<ItemStack, bool> sourceStackPredicate = null, Func<ItemStack, TKey> sourceStackOrder = null)
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
System.Int32 |
quantity |
|
Inventory |
source |
|
Inventory |
destination |
|
System.Func<ItemStack, System.Boolean> |
sourceStackPredicate |
|
System.Func<ItemStack, TKey> |
sourceStackOrder |
|
Type Parameters
MoveStacks(ItemStack, ItemStack)
Move the source stack items to the destination, combining/swapping depending on the items.
Declaration
virtual void MoveStacks(ItemStack source, ItemStack destination)
Parameters
MoveStacks(ItemStack, ItemStack, Int32)
Declaration
void MoveStacks(ItemStack source, ItemStack destination, int requestedQuantity)
Parameters
Type |
Name |
Description |
ItemStack |
source |
|
ItemStack |
destination |
|
System.Int32 |
requestedQuantity |
|
RemoveItemByType(Type, Inventory)
Declaration
void RemoveItemByType(Type itemType, Inventory inventory = null)
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
Inventory |
inventory |
|
RemoveItemByType<T>(Inventory)
Declaration
void RemoveItemByType<T>(Inventory inventory = null)
Parameters
Type Parameters
RemoveItemsByType(Type, Int32, Inventory)
Declaration
void RemoveItemsByType(Type itemType, int quantity, Inventory inventory = null)
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
System.Int32 |
quantity |
|
Inventory |
inventory |
|
RemoveItemsByType<T>(Int32, Inventory)
Declaration
void RemoveItemsByType<T>(int quantity, Inventory inventory = null)
Parameters
Type |
Name |
Description |
System.Int32 |
quantity |
|
Inventory |
inventory |
|
Type Parameters
Extension Methods