feat: Implement client-side actor system for player state management and UI interactions, alongside server-side locker initialization.
This commit is contained in:
parent
2b895b7d1a
commit
27c0ade320
@ -4,7 +4,7 @@
|
|||||||
* File: fnc_handleUIEvents.sqf
|
* File: fnc_handleUIEvents.sqf
|
||||||
* Author: IDSolutions
|
* Author: IDSolutions
|
||||||
* Date: 2026-01-28
|
* Date: 2026-01-28
|
||||||
* Last Update: 2026-01-30
|
* Last Update: 2026-01-31
|
||||||
* Public: No
|
* Public: No
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@ -27,7 +27,6 @@ params ["_control", "_isConfirmDialog", "_message"];
|
|||||||
private _alert = fromJSON _message;
|
private _alert = fromJSON _message;
|
||||||
private _event = _alert get "event";
|
private _event = _alert get "event";
|
||||||
private _data = _alert get "data";
|
private _data = _alert get "data";
|
||||||
// private _display = displayChild findDisplay 46;
|
|
||||||
|
|
||||||
diag_log format ["[FORGE:Client:Actor] Handling UI event: %1 with data: %2", _event, _data];
|
diag_log format ["[FORGE:Client:Actor] Handling UI event: %1 with data: %2", _event, _data];
|
||||||
|
|
||||||
@ -39,16 +38,13 @@ switch (_event) do {
|
|||||||
case "actor::open::garage": { hint "Garage interaction is not yet implemented."; };
|
case "actor::open::garage": { hint "Garage interaction is not yet implemented."; };
|
||||||
case "actor::open::vgarage": { [] spawn EFUNC(garage,openVG); };
|
case "actor::open::vgarage": { [] spawn EFUNC(garage,openVG); };
|
||||||
case "actor::open::org": { [] spawn EFUNC(org,openUI); };
|
case "actor::open::org": { [] spawn EFUNC(org,openUI); };
|
||||||
// case "actor::open::locker": { hint "Locker interaction is not yet implemented."; };
|
|
||||||
case "actor::open::vlocker": { ["Open", [false, FORGE_Locker_Box, player]] spawn BFUNC(arsenal) };
|
case "actor::open::vlocker": { ["Open", [false, FORGE_Locker_Box, player]] spawn BFUNC(arsenal) };
|
||||||
// case "actor::open::phone": { [] spawn EFUNC(phone,openUI) };
|
|
||||||
case "actor::open::phone": { hint "Phone interaction is not yet implemented."; };
|
case "actor::open::phone": { hint "Phone interaction is not yet implemented."; };
|
||||||
case "actor::open::iplayer": { hint "Player interaction is not yet implemented." };
|
case "actor::open::iplayer": { hint "Player interaction is not yet implemented." };
|
||||||
case "actor::open::store": { hint "Store interaction is not yet implemented."; };
|
case "actor::open::store": { hint "Store interaction is not yet implemented."; };
|
||||||
default { hint format ["Unhandled UI event: %1", _event]; };
|
default { hint format ["Unhandled UI event: %1", _event]; };
|
||||||
};
|
};
|
||||||
|
|
||||||
// if (_event isNotEqualTo "actor::get::actions") then { _display closeDisplay 1; };
|
|
||||||
if (_event isNotEqualTo "actor::get::actions") then { closeDialog 1; };
|
if (_event isNotEqualTo "actor::get::actions") then { closeDialog 1; };
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* File: fnc_initActorClass.sqf
|
* File: fnc_initActorClass.sqf
|
||||||
* Author: IDSolutions
|
* Author: IDSolutions
|
||||||
* Date: 2026-01-28
|
* Date: 2026-01-28
|
||||||
* Last Update: 2026-01-30
|
* Last Update: 2026-01-31
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@ -131,7 +131,6 @@ GVAR(ActorClass) = createHashMapObject [[
|
|||||||
|
|
||||||
if (_storeType isNotEqualTo "") then { _nearbyActions pushBack ["store", _storeType]; };
|
if (_storeType isNotEqualTo "") then { _nearbyActions pushBack ["store", _storeType]; };
|
||||||
if (_isBank) then { _nearbyActions pushBack ["bank", true]; };
|
if (_isBank) then { _nearbyActions pushBack ["bank", true]; };
|
||||||
// if (_isLocker) then { _nearbyActions pushBack ["locker", true]; };
|
|
||||||
if (_isLocker && GVAR(enableVA)) then { _nearbyActions pushBack ["va", true]; };
|
if (_isLocker && GVAR(enableVA)) then { _nearbyActions pushBack ["va", true]; };
|
||||||
if (_isGarage) then { _nearbyActions pushBack ["garage", _garageType]; };
|
if (_isGarage) then { _nearbyActions pushBack ["garage", _garageType]; };
|
||||||
if (_isGarage && GVAR(enableVG)) then { _nearbyActions pushBack ["vg", true]; };
|
if (_isGarage && GVAR(enableVG)) then { _nearbyActions pushBack ["vg", true]; };
|
||||||
|
|||||||
@ -92,13 +92,6 @@ const actionDefinitions = {
|
|||||||
icon: "",
|
icon: "",
|
||||||
action: "actor::open::garage",
|
action: "actor::open::garage",
|
||||||
},
|
},
|
||||||
// locker: {
|
|
||||||
// id: "locker",
|
|
||||||
// title: "Locker",
|
|
||||||
// description: "Access your personal locker for storage",
|
|
||||||
// icon: "",
|
|
||||||
// action: "actor::open::locker",
|
|
||||||
// },
|
|
||||||
player: {
|
player: {
|
||||||
id: "player",
|
id: "player",
|
||||||
title: "Player Interaction",
|
title: "Player Interaction",
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* File: fnc_initLocker.sqf
|
* File: fnc_initLocker.sqf
|
||||||
* Author: IDSolutions
|
* Author: IDSolutions
|
||||||
* Date: 2025-12-17
|
* Date: 2025-12-17
|
||||||
* Last Update: 2026-01-30
|
* Last Update: 2026-01-31
|
||||||
* Public: No
|
* Public: No
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@ -26,12 +26,9 @@ private _lockers = (allVariables missionNamespace) select {
|
|||||||
("locker" in _x) && { _var isEqualType objNull } && { !isNull _var } && { _x isNotEqualTo "forge_locker_box" }
|
("locker" in _x) && { _var isEqualType objNull } && { !isNull _var } && { _x isNotEqualTo "forge_locker_box" }
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_lockers isEqualTo []) exitWith { diag_log "[FORGE:Server:Locker] No editor-placed lockers found."; };
|
if (_lockers isEqualTo []) exitWith { ["INFO", "No editor-placed lockers found."] call EFUNC(common,log) };
|
||||||
diag_log format ["[FORGE:Server:Locker] Found %1 editor-placed locker(s), hiding globally", count _lockers];
|
|
||||||
|
|
||||||
{
|
{
|
||||||
private _locker = missionNamespace getVariable _x;
|
private _locker = missionNamespace getVariable _x;
|
||||||
_locker hideObjectGlobal true;
|
_locker hideObjectGlobal true;
|
||||||
|
|
||||||
diag_log format ["[FORGE:Server:Locker] Hidden locker: %1 at position %2", _x, getPosASL _locker];
|
|
||||||
} forEach _lockers;
|
} forEach _lockers;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user