- Updated README.md files for extension, garage, locker, main, organization, phone, store, and task addons to provide clearer overviews, dependencies, main components, and usage notes. - Improved task module documentation to clarify timer semantics and server task flows, ensuring accurate usage of time limits. - Adjusted default values for task time limits and IED timers to enforce positive countdown requirements. - Added new CAD addon for dispatch coordination, including its overview, dependencies, main components, and event handling.
1.2 KiB
1.2 KiB
Forge Server Main
Overview
The main addon owns server-side bootstrap behavior for Forge. It prepares functions, wires extension callbacks and ICom events, initializes shared stores, and flushes hot state when players disconnect or the mission ends.
Dependencies
cba_mainace_main
Main Components
fnc_initStores.sqfinitializes core server stores in dependency order.fnc_saveHotState.sqfsnapshots and saves extension-backed hot state.fnc_initValidationHarness.sqfprovides targeted runtime smoke checks for multi-module flows.XEH_preInit.sqfregisters ICom and extension callback handlers.XEH_postInit.sqfstarts store initialization.
Store Initialization
The main addon initializes shared base stores, actor, bank, garage, locker, organization, store, and validation harness state. Some addons initialize their own state in pre-init or post-init when they are intentionally independent of the main bootstrap flow.
Hot State Flush
On player disconnect, mission ended, and MP ended events, saveHotState
persists actor, bank, locker, virtual arsenal, garage, virtual garage, and
organization hot state for the relevant UID or all known UIDs.