Economy – Internal Advanced¶
⚠️ Implementation details – not supported public API
Namespace: RevGaming.RevFramework.Economy.Internal.Advanced
This bucket contains advanced orchestration helpers used by the service layer to keep multi-step operations safe and deterministic.
Do not reference these from gameplay code or integrations. They may change without notice.
Components¶
EcoRollbackUtil¶
Rollback helpers for partial item add/remove operations.
Why it exists: - Multi-step flows (Shop buy/sell, Crafting) can partially succeed before failing. - Economy guarantees deterministic rollback ordering so state is restored reliably.
Responsibilities:
- RollbackAdded(...)
- Removes items that were successfully added (reverse order).
- RollbackRemoved(...)
- Re-adds items that were successfully removed (reverse order).
- Deterministic reverse-order rollback to avoid drift and inconsistent state.
Notes:
- Item operations do not carry sourceId, so item rollbacks cannot propagate it.
- Currency rollback is handled at the service layer via IValueLedger.Grant (which does carry sourceId).
- Editor builds may log rollback failures using throttled warnings to avoid spam.
Key takeaways¶
- This is service-layer glue, not a gameplay API.
- If you think you “need” this, you likely should be using:
IShopServiceICraftingServiceIRewardServiceIValueLedger