ItemVault

InventoryService

InventoryService

Simple in-memory implementation of IInventoryService using the existing ItemVault.Core.Inventory type. This is engine-agnostic and can be shared across games and tools.

Project: ItemVault v1.0.0
Layer: Core
Source: Core/InventoryService.cs
Namespace: ItemVault.Core
Kind: class

Parsing Method: AST-based (Roslyn) - NOT regex

⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.

Methods

GetOrCreateInventory

Returns: IInventory

Parameters:

  • OwnerId ownerId
  • int capacity

HasItem

Returns: bool

Parameters:

  • OwnerId ownerId
  • string itemId
  • int quantity

GetItemCount

Returns: int

Parameters:

  • OwnerId ownerId
  • string itemId

TryGiveItem

Returns: bool

Parameters:

  • OwnerId ownerId
  • string itemId
  • int quantity

TryConsumeItem

Returns: bool

Parameters:

  • OwnerId ownerId
  • string itemId
  • int quantity