🔗 Inventory — Bridges¶
The Bridges folder contains optional integration glue between the Inventory system and other RevFramework systems. Bridges are deliberately lightweight, adapter-based, and safe to remove.
They provide: - No hard dependencies — Inventory never directly references other systems - Adapter-safe workflows — code compiles only when the target system exists - Clear integration seams — small translation layers instead of shared logic
Think of Bridges as the joinery layer between Inventory and the outside world.
Design Goals¶
Bridges exist to: - Keep Inventory fully standalone - Avoid circular or hidden dependencies between systems - Allow cross-system behaviour only when explicitly installed - Ensure removing a system does not break compilation or runtime behaviour
Inventory core code never assumes a bridge exists.
Structure¶
Bridges are organised into the following subfolders:
Policies/¶
Shared rules or behaviours that influence how Inventory interacts with other systems.
Examples: - Auto-routing rules - Cross-system consumption decisions - Shared authorisation or validation policies
These are policy-level concepts, not concrete integrations.
Policies/Adapters/¶
Concrete adapters that translate between Inventory and another system’s API, data model, or events.
Adapters are typically: - Small - One-directional - Event-driven or call-forwarding
They exist to adapt behaviour, not to introduce new logic into Inventory.
Adapter & Define Safety¶
Most bridges are:
- Define-gated (e.g. REV_PICKUPS_PRESENT)
- Compiled only when the target system is present
- Stubbed or excluded entirely when the dependency is missing
This guarantees: - No compile errors when systems are removed - No accidental runtime coupling - Clean SKU separation
Safe to Remove¶
If you are not using any cross-system integrations:
✅ The entire
Bridges/folder is safe to delete.
Inventory will continue to function normally with: - Item containers - Equipment - Item use - Sorting, searching, snapshots, and UI
This folder exists only to make optional integrations easier and cleaner.
When Should I Use Bridges?¶
Use a bridge when: - Inventory needs to interoperate with another system - You want to translate data or events between systems - You want to keep both systems independent and removable
Do not use bridges to: - Add core gameplay rules - Extend Inventory internals - Share mutable state between systems
See Also¶
- Inventory Root → overall system usage
- Abstractions → stable contracts
- Services → runtime mutation API
Support Stance¶
Bridges are intentionally minimal and not a general integration framework.
If you need deeper coupling: - Build it in your own gameplay layer, or - Write a project-specific adapter that consumes Inventory’s public APIs
Inventory itself remains strict, standalone, and dependency-free by design.