Implemented features: - High-performance Rust extension with Redis persistence - Actor/player management with loadout, position, and state tracking - Banking system with deposit, withdraw, and transfer operations - Physical and virtual garage/locker systems for vehicle and equipment storage - Organization management with member tracking and permissions - Client-side UI with React-like state management - Server-side event-driven architecture with CBA Events - Security: Self-transfer prevention at multiple layers - Logging system with per-module log files - ICOM module for inter-server communication Co-Authored-By: Warp <agent@warp.dev>
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Initialize notification class
|
|
*
|
|
* Arguments:
|
|
* N/A
|
|
*
|
|
* Return Value:
|
|
* N/A
|
|
*
|
|
* Examples:
|
|
* [] call forge_client_notifications_fnc_initNotificationClass
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
#pragma hemtt ignore_variables ["_self"]
|
|
GVAR(NotificationClass) = createHashMapObject [[
|
|
["#type", "INotificationClass"],
|
|
["#create", {
|
|
private _display = uiNamespace getVariable ["RscNotifications", nil];
|
|
private _control = _display displayCtrl 1004;
|
|
|
|
_self set ["control", _control];
|
|
_self set ["isLoaded", false];
|
|
}],
|
|
["init", {
|
|
private _params = ["success", "System Ready", "Notification system handshake complete!", 3000];
|
|
|
|
_self call ["create", _params];
|
|
_self set ["isLoaded", true];
|
|
|
|
systemChat format ["Notifications loaded for %1", (name player)];
|
|
diag_log "[FORGE:Client:Notifications] Notification Class Initialized!";
|
|
}],
|
|
["create", {
|
|
params [["_type", "", ["info"]], ["_title", "", [""]], ["_content", "", [""]], ["_duration", 4000]];
|
|
|
|
private _control = _self get "control";
|
|
private _message = createHashMap;
|
|
|
|
_message set ["type", _type];
|
|
_message set ["title", _title];
|
|
_message set ["message", _content];
|
|
_message set ["duration", _duration];
|
|
|
|
_control ctrlWebBrowserAction ["ExecJS", format ["window.dispatchEvent(new CustomEvent('forge:notify', { detail: %1 }))", (toJSON _message)]];
|
|
}]
|
|
]];
|
|
|
|
SETVAR(player,FORGE_NotificationClass,GVAR(NotificationClass));
|
|
GVAR(NotificationClass)
|