- replace placeholder garage interaction with real UI open flow - add catalog/session/UI bridge services for hydrate, sync, store, and retrieve actions - migrate garage web UI bundle to new app shell/runtime structure - align org/store function naming with shared init and UI bridge patterns
53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
#include "script_component.hpp"
|
|
|
|
if (isNil QGVAR(OrgClass)) then { call FUNC(initClass); };
|
|
if (isNil QGVAR(OrgUIBridge)) then { call FUNC(initUIBridge); };
|
|
|
|
[QGVAR(initOrg), {
|
|
GVAR(OrgClass) call ["init", []];
|
|
}] call CFUNC(addEventHandler);
|
|
|
|
[QGVAR(responseInitOrg), {
|
|
params [["_data", createHashMap, [createHashMap]]];
|
|
|
|
GVAR(OrgClass) call ["sync", [_data, true]];
|
|
GVAR(OrgUIBridge) call ["refreshPortal", []];
|
|
}] call CFUNC(addEventHandler);
|
|
|
|
[QGVAR(responseSyncOrg), {
|
|
params [["_data", createHashMap, [createHashMap]], ["_jip", false, [false]]];
|
|
|
|
GVAR(OrgClass) call ["sync", [_data, _jip]];
|
|
GVAR(OrgUIBridge) call ["refreshPortal", []];
|
|
}] call CFUNC(addEventHandler);
|
|
|
|
[QGVAR(responseCreateOrg), {
|
|
params [["_payload", createHashMap, [createHashMap]]];
|
|
|
|
GVAR(OrgUIBridge) call ["handleCreateResponse", [_payload]];
|
|
}] call CFUNC(addEventHandler);
|
|
|
|
[QGVAR(responseDisbandOrg), {
|
|
params [["_payload", createHashMap, [createHashMap]]];
|
|
|
|
GVAR(OrgUIBridge) call ["handleDisbandResponse", [_payload]];
|
|
}] call CFUNC(addEventHandler);
|
|
|
|
[QGVAR(responseLeaveOrg), {
|
|
params [["_payload", createHashMap, [createHashMap]]];
|
|
|
|
GVAR(OrgUIBridge) call ["handleLeaveResponse", [_payload]];
|
|
}] call CFUNC(addEventHandler);
|
|
|
|
[QGVAR(responseCreditLine), {
|
|
params [["_payload", createHashMap, [createHashMap]]];
|
|
|
|
GVAR(OrgUIBridge) call ["handleCreditLineResponse", [_payload]];
|
|
}] call CFUNC(addEventHandler);
|
|
|
|
[{
|
|
EGVAR(actor,ActorClass) get "isLoaded";
|
|
}, {
|
|
[QGVAR(initOrg), []] call CFUNC(localEvent);
|
|
}] call CFUNC(waitUntilAndExecute);
|