🔗 Currency + Inventory — Teaching Panels¶
The Teaching folder contains a small set of IMGUI panels used to demonstrate how the Currency ↔ Inventory integration behaves at runtime.
These panels are built on top of the integration adapter and show how inventory-backed currency can be used through the Currency public API.
Status: Sample / Teaching UI — intended for development and testing scenes only. Not for shipping.
Define Guards:
REV_INVENTORY_PRESENT,REV_TEACHABLES⚠️ If a Teaching panel is present on a GameObject in a shipped scene, it will be visible and interactive at runtime. Shipping with Teaching panels attached is a developer error, not a framework bug.
🧩 Panel Overview¶
| Panel | Focus | Notes |
|---|---|---|
| CurrencyInventoryBackedPanel | Integration behaviour | Demonstrates inventory-backed currency |
🎯 What This Teaches¶
This panel demonstrates:
- How inventory item stacks act as currency balances
- How the adapter layer translates inventory → currency
-
How to interact with inventory-backed currency using:
-
ICurrencyService - standard Currency operations (
Credit,Debit,SetBalance,GetBalance) - How normal Currency operation results and validation still apply
All interactions go through the Currency API, not Inventory directly.
🧠 Mental Model¶
[ Inventory Containers ]
↓
[ Integration Adapter ]
↓
[ ICurrencyService ]
↓
[ Currency API ]
The panel helps visualise how:
- inventory changes → currency changes
- currency calls → inventory mutations
🧰 Integration Notes¶
-
These panels depend on:
-
Currency system
- Inventory system
-
This integration adapter
-
They will not compile or run if:
-
REV_INVENTORY_PRESENTis missing -
REV_TEACHABLESis not defined -
Panels use real runtime services, not mocks
🚫 What This Is NOT¶
These panels do not:
- Represent core Currency functionality
- Replace Inventory or Currency systems
- Provide production-ready UI
They exist purely to demonstrate how the integration behaves.
🧠 Quick Review¶
| Attribute | Summary |
|---|---|
| Audience | Developers using Currency + Inventory together |
| Goal | Demonstrate inventory-backed currency behaviour |
| Style | Minimal, focused, integration-specific |
| Location | Integrations/Currency/Inventory/Teaching/ |
| Safety | Dev-only; must not be shipped in scenes |
TL;DR¶
This Teaching folder shows how Currency behaves when backed by Inventory.
Use it to understand the integration behaviour, then interact with it through the Currency API only.