forge/arma/server/addons/task/XEH_preInit.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

36 lines
1.2 KiB
Plaintext

#include "script_component.hpp"
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
call FUNC(initTaskStore);
[QGVAR(requestTaskCatalog), {
params [["_uid", "", [""]]];
if (_uid isEqualTo "") exitWith {
["WARNING", "Task catalog request received with empty UID."] call EFUNC(common,log);
};
private _player = [_uid] call EFUNC(common,getPlayer);
if (_player isEqualTo objNull) exitWith {};
[CRPC(cad,responseTaskCatalog), [GVAR(TaskStore) call ["getActiveTaskCatalog", []]], _player] call CFUNC(targetEvent);
}] call CFUNC(addEventHandler);
[QGVAR(requestAcceptTask), {
params [["_uid", "", [""]], ["_taskID", "", [""]]];
if (_uid isEqualTo "" || { _taskID isEqualTo "" }) exitWith {
["WARNING", "Invalid task accept request payload."] call EFUNC(common,log);
};
private _player = [_uid] call EFUNC(common,getPlayer);
if (_player isEqualTo objNull) exitWith {};
private _result = GVAR(TaskStore) call ["acceptTask", [_taskID, _uid]];
[CRPC(cad,responseTaskAccept), [_result], _player] call CFUNC(targetEvent);
[CRPC(cad,responseTaskCatalog), [GVAR(TaskStore) call ["getActiveTaskCatalog", []]], _player] call CFUNC(targetEvent);
}] call CFUNC(addEventHandler);