From 5a20f1286b2c0259fab6e8196f0b3ca37075e330 Mon Sep 17 00:00:00 2001 From: jonpas Date: Sat, 4 Jun 2016 21:05:26 +0200 Subject: [PATCH] Change internal event framework names to contain prefix and be as short as possible --- addons/common/XEH_postInit.sqf | 8 ++++---- addons/common/config.cpp | 5 +++++ .../functions/fnc__handleRequestAllSyncedEvents.sqf | 2 +- addons/common/functions/fnc__handleRequestSyncedEvent.sqf | 2 +- addons/common/functions/fnc_requestSyncedEvent.sqf | 2 +- addons/common/functions/fnc_syncedEvent.sqf | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 1029d9b2a0..93589bb7f5 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -145,14 +145,14 @@ if (isServer) then { if (!isServer) then { ["ace_playerJIP", { ACE_LOGINFO("JIP event synchronization initialized"); - ["SEH_all", [player]] call CBA_fnc_serverEvent; + ["ACEa", [player]] call CBA_fnc_serverEvent; }] call CBA_fnc_addEventHandler; } else { - ["SEH_all", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler; + ["ACEa", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler; }; -["SEH", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler; -["SEH_s", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler; +["ACEe", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler; +["ACEs", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler; if (isServer) then { [FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index f1bb9308d6..0fb9949423 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -70,6 +70,11 @@ class ACE_newEvents { engineOn = QGVAR(engineOn); setFuel = QGVAR(setFuel); setDir = QGVAR(setDir); + + // Events framework + SEH_s = ACEs; + SEH = ACEe; + SEH_all = ACEa; }; #include "CfgEventHandlers.hpp" diff --git a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf index ce57658e6f..24f6c635fc 100644 --- a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf +++ b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf @@ -18,7 +18,7 @@ params ["_client"]; private _eventEntry = HASH_GET(GVAR(syncedEvents),_x); _eventEntry params ["", "_eventLog"]; - ["SEH_s", [_x, _eventLog], _client] call CBA_fnc_targetEvent; + ["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent; false } count (GVAR(syncedEvents) select 0); diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf index 35aac9d52e..ec48777a1c 100644 --- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf @@ -30,7 +30,7 @@ if (isServer) then { private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName); _eventEntry params ["", "_eventLog"]; - ["SEH_s", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent; + ["ACEs", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent; } else { params ["_eventName", "_eventLog"]; diff --git a/addons/common/functions/fnc_requestSyncedEvent.sqf b/addons/common/functions/fnc_requestSyncedEvent.sqf index 0749b374ca..16ffd5b342 100644 --- a/addons/common/functions/fnc_requestSyncedEvent.sqf +++ b/addons/common/functions/fnc_requestSyncedEvent.sqf @@ -17,4 +17,4 @@ params ["_eventName"]; // Only JIP machines on initialization send this off, requesting sync on events with the serverCommand if (isServer) exitWith {false}; -["SEH_s", [_eventName, ACE_player]] call CBA_fnc_serverEvent; +["ACEs", [_eventName, ACE_player]] call CBA_fnc_serverEvent; diff --git a/addons/common/functions/fnc_syncedEvent.sqf b/addons/common/functions/fnc_syncedEvent.sqf index 3964d23afc..43bc6ce784 100644 --- a/addons/common/functions/fnc_syncedEvent.sqf +++ b/addons/common/functions/fnc_syncedEvent.sqf @@ -23,4 +23,4 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith { private _eventData = [_name, _args, _ttl]; -["SEH", _eventData] call CBA_fnc_globalEvent; +["ACEe", _eventData] call CBA_fnc_globalEvent;