🧭 Economy — Teaching Panels¶
The Teaching folder contains IMGUI-based panels used for learning, debugging, and validating the Economy system directly in-scene.
These panels act as hostile consumers — they use only the public API and demonstrate real behaviour without shortcuts.
Status: Teaching / development-only UI (not for production) Define Guard:
REV_CURRENCY_PRESENT
⚠️ Teaching panels are not stripped automatically. Leaving them in a shipped scene will expose them at runtime.
🧩 Panel Overview¶
| Panel | Focus | Notes |
|---|---|---|
| EconomyQuickstartPanel | Currency-only economy | Demonstrates Buy and Reward flows |
Each panel is self-contained, minimal, and focused on a single concept.
🎯 Learning Goals¶
This panel demonstrates:
- Bootstrapping Economy using:
EconomyBootstrap
-
Executing:
-
Buy
-
Reward
-
Understanding:
-
Preflight (
CanPay) vs execution (Pay/Grant) - Policy effects on effective debit
-
Result codes (
EcoOpResult) -
Observing:
-
SourceId correlation (
EcoSource) - Ledger-backed value flow
💡 Example: Economy Operation¶
var result = _shop.Buy(player, _ledger, store: null, in price, null, vendorId, rid);
if (!result.Success)
{
Debug.Log(result.Code);
}
These are real service calls, not mock behaviour.
🧰 Integration Notes¶
- This panel is currency-only by design
- No
IItemStoreis present - Item-based operations are intentionally blocked
- Crafting is intentionally unavailable in this panel
🧠 Architecture Notes¶
EconomyQuickstartPanel
└─ EconomyBootstrap.BuildForPlayer(...)
├─ IValueLedger
├─ IShopService
├─ IRewardService
└─ ICraftingService
Currency service is supplied externally.
No item store is supplied.
Item-based operations are blocked by design.
🧱 Folder Layout¶
Economy/
├─ Teaching/
│ └─ EconomyQuickstartPanel.cs
├─ Integrations/
│ └─ Economy/Inventory/...
└─ Samples/
└─ Economy demo scenes
🧠 Quick Review¶
| Attribute | Summary |
|---|---|
| Audience | Developers learning the Economy system |
| Goal | Teach currency-based economy flows |
| Style | Hostile consumer (public API only) |
| Safety | Must not be shipped in production scenes |
TL;DR¶
This folder currently contains one currency-only Economy teaching panel. It demonstrates Buy and Reward flows through the public Economy API, while intentionally blocking item and crafting flows because no
IItemStoreis present.