Hostile Consumer Panels¶
This folder contains hostile-consumer teachable panels for the Inventory system.
These panels are intentionally written as if they lived in a completely separate Unity project consuming RevFramework from the outside.
They are used to verify that the public API surface is complete, stable, and usable without internal access.
What “Hostile Consumer” Means¶
Panels in this folder are restricted to using only:
- Public APIs
- Documented runtime types
- Supported extension seams
- Teaching UI utilities
They may not:
- reference
.Internalnamespaces - use reflection to access private state
- call undocumented
.Corehelpers - depend on sample/demo utilities
- modify runtime wiring with teaching-only helpers
If a panel requires any of those, the panel must not live in this folder.
Built-In Runtime Model¶
Inventory exposes a supported runtime model in addition to abstractions.
Hostile consumer panels may use these documented runtime types:
SceneInventoryService
InventoryResolve
CharacterInventory
CharacterEquipment
ItemDefinition
ItemStack
ContainerId
InventorySortSpec
InventorySortKey
InventorySnapshotOptions
MissingItemPolicy
InventorySnapshots
These are part of the public runtime API, not internal implementation details.
Panels must not access:
InventoryContainer
EquipmentContainer
ContainerInternal
EquipmentInternal
Those are internal implementation details used by the framework itself.
Panels in This Folder¶
The hostile-consumer panels for Inventory currently include:
01_Items_And_Stacks
02_Slots_And_Restrictions
03_Search_And_Sort
04_Snapshots
Each panel demonstrates a specific area of the Inventory API while remaining fully compliant with the hostile-consumer rules.
Purpose of These Panels¶
Hostile-consumer panels serve two roles.
1️⃣ API Verification¶
They prove that the Inventory system can be used through its public surface only.
If a hostile-consumer panel breaks during refactoring, the public API has likely changed.
2️⃣ Teaching Real Usage¶
Unlike sample utilities, these panels demonstrate real production usage patterns, such as:
- giving items to containers
- reading inventory state
- equipping and unequipping items
- sorting inventory slots
- running service-backed search
- saving and restoring snapshots
Everything shown here uses the same public APIs developers use in production code.
Relationship to Other Teaching Panels¶
Not all teaching panels are hostile consumers.
Panels that:
- attach demo helpers
- simulate optional runtime seams
- modify service wiring for testing
belong in the Demos folder instead.
Those panels exist to demonstrate behaviour, not to verify the public API surface.
Summary¶
Panels in this folder are API verification tools disguised as teaching panels.
They guarantee that:
- the Inventory public API is sufficient
- the runtime model is usable externally
- the framework can evolve internally without breaking consumers
If these panels compile and run, the Inventory public API works.