feat: Introduce initial class and store definitions for actor, bank, garage, locker, organization, and virtual armory/garage systems.

This commit is contained in:
Jacob Schmidt 2026-01-31 19:30:34 -06:00
parent 27c0ade320
commit 827d1eb698
8 changed files with 19 additions and 33 deletions

View File

@ -51,10 +51,6 @@ GVAR(ActorClass) = createHashMapObject [[
private _actor = _self get "actor";
private _isLoaded = _self get "isLoaded";
if (_data isEqualTo createHashMap) exitWith {
diag_log "[FORGE:Client:Actor] Empty data received for sync, skipping.";
};
{
_actor set [_x, _y];

View File

@ -4,7 +4,7 @@
* File: fnc_initBankClass.sqf
* Author: IDSolutions
* Date: 2025-12-16
* Last Update: 2026-01-30
* Last Update: 2026-01-31
* Public: No
*
* Description:
@ -51,10 +51,6 @@ GVAR(BankClass) = createHashMapObject [[
private _account = _self get "account";
private _isLoaded = _self get "isLoaded";
if (_data isEqualTo createHashMap) exitWith {
diag_log "[FORGE:Client:Bank] Empty data received for sync, skipping.";
};
{
_account set [_x, _y];
} forEach _data;

View File

@ -4,7 +4,7 @@
* File: fnc_initGarageClass.sqf
* Author: IDSolutions
* Date: 2025-12-17
* Last Update: 2026-01-30
* Last Update: 2026-01-31
* Public: No
*
* Description:
@ -51,14 +51,7 @@ GVAR(GarageClass) = createHashMapObject [[
private _garage = _self get "garage";
private _isLoaded = _self get "isLoaded";
if (_data isEqualTo createHashMap) exitWith {
diag_log "[FORGE:Client:Garage] Empty data received for sync, skipping.";
};
{
_garage set [_x, _y];
} forEach _data;
{ _garage set [_x, _y]; } forEach _data;
_self set ["garage", _garage];
if !(_isLoaded) then { _self set ["isLoaded", true]; };

View File

@ -4,7 +4,7 @@
* File: fnc_initVGClass.sqf
* Author: IDSolutions
* Date: 2025-12-16
* Last Update: 2026-01-30
* Last Update: 2026-01-31
* Public: No
*
* Description:
@ -53,8 +53,6 @@ GVAR(VGarageClass) = createHashMapObject [[
private _vGarage = _self get "vGarage";
private _isLoaded = _self get "isLoaded";
if (_data isEqualTo createHashMap) exitWith { diag_log "[FORGE:Client:VGarage] Empty data received for sync, skipping."; };
{
_vGarage set [_x, _y];

View File

@ -4,7 +4,7 @@
* File: fnc_initLockerClass.sqf
* Author: IDSolutions
* Date: 2025-12-17
* Last Update: 2026-01-30
* Last Update: 2026-01-31
* Public: No
*
* Description:
@ -209,6 +209,11 @@ GVAR(LockerRepository) = compileFinal createHashMapFromArray [
default { _container addItemCargo [_className, _amount]; };
};
} forEach _index;
if (count _index > 25) then {
private _params = ["warning", "Over Capacity", "Locker has more then 25 items, please remove some items", 3000];
GVAR(NotificationClass) call ["create", _params];
};
}];
_locker addEventHandler ["ContainerClosed", {
@ -222,6 +227,11 @@ GVAR(LockerRepository) = compileFinal createHashMapFromArray [
private _uid = getPlayerUID _unit;
[SRPC(locker,requestOverrideLocker), [_uid, _newLocker]] call CFUNC(serverEvent);
GVAR(LockerClass) set ["locker", _newLocker];
if (count _newLocker > 25) then {
private _params = ["warning", "Over Capacity", "Locker has more then 25 items, please remove some items", 3000];
GVAR(NotificationClass) call ["create", _params];
};
}];
}],
["setup", {
@ -262,8 +272,8 @@ GVAR(LockerRepository) = compileFinal createHashMapFromArray [
private _isLoaded = _self get "isLoaded";
private _locker = _self get "locker";
if (_data isEqualTo createHashMap) exitWith { diag_log "[FORGE:Client:Locker] Empty data received for sync, skipping."; };
{ _locker set [_x, _y]; } forEach _data;
_self set ["locker", _locker];
if !(_isLoaded) then { _self set ["isLoaded", true]; _self call ["setup", []]; };
diag_log "[FORGE:Client:Locker] Sync completed";

View File

@ -4,7 +4,7 @@
* File: fnc_initVAClass.sqf
* Author: IDSolutions
* Date: 2025-12-16
* Last Update: 2026-01-30
* Last Update: 2026-01-31
* Public: No
*
* Description:
@ -51,8 +51,6 @@ GVAR(VArsenalClass) = createHashMapObject [[
private _vArsenal = _self get "vArsenal";
private _isLoaded = _self get "isLoaded";
if (_data isEqualTo createHashMap) exitWith { diag_log "[FORGE:Client:VArsenal] Empty data received for sync, skipping."; };
{
_vArsenal set [_x, _y];

View File

@ -59,12 +59,7 @@ GVAR(OrgClass) = createHashMapObject [[
private _isLoaded = _self get "isLoaded";
private _org = _self get "org";
if (_data isEqualTo createHashMap) exitWith {
diag_log "[FORGE:Client:Org] Empty data received for sync, skipping.";
};
{ _org set [_x, _y]; } forEach _data;
_self set ["org", _org];
if !(_isLoaded) then { _self set ["isLoaded", true]; };

View File

@ -4,7 +4,7 @@
* File: fnc_initVGStore.sqf
* Author: IDSolutions
* Date: 2025-12-17
* Last Update: 2026-01-30
* Last Update: 2026-01-31
* Public: No
*
* Description:
@ -28,7 +28,7 @@ GVAR(VGarageModel) = compileFinal createHashMapObject [[
private _vGarage = createHashMap;
_vGarage set ["armor", []];
_vGarage set ["cars", []];
_vGarage set ["cars", ["B_Quadbike_01_F"]];
_vGarage set ["helis", []];
_vGarage set ["naval", []];
_vGarage set ["other", []];