simple implementation of an unlimited inventory that simply stores everything in a list
https://adventure.softleitner.com/manual/item
|
override void | Initialize (CharacterBase character) |
| initializes the inventory including retrieving persisted data
|
|
override bool | HasItem (ItemBase item) |
|
override IEnumerable< InventoryItem > | GetItems (ItemBase item) |
|
override IEnumerable< InventoryItem > | GetItems (ItemCategory itemCategory=null, ItemSlotCategory itemSlotCategory=null) |
|
override int | GetQuantity (ItemBase item) |
|
override int | GetQuantity (ItemCategory itemCategory=null, ItemSlotCategory itemSlotCategory=null) |
|
override bool | CanAddItems (ItemQuantity itemQuantity, bool fully=true) |
|
override int | AddItems (ItemQuantity itemQuantity) |
|
override bool | CanRemoveItems (ItemQuantity itemQuantity, bool fully=true) |
|
override int | RemoveItems (ItemQuantity itemQuantity) |
|
override bool | CanRemoveItems (InventoryItem inventoryItem, int quantity=1, bool fully=true) |
|
override int | RemoveItems (InventoryItem inventoryItem, int quantity=1) |
|
override bool | CanUseItems (InventoryItem inventoryItem, int quantity=1) |
|
override void | UseItems (InventoryItem inventoryItem, int quantity=1) |
|
override bool | CanEquipItems (InventoryItem inventoryItem, int index=0) |
|
override ItemSlotBase | EquipItems (InventoryItem inventoryItem, int index=0) |
|
override bool | CanUnequipItems (InventoryItem inventoryItem) |
|
override ItemSlotBase | UnequipItems (InventoryItem inventoryItem) |
|
override ItemSlotBase | GetSlot (ItemSlotCategory category, int index=0) |
|
override ItemSlotBase | GetSlot (ItemBase item, int index=0) |
|
override T | GetSlot< T > (int index=0) |
|
int | GetCapacity (ItemBase item) |
|
int | GetRemainingCapacity (ItemBase item) |
|
ListedInventoryData | GetData () |
|
void | Persist () |
|
bool | HasItem (ItemBase item) |
| checks whether the item exists in the inventory, regardless of quantity(may be 0 for stacked items to indicate they have been added at some point)
|
|
virtual bool | HasItemQuantity (ItemBase item, int quantity=1) |
| checks if the inventory has at least the passed quantity of an item
|
|
IEnumerable< InventoryItem > | GetItems (ItemBase item) |
| retrieves all inventory items for a specified item
multiple entries may be resturned for items that dont stack-
or when the inventory has a maximum stack size
|
|
IEnumerable< InventoryItem > | GetItems (ItemCategory itemCategory=null, ItemSlotCategory itemSlotCategory=null) |
| retrieves all inventory items for a specific category or slot
|
|
int | GetQuantity (ItemBase item) |
| calculates the total stored quantity of an item
|
|
int | GetQuantity (ItemCategory itemCategory=null, ItemSlotCategory itemSlotCategory=null) |
| calculates the total stored quantity of items filtered by an item category and/or slot
|
|
bool | CanAddItems (ItemQuantity itemQuantity, bool fully=true) |
| whether an item quantity can be added to the inventory
may be false when the quantity exceeds the capacity
|
|
int | AddItems (ItemQuantity itemQuantity) |
| adds a quantity of an item to the inventory
returns the inventory item that was added to or created
|
|
bool | CanRemoveItems (ItemQuantity itemQuantity, bool fully=true) |
| whether a quantity of items is present and can be removed
|
|
int | RemoveItems (ItemQuantity itemQuantity) |
| removes a quantity of items
|
|
bool | CanRemoveItems (InventoryItem inventoryItem, int quantity=1, bool fully=true) |
| whether a quantity of items is present and can be removed from an inventory item
|
|
int | RemoveItems (InventoryItem inventoryItem, int quantity=1) |
| removes specified quantity from the inventory item
|
|
bool | CanUseItems (InventoryItem inventoryItem, int quantity=1) |
| check if a quantity of an inventory item can be used
|
|
void | UseItems (InventoryItem inventoryItem, int quantity=1) |
| uses a quantity of an inventory item can be used
|
|
bool | CanEquipItems (InventoryItem inventoryItem, int index=0) |
| checks if an inventory item can be equipped
|
|
ItemSlotBase | EquipItems (InventoryItem inventoryItem, int index=0) |
| equipps an inventory item to a slot
|
|
bool | CanUnequipItems (InventoryItem inventoryItem) |
| checks if an inventory item can be unequipped
|
|
ItemSlotBase | UnequipItems (InventoryItem inventoryItem) |
| unequips an inventory item
|
|
ItemSlotBase | GetSlot (ItemSlotCategory category, int index=0) |
| retrieves an item slot by its category
|
|
ItemSlotBase | GetSlot (ItemBase item, int index=0) |
| retrieves an item slot for the passed item
|
|
T | GetSlot< T > (int index=0) |
| retrieves an item slot by its type
|
|