- 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
43 lines
1.0 KiB
Plaintext
43 lines
1.0 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* File: fnc_initClass.sqf
|
|
* Author: IDSolutions
|
|
* Date: 2026-01-28
|
|
* Last Update: 2026-03-12
|
|
* Public: Yes
|
|
*
|
|
* Description:
|
|
* Initializes the store class for managing store data.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* Store class object [HASHMAP OBJECT]
|
|
*
|
|
* Example:
|
|
* call forge_client_store_fnc_initClass
|
|
*/
|
|
|
|
#pragma hemtt ignore_variables ["_self"]
|
|
GVAR(StoreBaseClass) = compileFinal createHashMapFromArray [
|
|
["#type", "StoreBaseClass"],
|
|
["#create", compileFinal {
|
|
_self set ["uid", getPlayerUID player];
|
|
_self set ["store", createHashMapFromArray [
|
|
["budget", 50000],
|
|
["availability", "In-Stock"],
|
|
["moduleState", "Preview"]
|
|
]];
|
|
_self set ["isLoaded", false];
|
|
_self set ["lastSave", time];
|
|
}],
|
|
["getStoreState", compileFinal {
|
|
_self getOrDefault ["store", createHashMap]
|
|
}]
|
|
];
|
|
|
|
GVAR(StoreClass) = createHashMapObject [GVAR(StoreBaseClass)];
|
|
GVAR(StoreClass)
|