forge/arma/client/addons/cad/functions/fnc_initRepository.sqf
Jacob Schmidt 45a4f7460a Integrate task contracts and CAD UI pipeline
- add the imported server task addon to the current framework with task ownership, task catalog, mission-manager attack generation, org-owned reward routing, participant notifications, and reputation syncing
- restructure org persistence so core org data, assets, fleet, and members are handled through the current Redis/extension model with matching Rust repository and service updates
- wire the client CAD addon into the framework, actor device action, shared web UI bridge pattern, and task listing/acceptance flow
- add a source-driven CAD web UI layout with ui.config.mjs and extend the shared web UI builder to support custom HTML template pages for multi-surface UIs
2026-03-28 02:20:34 -05:00

53 lines
1.3 KiB
Plaintext

#include "..\script_component.hpp"
/*
* File: fnc_initRepository.sqf
* Author: IDSolutions
* Date: 2026-03-28
* Public: No
*
* Description:
* Initializes the CAD repository for lightweight client lifecycle state.
*
* Arguments:
* None
*
* Return Value:
* CAD repository object [HASHMAP OBJECT]
*
* Example:
* call forge_client_cad_fnc_initRepository
*/
#pragma hemtt ignore_variables ["_self"]
GVAR(CADRepository) = createHashMapObject [[
["#type", "CADRepository"],
["#create", compileFinal {
_self set ["isLoaded", true];
_self set ["isOpen", false];
_self set ["taskCatalog", []];
}],
["pushTaskCatalog", compileFinal {
params [["_bridge", createHashMap, [createHashMap]]];
if (_bridge isEqualTo createHashMap) exitWith { false };
_bridge call ["sendEvent", ["cad::tasks::hydrate", createHashMapFromArray [
["tasks", +(_self getOrDefault ["taskCatalog", []])]
]]]
}],
["setTaskCatalog", compileFinal {
params [["_entries", [], [[]]]];
_self set ["taskCatalog", +_entries];
true
}],
["setOpen", compileFinal {
params [["_isOpen", false, [false]]];
_self set ["isOpen", _isOpen];
true
}]
]];
GVAR(CADRepository)