Skip to content

⚠️ Economy — Internal — Adapters — Inventory

🎯 Purpose

This folder contains the internal Inventory-backed implementations used by Economy to provide an IItemStore over an IInventoryService container.

Namespace: RevGaming.RevFramework.Economy.Internal.Adapters.Inventory Folder: Runtime/Systems/Economy/Internal/Adapters/Inventory/

Public-facing behaviour documentation lives in:

  • Runtime/Systems/Economy/Adapters/Inventory/index.md

🚫 Not for Production Use

Types in this folder are internal implementation details.

They should not be referenced from gameplay code or relied upon as stable APIs.


🧩 What Lives Here

Inventory-backed IItemStore

The built-in item store adapter:

  • Performs preflight checks (HasSpaceFor, CanRemove) for UX
  • Executes item adds and removals via the underlying inventory service
  • Uses a GUID to ItemDefinition resolver for add operations (required for add operations to succeed)
  • Does not propagate sourceId (limitation of the item abstraction)

Optional diagnostics surface

The adapter may implement a diagnostics-only surface via IItemStoreDebug.

This is intended for editor and debug inspection only and should not be used in gameplay code.


⚠️ Important Notes

Implementation expectations

  • Preflight methods are side-effect free; only Add and Remove perform mutations
  • Inventory failures are mapped to corresponding EcoOpCode values
  • Missing resolver or unknown GUID may result in ResolverMissing during add operations
  • Missing containers may result in ContainerMissing without throwing exceptions

  • Economy — Abstractions
  • Economy — Facade
  • Economy — Adapters
  • Economy — Diagnostics