Skip to content

🧪 Economy — Diagnostics (Runtime)

🎯 Purpose

This folder contains optional diagnostic and inspection surfaces for the Economy system.

These types are not part of the gameplay contract. They exist to support editor tooling, teachable panels, debugging, and inspection without expanding the core gameplay APIs.


🧩 What Lives Here

Types in this folder may:

  • Expose opaque handles or snapshots for inspection
  • Be consumed by teachable panels, editor tooling, or debug UI
  • Provide read-only visibility into runtime state
  • Be implemented optionally by runtime adapters

⚠️ Important Notes

Types in this folder must not:

  • Be required for normal gameplay
  • Be relied upon for gameplay correctness
  • Be used as extension points for game logic
  • Introduce behavioural coupling to specific implementations

If a system works without these types present, it is working correctly.


🧠 Usage Guidance

Design intent

The Economy runtime separates:

  • Abstractions Supported gameplay contracts (IItemStore, IShopService, IValueLedger)

  • Diagnostics Optional inspection surfaces for tooling and debugging

  • Teachables Consumers that demonstrate correct usage of the supported API

This separation allows debugging and teaching tools to exist without expanding the supported gameplay surface.


🧩 What Lives Here

Example — IItemStoreDebug

IItemStoreDebug is an optional diagnostic interface that runtime item-store adapters may implement.

It exposes an opaque Handle intended for:

  • Editor panels
  • Teachables
  • Debug inspection

Usage is explicit and conditional:

if (store is IItemStoreDebug dbg)
{
    var handle = dbg.Handle;
    // inspect or display, never rely on for gameplay
}

Gameplay code must not assume this interface is present.


🚫 Not for Production Use

These types are intended for inspection and tooling only.

They should not be used as part of gameplay logic or relied upon for game state decisions.


  • Abstractions
  • Model
  • Facade
  • Teaching