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
|
||||
* Author: IDSolutions
|
||||
* Date: 2026-01-28
|
||||
* Last Update: 2026-01-30
|
||||
* Last Update: 2026-01-31
|
||||
* Public: No
|
||||
*
|
||||
* Description:
|
||||
@ -27,7 +27,6 @@ params ["_control", "_isConfirmDialog", "_message"];
|
||||
private _alert = fromJSON _message;
|
||||
private _event = _alert get "event";
|
||||
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];
|
||||
|
||||
@ -39,16 +38,13 @@ switch (_event) do {
|
||||
case "actor::open::garage": { hint "Garage interaction is not yet implemented."; };
|
||||
case "actor::open::vgarage": { [] spawn EFUNC(garage,openVG); };
|
||||
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::phone": { [] spawn EFUNC(phone,openUI) };
|
||||
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::store": { hint "Store interaction is not yet implemented."; };
|
||||
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; };
|
||||
|
||||
true;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* File: fnc_initActorClass.sqf
|
||||
* Author: IDSolutions
|
||||
* Date: 2026-01-28
|
||||
* Last Update: 2026-01-30
|
||||
* Last Update: 2026-01-31
|
||||
* Public: Yes
|
||||
*
|
||||
* Description:
|
||||
@ -131,7 +131,6 @@ GVAR(ActorClass) = createHashMapObject [[
|
||||
|
||||
if (_storeType isNotEqualTo "") then { _nearbyActions pushBack ["store", _storeType]; };
|
||||
if (_isBank) then { _nearbyActions pushBack ["bank", true]; };
|
||||
// if (_isLocker) then { _nearbyActions pushBack ["locker", true]; };
|
||||
if (_isLocker && GVAR(enableVA)) then { _nearbyActions pushBack ["va", true]; };
|
||||
if (_isGarage) then { _nearbyActions pushBack ["garage", _garageType]; };
|
||||
if (_isGarage && GVAR(enableVG)) then { _nearbyActions pushBack ["vg", true]; };
|
||||
|
||||
@ -92,13 +92,6 @@ const actionDefinitions = {
|
||||
icon: "",
|
||||
action: "actor::open::garage",
|
||||
},
|
||||
// locker: {
|
||||
// id: "locker",
|
||||
// title: "Locker",
|
||||
// description: "Access your personal locker for storage",
|
||||
// icon: "",
|
||||
// action: "actor::open::locker",
|
||||
// },
|
||||
player: {
|
||||
id: "player",
|
||||
title: "Player Interaction",
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* File: fnc_initLocker.sqf
|
||||
* Author: IDSolutions
|
||||
* Date: 2025-12-17
|
||||
* Last Update: 2026-01-30
|
||||
* Last Update: 2026-01-31
|
||||
* Public: No
|
||||
*
|
||||
* Description:
|
||||
@ -26,12 +26,9 @@ private _lockers = (allVariables missionNamespace) select {
|
||||
("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."; };
|
||||
diag_log format ["[FORGE:Server:Locker] Found %1 editor-placed locker(s), hiding globally", count _lockers];
|
||||
if (_lockers isEqualTo []) exitWith { ["INFO", "No editor-placed lockers found."] call EFUNC(common,log) };
|
||||
|
||||
{
|
||||
private _locker = missionNamespace getVariable _x;
|
||||
_locker hideObjectGlobal true;
|
||||
|
||||
diag_log format ["[FORGE:Server:Locker] Hidden locker: %1 at position %2", _x, getPosASL _locker];
|
||||
} forEach _lockers;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user