1.8 KiB
1.8 KiB
Forge Server Store
Overview
The store addon manages server-side storefront entities, catalog hydration, and checkout coordination.
SQF owns Arma-facing storefront discovery and request validation. The Rust
extension owns authoritative checkout calculation through store:checkout.
Dependencies
forge_server_mainforge_server_commonforge_server_extensionat runtime for checkout callsforge_server_actor,forge_server_bank, andforge_server_orgat runtime for checkout context and payment stateforge_client_storefor response RPCs
Main Components
fnc_initStore.sqfmarks editor-placed store objects withisStore = true.fnc_initCatalogService.sqfscans live Arma config categories, builds catalog responses, resolves checkout entries, and calculates authoritative catalog prices.fnc_initStorefrontStore.sqfbuilds hydrate payloads, validates checkout requests, callsstore:checkout, syncs client patches, and coordinates related bank/org persistence.
Editor Entities
fnc_initStore matches non-null mission namespace objects whose variable names
contain store, mirroring the garage entity initialization pattern.
Checkout Flow
Store checkout can charge cash, bank balance, organization funds, or approved credit lines depending on the hydrated session context. Checkout results can grant locker assets, organization assets, and fleet vehicles through the related domain stores.
Checkout results emit notifications and syncs through the event bus:
notification.requested- receipt and transaction alertsbank.account.sync.requested- player balance updatesorg.sync.requested- organization balance and asset updateslocker.sync.requested- item grant notificationsgarage.vgarage.sync.requested- vehicle grant notifications