IInventoryService
Inventory Service
Interface
Service to handle inventory and currency
Properties
items | A dictionary of all items in the user's inventory, keyed by item ID. |
worldCurrencyBalance | The user's world currency balance if this space or the world that this space belongs to has a currency. |
Methods
AddItem(string, ulong, bool) | Add an item to the user's inventory. |
AwardWorldCurrency(ulong) | Award world currency to the user. |
DeleteItem(string) | Delete an item from the user's inventory. This will only work if the item is in the same world as the space. |
SetItemTypeEnabled(ItemType, bool, string) | Set the enabled state for items by their type. This overrides individual item enabled states. |
Events
onItemConsumed | Triggered when user consumes an item. This is only relevant for consumable items. |
onItemOwnedChanged | Triggered when user acquires an item. |
onItemUsed | Triggered when the user uses an item. |
onWorldCurrencyBalanceChanged | Triggered when the user's world currency balance changes. |