Port to CBA Hashes and CBA Events. General fixes

This commit is contained in:
TheMagnetar 2018-01-26 20:20:25 +01:00
parent 4e651ed7b7
commit 9a1c2b337f
48 changed files with 188 additions and 159 deletions

View File

@ -1,6 +1,6 @@
class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
class CBA_MiscItem_ItemInfo;
class ACE_bftItemBase: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
scope = 2;
@ -15,7 +15,7 @@ class CfgWeapons {
// Magazine type for unique IDs. This is the magazine classname by which this item will be replaced. Will be replaced once BI implements unique Ids for items.
GVAR(magazineItem) = "ACE_bftMagazineBase";
class ItemInfo: InventoryItem_Base_F {
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 1;
};
};

View File

@ -1,27 +1,27 @@
#include "script_component.hpp"
["bft_itemCreated", FUNC(handleItemCreated)] call EFUNC(common,addEventHandler);
["bft_addDeviceData", FUNC(handleAddDeviceData)] call EFUNC(common,addEventHandler);
["bft_updateDeviceOwner", FUNC(handleUpdateDeviceOwner)] call EFUNC(common,addEventHandler);
["bft_updateDeviceGroup", FUNC(handleUpdateDeviceGroup)] call EFUNC(common,addEventHandler);
["bft_updateDeviceElementType", FUNC(handleUpdateDeviceElementType)] call EFUNC(common,addEventHandler);
["bft_updateDeviceCallsign", FUNC(handleUpdateDeviceCallsign)] call EFUNC(common,addEventHandler);
["bft_updateDeviceKeys", FUNC(handleUpdateDeviceKeys)] call EFUNC(common,addEventHandler);
["bft_updateDeviceAppData", FUNC(handleUpdateDeviceAppData)] call EFUNC(common,addEventHandler);
["bft_itemCreated", FUNC(handleItemCreated)] call CBA_fnc_addEventHandler;
["bft_addDeviceData", FUNC(handleAddDeviceData)] call CBA_fnc_addEventHandler;
["bft_updateDeviceOwner", FUNC(handleUpdateDeviceOwner)] call CBA_fnc_addEventHandler;
["bft_updateDeviceGroup", FUNC(handleUpdateDeviceGroup)] call CBA_fnc_addEventHandler;
["bft_updateDeviceElementType", FUNC(handleUpdateDeviceElementType)] call CBA_fnc_addEventHandler;
["bft_updateDeviceCallsign", FUNC(handleUpdateDeviceCallsign)] call CBA_fnc_addEventHandler;
["bft_updateDeviceKeys", FUNC(handleUpdateDeviceKeys)] call CBA_fnc_addEventHandler;
["bft_updateDeviceAppData", FUNC(handleUpdateDeviceAppData)] call CBA_fnc_addEventHandler;
["bft_syncedArrayDelete", FUNC(handleSyncedArrayDelete)] call EFUNC(common,addEventHandler);
["bft_syncedArrayPushback", FUNC(handleSyncedArrayPushback)] call EFUNC(common,addEventHandler);
["bft_syncedArrayUpdate", FUNC(handleSyncedArrayUpdate)] call EFUNC(common,addEventHandler);
["bft_syncedArrayDelete", FUNC(handleSyncedArrayDelete)] call CBA_fnc_addEventHandler;
["bft_syncedArrayPushback", FUNC(handleSyncedArrayPushback)] call CBA_fnc_addEventHandler;
["bft_syncedArrayUpdate", FUNC(handleSyncedArrayUpdate)] call CBA_fnc_addEventHandler;
["bft_vehicleDeviceKilled", FUNC(handleVehicleDeviceKilled)] call EFUNC(common,addEventHandler);
["bft_vehicleDeviceKilled", FUNC(handleVehicleDeviceKilled)] call CBA_fnc_addEventHandler;
if(!isServer) then {
if (!isServer) then {
["PlayerJip", {
diag_log text format["[ACE] * JIP BFT Data Synchronization initialized"];
["bft_requestAllData", [player]] call EFUNC(common,serverEvent);
}] call EFUNC(common,addEventHandler);
["bft_requestAllData", [ace_player]] call CBA_fnc_serverEvent;
}] call CBA_fnc_addEventHandler;
} else {
["bft_requestAllData", FUNC(handleRequestAllData)] call EFUNC(common,addEventHandler);
["bft_requestAllData", FUNC(handleRequestAllData)] call CBA_fnc_addEventHandler;
/*[QGVAR(messages), [0, "Message content!"]] call FUNC(syncedArrayPushback);
[QGVAR(messages), ["0/1", "Message content!"]] call FUNC(syncedArrayPushback);
@ -42,12 +42,13 @@ if(!isServer) then {
if (!hasInterface) exitWith {};
["playerInventoryChanged", FUNC(validateInventory)] call EFUNC(common,addEventHandler);
["playerChanged", FUNC(validateInventory)] call EFUNC(common,addEventHandler);
["loadout", FUNC(validateInventory)] call CBA_fnc_addPlayerEventHandler;
["unit", FUNC(validateInventory)] call CBA_fnc_addPlayerEventHandler;
["vehicle", {[ACE_player, objNull] call FUNC(validateInventory)}] call CBA_fnc_addPlayerEventHandler; // Necessary?
["bft_deviceDataChanged", FUNC(handleDeviceDataChanged)] call EFUNC(common,addEventHandler);
["bft_registeredEncryptionKeysChanged", FUNC(handleRegisteredEncryptionKeysChanged)] call EFUNC(common,addEventHandler);
["bft_registeredModeChanged", FUNC(handleRegisteredModeChanged)] call EFUNC(common,addEventHandler);
["bft_colorFilteringChanged", FUNC(handleColorFilteringChanged)] call EFUNC(common,addEventHandler);
["bft_deviceOpened", FUNC(handleDeviceOpened)] call EFUNC(common,addEventHandler);
["bft_deviceClosed", FUNC(handleDeviceClosed)] call EFUNC(common,addEventHandler);
["bft_deviceDataChanged", FUNC(handleDeviceDataChanged)] call CBA_fnc_addEventHandler;
["bft_registeredEncryptionKeysChanged", FUNC(handleRegisteredEncryptionKeysChanged)] call CBA_fnc_addEventHandler;
["bft_registeredModeChanged", FUNC(handleRegisteredModeChanged)] call CBA_fnc_addEventHandler;
["bft_colorFilteringChanged", FUNC(handleColorFilteringChanged)] call CBA_fnc_addEventHandler;
["bft_deviceOpened", FUNC(handleDeviceOpened)] call CBA_fnc_addEventHandler;
["bft_deviceClosed", FUNC(handleDeviceClosed)] call CBA_fnc_addEventHandler;

View File

@ -45,7 +45,7 @@ if (isText (configFile >> "CfgWeapons" >> _item >> QGVAR(deviceType)) && {getTex
if (_magID != "") then {
GVAR(pendingIdAssignmentList) pushback _magID;
["bft_itemCreated", [_unit, _item, _magazine, _magID]] call EFUNC(common,serverEvent);
["bft_itemCreated", [_unit, _item, _magazine, _magID]] call CBA_fnc_serverEvent;
};
};
};

View File

@ -40,4 +40,4 @@ if (local (_this select 5)) then {
diag_log format["handleAdd - not the owner of device: %1", (_this select 5)];
};
["bft_deviceDataChanged", [_this, true]] call EFUNC(common,localEvent);
["bft_deviceDataChanged", [_this, true]] call CBA_fnc_localEvent;

View File

@ -95,5 +95,5 @@ _deviceInformation = [_magID, [_deviceSide, _deviceEncryptionKeys], _assignableI
diag_log format["Prep raising bft_addDeviceData _deviceInformation with: %1", _deviceInformation];
[{
diag_log format["exec bft_addDeviceData _deviceInformation with: %1", _this];
["bft_addDeviceData", _this] call EFUNC(common,globalEvent);
}, _deviceInformation, 1] call EFUNC(common,waitAndExecute);
["bft_addDeviceData", _this] call CBA_fnc_globalEvent;
}, _deviceInformation, 1] call CBA_fnc_waitAndExecute;

View File

@ -22,5 +22,5 @@ private _ownedDevices = _object getvariable [QGVAR(ownedDevices), []];
{
systemChat format["raising event vehicleDeviceKilled: %1 ", _x];
diag_log format["raising event vehicleDeviceKilled: %1 ", _x];
["bft_vehicleDeviceKilled", [_x]] call EFUNC(common,globalEvent);
["bft_vehicleDeviceKilled", [_x]] call CBA_fnc_globalEvent;
} forEach _ownedDevices;

View File

@ -19,7 +19,7 @@ diag_log format["handleRequestAllData: Request from Origin: %1", _origin];
{
diag_log format["handleRequestAllData: Add Device Data to origin: %1", _x];
["bft_addDeviceData", _origin, _x] call EFUNC(common,targetEvent);
["bft_addDeviceData", _origin, _x] call CBA_fnc_targetEvent;
} forEach GVAR(deviceData);
// Alternative:
@ -35,7 +35,7 @@ diag_log format["handleRequestAllData: Request from Origin: %1", _origin];
{
diag_log format["handleRequestAllData: Add synced array variable (%1) value: %2", _varName, _x];
["bft_syncedArrayPushback", _origin, [_varName, _x]] call EFUNC(common,targetEvent);
["bft_syncedArrayPushback", _origin, [_varName, _x]] call CBA_fnc_targetEvent;
} forEach _variable;
// Alternative:

View File

@ -26,7 +26,7 @@ _variable = missionNamespace getvariable [_varName, []];
diag_log format["handleSyncedArrayDelete deleting- %1", _x];
private ["_removedElement"];
_removedElement = _variable deleteAt _foreachIndex;
["bft_syncedArrayChanged", [2, _removedElement]] call EFUNC(common,localEvent);
["bft_syncedArrayChanged", [2, _removedElement]] call CBA_fnc_localEvent;
};
} forEach _variable;

View File

@ -25,7 +25,7 @@ _variable = missionNamespace getvariable [_varName, []];
_variable pushback _data;
missionNamespace setvariable [_varName, _variable];
["bft_syncedArrayChanged", [0, _data]] call EFUNC(common,localEvent);
["bft_syncedArrayChanged", [0, _data]] call CBA_fnc_localEvent;
systemChat format["handleSyncedArrayPushback %1 - %2", _varName, _variable];
diag_log format["handleSyncedArrayPushback %1 - %2", _varName, _variable];

View File

@ -29,7 +29,7 @@ _variable = missionNamespace getvariable [_varName, []];
_compareID = if (typeName _x == "ARRAY") then {_x select 0} else {_x};
if (_compareID isEqualTo _elementID) exitwith {
_variable set[_forEachIndex, _data];
["bft_syncedArrayChanged", [1, _data, _x]] call EFUNC(common,localEvent);
["bft_syncedArrayChanged", [1, _data, _x]] call CBA_fnc_localEvent;
};
} forEach _variable;

View File

@ -20,4 +20,4 @@ private ["_data"];
_data = [_deviceID] call FUNC(getDeviceData);
_data set [3, _newData];
// ["bft_deviceDataChanged", [_data, false]] call EFUNC(common,localEvent);
// ["bft_deviceDataChanged", [_data, false]] call CBA_fnc_localEvent;

View File

@ -21,4 +21,4 @@ _data = [_deviceID] call FUNC(getDeviceData);
_deviceAssignableInfo = _data select 2;
_deviceAssignableInfo set [2, _callsign];
["bft_deviceDataChanged", [_data, false]] call EFUNC(common,localEvent);
["bft_deviceDataChanged", [_data, false]] call CBA_fnc_localEvent;

View File

@ -22,4 +22,4 @@ _assignableInformation = _data select 2;
_assignableInformation set [0, _elementType select 0];
_assignableInformation set [1, _elementType select 1];
["bft_deviceDataChanged", [_data, false]] call EFUNC(common,localEvent);
["bft_deviceDataChanged", [_data, false]] call CBA_fnc_localEvent;

View File

@ -21,4 +21,4 @@ _data = [_deviceID] call FUNC(getDeviceData);
_previousGroup = _data select 2;
_previousGroup set [3, _groupID];
["bft_deviceDataChanged", [_data, false]] call EFUNC(common,localEvent);
["bft_deviceDataChanged", [_data, false]] call CBA_fnc_localEvent;

View File

@ -21,4 +21,4 @@ _data = [_deviceID] call FUNC(getDeviceData);
_encryption = _data select 1;
_encryption set [1, _keys];
["bft_deviceDataChanged", [_data, false]] call EFUNC(common,localEvent);
["bft_deviceDataChanged", [_data, false]] call CBA_fnc_localEvent;

View File

@ -25,7 +25,7 @@ _data = [_deviceID] call FUNC(getDeviceData);
_previousOwner = _data select 5;
_data set [5, _newOwner];
["bft_deviceDataChanged", [_data, isNull _previousOwner]] call EFUNC(common,localEvent);
["bft_deviceDataChanged", [_data, isNull _previousOwner]] call CBA_fnc_localEvent;
systemChat format["handleUpdateDeviceOwner - setting new owner from %1 to %2", _previousOwner, _newOwner];
diag_log format["handleUpdateDeviceOwner - setting new owner from %1 to %2", _previousOwner, _newOwner];

View File

@ -22,4 +22,4 @@ _data = [_deviceID] call FUNC(getDeviceData);
if (count _data == 0) exitwith {};
if (_deviceData isEqualTo (_data select 3)) exitwith {};
["bft_updateDeviceData", [_deviceID, _deviceData]] call EFUNC(common,globalEvent);
["bft_updateDeviceData", [_deviceID, _deviceData]] call CBA_fnc_globalEvent;

View File

@ -23,4 +23,4 @@ if (count _data < 3) exitwith {};
if (count (_data select 2) < 3) exitwith {};
if (_callsign isEqualTo (_data select 2) select 2) exitwith {};
["bft_updateDeviceCallsign", [_deviceID, _callsign]] call EFUNC(common,globalEvent);
["bft_updateDeviceCallsign", [_deviceID, _callsign]] call CBA_fnc_globalEvent;

View File

@ -24,4 +24,4 @@ if (count (_data select 2) < 2) exitwith {};
if ((_elementType select 0) isEqualTo (_data select 2) select 0) exitwith {};
if ((_elementType select 1) isEqualTo (_data select 2) select 1) exitwith {};
["bft_updateDeviceElementType", [_deviceID, _elementType]] call EFUNC(common,globalEvent);
["bft_updateDeviceElementType", [_deviceID, _elementType]] call CBA_fnc_globalEvent;

View File

@ -23,4 +23,4 @@ if (count _data < 3) exitwith {};
if (count (_data select 2) < 4) exitwith {};
if (_groupID isEqualTo (_data select 2) select 3) exitwith {};
["bft_updateDeviceGroup", [_deviceID, _groupID]] call EFUNC(common,globalEvent);
["bft_updateDeviceGroup", [_deviceID, _groupID]] call CBA_fnc_globalEvent;

View File

@ -23,4 +23,4 @@ if (count _data < 2) exitwith {};
if (count (_data select 1) < 2) exitwith {};
if (_keys isEqualTo (_data select 1) select 1) exitwith {};
["bft_updateDeviceKeys", [_deviceID, _keys]] call EFUNC(common,globalEvent);
["bft_updateDeviceKeys", [_deviceID, _keys]] call CBA_fnc_globalEvent;

View File

@ -22,4 +22,4 @@ _data = [_deviceID] call FUNC(getDeviceData);
if (count _data < 6) exitwith {};
if (_newOwner isEqualTo (_data select 5)) exitwith {};
["bft_updateDeviceOwner", [_deviceID, _newOwner]] call EFUNC(common,globalEvent);
["bft_updateDeviceOwner", [_deviceID, _newOwner]] call CBA_fnc_globalEvent;

View File

@ -16,4 +16,4 @@
params ["_varName", "_dataID"];
["bft_syncedArrayDelete", [_varName, _dataID]] call EFUNC(common,globalEvent);
["bft_syncedArrayDelete", [_varName, _dataID]] call CBA_fnc_globalEvent;

View File

@ -18,4 +18,4 @@ params ["_varName", "_data"];
if (typeName _data == "ARRAY" && {(count _data == 0)}) exitwith {};
["bft_syncedArrayPushback", [_varName, _data]] call EFUNC(common,globalEvent);
["bft_syncedArrayPushback", [_varName, _data]] call CBA_fnc_globalEvent;

View File

@ -18,4 +18,4 @@ params ["_varName", "_data"];
if (typeName _data == "ARRAY" && (count _data == 0)) exitwith {};
["bft_syncedArrayUpdate", _this] call EFUNC(common,globalEvent);
["bft_syncedArrayUpdate", _this] call CBA_fnc_globalEvent;

View File

@ -22,12 +22,12 @@ params ["_keys", "_add"];
if (isNil "_add") then {
if !(GVAR(registeredEncyptionKeys) isEqualTo _keys) then {
GVAR(registeredEncyptionKeys) = _keys;
["bft_registeredEncryptionKeysChanged", [_keys,nil]] call EFUNC(common,localEvent);
["bft_registeredEncryptionKeysChanged", [_keys,nil]] call CBA_fnc_localEvent;
};
} else {
private ["_changed"];
_changed = false;
if (_add) then {
// figure out the real difference
_keys = _keys - GVAR(registeredEncyptionKeys);
@ -44,8 +44,8 @@ if (isNil "_add") then {
};
};
if (_changed) then {
["bft_registeredEncryptionKeysChanged", [_keys,_add]] call EFUNC(common,localEvent);
["bft_registeredEncryptionKeysChanged", [_keys,_add]] call CBA_fnc_localEvent;
};
};
true
true

View File

@ -22,12 +22,12 @@ params ["_modes", "_add"];
if (isNil "_add") then {
if !(GVAR(registeredViewModes) isEqualTo _modes) then {
GVAR(registeredViewModes) = _modes;
["bft_registeredModeChanged", [_modes,nil]] call EFUNC(common,localEvent);
["bft_registeredModeChanged", [_modes,nil]] call CBA_fnc_localEvent;
};
} else {
private ["_changed"];
_changed = false;
if (_add) then {
// figure out the real difference
_modes = _modes - GVAR(registeredViewModes);
@ -44,8 +44,8 @@ if (isNil "_add") then {
};
};
if (_changed) then {
["bft_registeredModeChanged", [_modes,_add]] call EFUNC(common,localEvent);
["bft_registeredModeChanged", [_modes,_add]] call CBA_fnc_localEvent;
};
};
true
true

View File

@ -39,7 +39,7 @@ _matchedIDs = [];
if (!(_magId in GVAR(pendingIdAssignmentList))) then {
_magazine = (magazines _unit) select _forEachIndex;
if (getText (configFile >> "CfgMagazines" >> _magazine >> QGVAR(type)) != "") then {
["bft_itemCreated", [_unit, getText (configFile >> "CfgMagazines" >> _magazine >> QGVAR(type)), _magazine, _magID]] call EFUNC(common,serverEvent);
["bft_itemCreated", [_unit, getText (configFile >> "CfgMagazines" >> _magazine >> QGVAR(type)), _magazine, _magID]] call CBA_fnc_serverEvent;
};
};
};
@ -49,7 +49,7 @@ _unMatchedDevices = _ownedDevices - _matchedIDs;
{
systemChat format["validate - no longer has ID: %1 %2", _unit, _x];
diag_log format["validate - no longer has ID: %1 %2", _unit, _x];
["bft_updateDeviceOwner", [_x, objNull]] call EFUNC(common,globalEvent);
["bft_updateDeviceOwner", [_x, objNull]] call CBA_fnc_globalEvent;
systemChat format["Dropped a bft device: %1 - %2", _unit, _X];
diag_log format["Dropped a bft device: %1 - %2", _unit, _X];
} forEach _unMatchedDevices;

View File

@ -27,7 +27,7 @@ systemChat format["VehicleInit devices: %1",_device];
diag_log format["VehicleInit devices: %1",_device];
if (isClass (configFile >> "ACE_BFT" >> "Devices" >> _device)) then {
["bft_itemCreated", [_vehicle, _device, "", format["%1/%2",_vehicle, _device], STATE_OFFLINE]] call EFUNC(common,serverEvent);
["bft_itemCreated", [_vehicle, _device, "", format["%1/%2",_vehicle, _device], STATE_OFFLINE]] call CBA_fnc_serverEvent;
};
true

View File

@ -1,5 +1,5 @@
class CfgWeapons {
class InventoryItem_Base_F;
class CBA_MiscItem_ItemInfo;
class EGVAR(bft_devices,ItemCore);
// DK10 BLUFOR
@ -8,7 +8,7 @@ class CfgWeapons {
displayName = CSTRING(DK10_itemName_b);
model = QUOTE(PATHTOF(data\DK10.p3d));
picture = QUOTE(PATHTOF(UI\inventory\DK10_icon.paa));
class ItemInfo: InventoryItem_Base_F {
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 40;
};
EGVAR(bft,deviceType) = "DK10_b";

View File

@ -1,5 +1,5 @@
class CfgWeapons {
class InventoryItem_Base_F;
class CBA_MiscItem_ItemInfo;
class EGVAR(bft_devices,ItemCore);
// GD300 BLUFOR
@ -8,7 +8,7 @@ class CfgWeapons {
displayName = CSTRING(GD300_itemName_b);
model = QUOTE(PATHTOF(data\GD300.p3d));
picture = QUOTE(PATHTOF(UI\inventory\GD300_icon.paa));
class ItemInfo: InventoryItem_Base_F {
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 5;
};
EGVAR(bft,deviceType) = "GD300_b";

View File

@ -1,9 +1,9 @@
class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
class CBA_MiscItem_ItemInfo;
class GVAR(ItemCore): ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
author = ECSTRING(common,ACETeam);
scope = 2;
// cannot do ItemGPS as long as we do have to use magazines for unique items
// simulation = "ItemGPS";
@ -27,12 +27,12 @@ class CfgWeapons {
};*/
class ACE_HelmetCam: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
author = ECSTRING(common,ACETeam);
descriptionShort = CSTRING(HelmetCam_itemDescription);
displayName = CSTRING(HelmetCam_itemName);
picture = QUOTE(PATHTOF(UI\inventory\HelmetCam_icon.paa));
scope = 2;
class ItemInfo: InventoryItem_Base_F {
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 4;
};
};

View File

@ -44,23 +44,23 @@ GVAR(UAVlist) = [];
GVAR(hCamList) = [];
// Define default settings for interface property groups
GVAR(settings) = HASH_CREATE;
GVAR(settings) = [] call CBA_fnc_hashCreate;
private ["_tempHash"];
// COMMON settings
_tempHash = HASH_CREATE;
HASH_SET(_tempHash,"mode","BFT");
HASH_SET(_tempHash,"mapScaleMin",0.1);
HASH_SET(_tempHash,"mapScaleMax",2 ^ round(sqrt(GVAR(worldSize) / 1024)));
HASH_SET(GVAR(settings),"COMMON",_tempHash);
_tempHash = [] call CBA_fnc_hashCreate;
[_tempHash, "mode", "BFT"] call CBA_fnc_hashSet;
[_tempHash, "mapScaleMin", 0.1] call CBA_fnc_hashSet;
[_tempHash, "mapScaleMax", 2 ^ round(sqrt(GVAR(worldSize) / 1024))] call CBA_fnc_hashSet;
[GVAR(settings), "COMMON", _tempHash] call CBA_fnc_hashSet;
// when main map is opened, close any open interface
["visibleMapChanged",{
["visibleMap",{
params ["", "_mapIsVisible"];
if (_mapIsVisible) then {
[] call FUNC(ifClose);
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addPlayerEventHandler;
#include "initKeybinds.sqf"

View File

@ -22,6 +22,6 @@ GVAR(mapScaleFactor) = GVAR(worldSize) / 2666.65;
// still need to figure out if this is really required and how I actually got to this number (too long ago!)
GVAR(mapScaleFactor) = GVAR(worldSize) / 2666.65;
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
ADDON = true;

View File

@ -26,7 +26,7 @@ private _configToHash = {
params ["_config"];
private _configProperties = configProperties [_config];
private _configHash = HASH_CREATE;
private _configHash = [] call CBA_fnc_hashCreate;
{
private _key = configName _x;
@ -47,7 +47,7 @@ private _configToHash = {
nil
};
if !(isNil "_value") then {
HASH_SET(_configHash,_key,_value);
[_configHash, _key, _value] call CBA_fnc_hashSet;
};
} forEach _configProperties;

View File

@ -33,22 +33,23 @@ private ["_property"];
params ["_interfaceID", ["_property", ""]];
// Fetch common and device specific property hashes
private _commonProperties = HASH_GET(GVAR(settings),"COMMON");
private _deviceAppData = HASH_GET(GVAR(settings),_interfaceID);
private _commonProperties = [GVAR(settings), "COMMON"] call CBA_fnc_hashGet;
private _deviceAppData = [GVAR(settings), _interfaceID] call CBA_fnc_hashGet;
// Return value of requested property
if (_property != "") exitWith {
private _value = HASH_GET(_deviceAppData,_property);
private _value = [_deviceAppData, _property] call CBA_fnc_hashGet;
if (isNil "_value") then {
_value = HASH_GET(_commonProperties,_property);
_value = [_commonProperties, _property] call CBA_fnc_hashGet;
};
if (isNil "_value") then {nil} else {_value}
};
// Return list of all property hashes
private _combinedProperties = +_commonProperties;
systemChat format ["Device app data %1", _deviceAppData];
{
HASH_SET(_combinedProperties,_x,(_deviceAppData select 1) select _forEachIndex);
} forEach (_deviceAppData select 0);
[_combinedProperties, _x, (_deviceAppData select 2) select _forEachIndex] call CBA_fnc_hashSet;
} forEach (_deviceAppData select 1);
_combinedProperties

View File

@ -25,8 +25,9 @@
// ignore function call if the interface has not finished setup
if (GVAR(ifOpenStart) || I_CLOSED) exitWith {true};
params ["_function"];
_function params ["_control", "_selectedIndex"];
params ["_function", "_controlArguments"];
_controlArguments params ["_control", "_selectedIndex"];
systemChat format ["this %1 _control %2 _selectedIndex %3", _this, _control, _selectedIndex];
private _display = ctrlParent _control;
private _interfaceID = I_GET_ID;

View File

@ -28,10 +28,10 @@ uiNamespace setVariable [I_GET_NAME, _display];
private _mapTypes = [I_GET_ID,"mapTypes"] call FUNC(getSettings);
{
0 = [_display displayCtrl _x] call EFUNC(bft_drawing,doBFTDraw);
} count (_mapTypes select 1);
} count (_mapTypes select 2);
// send "bft_deviceOpened" event
["bft_deviceOpened",[I_GET_DEVICE]] call EFUNC(common,localEvent);
["bft_deviceOpened",[I_GET_DEVICE]] call CBA_fnc_localEvent;
GVAR(ifOpenStart) = false;

View File

@ -42,9 +42,9 @@ if !(I_CLOSED) then {
if (!isNil "_playerKilledEhId") then {_player removeEventHandler ["killed",_playerKilledEhId]};
if (!isNil "_vehicleGetOutEhId") then {_vehicle removeEventHandler ["GetOut",_vehicleGetOutEhId]};
if (!isNil "_draw3dEhId") then {removeMissionEventHandler ["Draw3D",_draw3dEhId]};
if (!isNil "_aceUnconciousEhId") then {["medical_onUnconscious",_aceUnconciousEhId] call EFUNC(common,removeEventHandler)};
if (!isNil "_aceUpdateDeviceOwnerEhId") then {["bft_updateDeviceOwner",_aceUpdateDeviceOwnerEhId] call EFUNC(common,removeEventHandler)};
if (!isNil "_acePlayerChangedEhId") then {["playerChanged",_acePlayerChangedEhId] call EFUNC(common,removeEventHandler)};
if (!isNil "_aceUnconciousEhId") then {["medical_onUnconscious",_aceUnconciousEhId] call CBA_fnc_removeEventHandler};
if (!isNil "_aceUpdateDeviceOwnerEhId") then {["bft_updateDeviceOwner",_aceUpdateDeviceOwnerEhId] call CBA_fnc_removeEventHandler};
if (!isNil "_acePlayerChangedEhId") then {["playerChanged",_acePlayerChangedEhId] call CBA_fnc_removeEventHandler};
// remove notification system related PFHs
if !(isNil QGVAR(processNotificationsPFH)) then {
@ -56,7 +56,7 @@ if !(I_CLOSED) then {
if (!GVAR(ifOpenStart)) then {
if (_isDialog) then {
// convert mapscale to km
_mapScale = GVAR(mapScale) * GVAR(mapScaleFactor) / 0.86 * (safezoneH * 0.8);
private _mapScale = GVAR(mapScale) * GVAR(mapScaleFactor) / 0.86 * (safezoneH * 0.8);
// get the current position of the background control
private _backgroundPosition = [_displayName] call FUNC(getBackgroundPosition);
@ -84,11 +84,11 @@ if !(I_CLOSED) then {
// if the device is a personal device, save settings to device appData store
if (_deviceOwner isKindOf "ParachuteBase" || _deviceOwner isKindOf "CAManBase") then {
[_deviceID,[-1,HASH_GET(GVAR(settings),_interfaceID)]] call EFUNC(bft,handleUpdateDeviceAppData);
[_deviceID,[-1, [GVAR(settings),_interfaceID] call CBA_fnc_hashGet]] call EFUNC(bft,handleUpdateDeviceAppData);
};
// send "bft_deviceClosed" event
["bft_deviceClosed",[_deviceID]] call EFUNC(common,localEvent);
["bft_deviceClosed",[_deviceID]] call CBA_fnc_localEvent;
uiNamespace setVariable [_displayName, displayNull];
GVAR(ifOpen) = nil;

View File

@ -135,7 +135,7 @@ GVAR(ifOpen) set [11,
if (_this select 0 == ACE_player && _this select 1) then {
[] call FUNC(ifClose);
};
}] call EFUNC(common,addEventHandler)
}] call CBA_fnc_addEventHandler
];
// Register with ACE bft_updateDeviceOwner event
@ -145,14 +145,12 @@ GVAR(ifOpen) set [12,
if ((_this select 0 == I_GET_DEVICE) && (_this select 1 != ACE_player)) then {
[] call FUNC(ifClose);
};
}] call EFUNC(common,addEventHandler)
}] call CBA_fnc_addEventHandler
];
// Register with ACE playerChanged event
GVAR(ifOpen) set [13,
["playerChanged",{
_this call FUNC(onPlayerChanged);
}] call EFUNC(common,addEventHandler)
["unit", FUNC(onPlayerChanged)] call CBA_fnc_addPlayerEventHandler
];
// get device owner
@ -163,15 +161,15 @@ private _deviceAppData = D_GET_APP_DATA(_deviceData);
// if the device is a personal device, get settings from device appData store
if (!(_deviceAppData isEqualTo []) && (_deviceOwner isKindOf "ParachuteBase" || _deviceOwner isKindOf "CAManBase")) then {
// write settings to local cache
HASH_SET(GVAR(settings),_interfaceID,_deviceAppData);
[GVAR(settings), _interfaceID, _deviceAppData] call CBA_fnc_hashSet;
} else {
// if vehicle device, see if device app data is already cached, if not, retrieve from config
if !(HASH_HASKEY(GVAR(settings),_interfaceID)) then {
if !([GVAR(settings), _interfaceID] call CBA_fnc_hashHasKey) then {
// read from config
_deviceAppData = [_interfaceConfigName] call FUNC(getInterfaceSettingsFromConfig);
// write to cache
HASH_SET(GVAR(settings),_interfaceID,_deviceAppData);
[GVAR(settings), _interfaceID, _deviceAppData] call CBA_fnc_hashSet;
};
};

View File

@ -44,7 +44,7 @@ if (isNil "_settings") then {
_interfaceInit = true;
};
private _mode = HASH_GET(_settings,"mode");
private _mode = [_settings, "mode"] call CBA_fnc_hashGet;
if (isNil "_mode") then {
_mode = [_interfaceID,"mode"] call FUNC(getSettings);
// do not show "Loading" control since we are not switching modes
@ -59,7 +59,7 @@ if (isNil "_mode") then {
{
call {
private _value = (_settings select 1) select _forEachIndex;
private _value = (_settings select 2) select _forEachIndex;
if (isNil "_value") exitWith {};
// ------------ DISPLAY POSITION ------------
@ -139,7 +139,7 @@ if (isNil "_mode") then {
// call brightness adjustment if this is outside of interface init
if (!_interfaceInit) then {
private _brightness = [_interfaceID,"brightness"] call FUNC(getSettings);
HASH_SET(_settings,"brightness",_brightness);
[_settings, "brightness", _brightness] call CBA_fnc_hashSet;
};
};
};
@ -197,7 +197,7 @@ if (isNil "_mode") then {
if (_mode == "BFT") exitWith {
private _mapTypes = [_interfaceID,"mapTypes"] call FUNC(getSettings);
private _mapType = [_interfaceID,"mapType"] call FUNC(getSettings);
private _mapIDC = HASH_GET(_mapTypes,_mapType);
private _mapIDC = [_mapTypes, _mapType] call CBA_fnc_hashGet;
_displayItemsToShow pushBack _mapIDC;
@ -222,9 +222,9 @@ if (isNil "_mode") then {
if (!_interfaceInit) then {
if (_isDialog) then {
private _mapScale = [_interfaceID,"mapScaleDlg"] call FUNC(getSettings);
HASH_SET(_settings,"mapScaleDlg",_mapScale);
[_settings, "mapScaleDlg", _mapScale] call CBA_fnc_hashSet;
private _mapWorldPos = [_interfaceID,"mapWorldPos"] call FUNC(getSettings);
HASH_SET(_settings,"mapWorldPos",_mapWorldPos);
[_settings, "mapWorldPos", _mapWorldPos] call CBA_fnc_hashSet;
};
};
};
@ -233,7 +233,7 @@ if (isNil "_mode") then {
private _mapTypes = [_interfaceID,"mapTypes"] call FUNC(getSettings);
if (count _mapTypes > 1) then {
private _targetMapName = [_interfaceID,"mapType"] call FUNC(getSettings);
private _targetMapIDC = HASH_GET(_mapTypes,_targetMapName);
private _targetMapIDC = [_mapTypes, _targetMapName] call CBA_fnc_hashGet;
_targetMapCtrl = _display displayCtrl _targetMapIDC;
// If we find the map to be shown, we are switching away from BFT. Lets save map scale and position
@ -250,10 +250,10 @@ if (isNil "_mode") then {
IDC_UAVMAP
];
_btnActCtrl ctrlSetTooltip "View Gunner Optics";
HASH_SET(_settings,"uavListUpdate",true);
[_settings, "uavListUpdate", true] call CBA_fnc_hashSet;
if (!_interfaceInit) then {
private _uav = [_interfaceID,"uavCam"] call FUNC(getSettings);
HASH_SET(_settings,"uavCam",_uav);
[_settings, "uavCam", _uav] call CBA_fnc_hashSet;
};
};
// ---------- HELMET CAM -----------
@ -263,10 +263,10 @@ if (isNil "_mode") then {
IDC_HCAMMAP
];
_btnActCtrl ctrlSetTooltip "Toggle Fullscreen";
HASH_SET(_settings,"hCamListUpdate",true);
[_settings, "hCamListUpdate", true] call CBA_fnc_hashSet;
if (!_interfaceInit) then {
private _hCam = [_interfaceID,"hCam"] call FUNC(getSettings);
HASH_SET(_settings,"hCam",_hCam);
[_settings, "hCam", _hCam] call CBA_fnc_hashSet;
};
};
// ---------- MESSAGING -----------
@ -295,10 +295,10 @@ if (isNil "_mode") then {
IDC_GROUP_HCAM,
IDC_HCAMMAP
];
HASH_SET(_settings,"hCamListUpdate",true);
[_settings, "hCamListUpdate", true] call CBA_fnc_hashSet;
if (!_interfaceInit) then {
private _hCam = [_interfaceID,"hCam"] call FUNC(getSettings);
HASH_SET(_settings,"hCam",_hCam);
[_settings, "hCam", _hCam] call CBA_fnc_hashSet;
};
};
_btnActCtrl ctrlSetTooltip "Toggle Fullscreen";
@ -365,19 +365,19 @@ if (isNil "_mode") then {
// ------------ MAP TYPE ------------
if (_x == "mapType") exitWith {
private _mapTypes = [_interfaceID,"mapTypes"] call FUNC(getSettings);
if ((count (_mapTypes select 0) > 1) && (_mode == "BFT")) then {
if ((count (_mapTypes select 1) > 1) && (_mode == "BFT")) then {
private _targetMapName = _value;
private _targetMapIDC = HASH_GET(_mapTypes,_targetMapName);
private _targetMapIDC = [_mapTypes, _targetMapName] call CBA_fnc_hashGet;
_targetMapCtrl = _display displayCtrl _targetMapIDC;
if (!_interfaceInit && _isDialog) then {
private _previousMapCtrl = controlNull;
{
private _previousMapIDC = (_mapTypes select 1) select _forEachIndex;
private _previousMapIDC = (_mapTypes select 2) select _forEachIndex;
_previousMapCtrl = _display displayCtrl _previousMapIDC;
if (ctrlShown _previousMapCtrl) exitWith {};
_previousMapCtrl = controlNull;
} forEach (_mapTypes select 0);
} forEach (_mapTypes select 1);
// See if _targetMapCtrl is already being shown
if ((!ctrlShown _targetMapCtrl) && (_targetMapCtrl != _previousMapCtrl)) then {
// Update _targetMapCtrl to scale and position of _previousMapCtrl
@ -389,9 +389,9 @@ if (isNil "_mode") then {
// Hide all unwanted map types
{
if (_x != _targetMapName) then {
(_display displayCtrl ((_mapTypes select 1) select _forEachIndex)) ctrlShow false;
(_display displayCtrl ((_mapTypes select 2) select _forEachIndex)) ctrlShow false;
};
} forEach (_mapTypes select 0);
} forEach (_mapTypes select 1);
// Update OSD element if it exists
private _osdCtrl = _display displayCtrl IDC_OSD_MAP_TGGL;
@ -550,14 +550,14 @@ if (isNil "_mode") then {
};
// ----------------------------------
};
} forEach (_settings select 0);
} forEach (_settings select 1);
// update scale and world position if we have to. If so, fill in the blanks and make the changes
if ((!isNil "_targetMapScale") || (!isNil "_targetMapWorldPos")) then {
if (isNull _targetMapCtrl) then {
private _targetMapName = [_interfaceID,"mapType"] call FUNC(getSettings);
private _mapTypes = [_interfaceID,"mapTypes"] call FUNC(getSettings);
private _targetMapIDC = HASH_GET(_mapTypes,_targetMapName);
private _targetMapIDC = [_mapTypes, _targetMapName] call CBA_fnc_hashGet;
_targetMapCtrl = _display displayCtrl _targetMapIDC;
};
if (isNil "_targetMapScale") then {
@ -581,7 +581,7 @@ if (!isNull _loadingCtrl) then {
// delay moving the mouse cursor by one frame, for some reason its not working without
[{
setMousePosition _this;
},_mousePos] call EFUNC(common,execNextFrame);
},_mousePos] call CBA_fnc_execNextFrame
};
_loadingCtrl ctrlShow false;

View File

@ -33,13 +33,15 @@ if (isNil QGVAR(processNotificationsPFH) && !(I_CLOSED) && count GVAR(notificati
// run every 4 seconds
GVAR(processNotificationsPFH) = [{
params ["_args", "_idPFH"];
systemChat format ["args %1", _args];
_args params ["_ctrl"];
if !(I_CLOSED) then {
if (count GVAR(notificationCache) != 0) then {
// grab and delete the oldest notification
systemChat format ["notification %1", GVAR(notificationCache)];
private _notification = GVAR(notificationCache) deleteAt 0;
_notification params ["_ctrl", "_time1", "_time2", "_decayTime", "_counter"];
_notification params ["_type", "_time1", "_time2", "_decayTime", "_counter"];
private _currentTime = [] call FUNC(currentTime);
// see if notification was issued in the same minute, if so, omit showing the time
@ -49,7 +51,7 @@ if (isNil QGVAR(processNotificationsPFH) && !(I_CLOSED) && count GVAR(notificati
if (_counter > 1) then {
_text = format ["%1 (x%2)",_text,_counter];
};
systemChat format ["%1 ctrlsettext %2", _type, _text];
// show the notification
_ctrl ctrlSetText _text;
// make the control visible (it might have had its fade set to 1 before)

View File

@ -23,7 +23,7 @@ disableSerialization;
params ["_displayName", "_offset"];
_offset params ["_xOffset", "_yOffset"];
systemChat format ["offset %1 %2", _xOffset, _yOffset];
private _display = uiNamespace getVariable _displayName;
private _isDialog = I_GET_ISDIALOG;

View File

@ -31,44 +31,44 @@
params ["_interfaceID", "_properties", ["_updateInterface", true], ["_forceInterfaceUpdate", false] ];
private _commonProperties = HASH_GET(GVAR(settings),"COMMON");
private _deviceAppData = HASH_GET(GVAR(settings),_interfaceID);
private _commonProperties = [GVAR(settings), "COMMON"] call CBA_fnc_hashGet;
private _deviceAppData = [GVAR(settings), _interfaceID] call CBA_fnc_hashGet;
// Write multiple property pairs. If they exist in _deviceAppData, write them there, else write them to COMMON. Only write if they exist and have changed.
private _commonPropertiesUpdate = HASH_CREATE;
private _combinedPropertiesUpdate = HASH_CREATE;
private _commonPropertiesUpdate = [] call CBA_fnc_hashCreate;
private _combinedPropertiesUpdate = [] call CBA_fnc_hashCreate;
{
private _key = _x select 0;
private _value = _x select 1;
call {
private _currentValue = HASH_GET(_deviceAppData,_key);
private _currentValue = [_deviceAppData, _key] call CBA_fnc_hashGet;
if (!isNil "_currentValue") exitWith {
call {
if !(_currentValue isEqualTo _value) exitWith {
HASH_SET(_combinedPropertiesUpdate,_key,_value);
HASH_SET(_deviceAppData,_key,_value);
[_combinedPropertiesUpdate,_key,_value] call CBA_fnc_hashSet;
[_deviceAppData, _key, _value] call CBA_fnc_hashSet;
};
if (_forceInterfaceUpdate) then {
HASH_SET(_combinedPropertiesUpdate,_key,_value);
[_combinedPropertiesUpdate, _key, _value] call CBA_fnc_hashSet;
};
};
};
_currentValue = HASH_GET(_commonProperties,_key);
_currentValue = [_commonProperties, _key] call CBA_fnc_hashGet;
if (!isNil "_currentValue") then {
call {
if !(_currentValue isEqualTo _value) then {
HASH_SET(_commonPropertiesUpdate,_key,_value);
HASH_SET(_commonProperties,_key,_value);
[_commonPropertiesUpdate, _key, _value] call CBA_fnc_hashSet;
[_commonProperties, _key, _value] call CBA_fnc_hashSet;
};
if (_forceInterfaceUpdate) then {
HASH_SET(_commonPropertiesUpdate,_key,_value);
[_commonPropertiesUpdate, _key, _value] call CBA_fnc_hashSet;
};
};
};
};
} forEach _properties;
HASH_SET(GVAR(settings),_interfaceID,_deviceAppData);
HASH_SET(GVAR(settings),"COMMON",_commonProperties);
[GVAR(settings), _interfaceID, _deviceAppData] call CBA_fnc_hashSet;
[GVAR(settings), "COMMON", _commonProperties] call CBA_fnc_hashSet;
// Finally, call an interface update for the updated properties, but only if the currently interface uses the same property group, if not, pass changed common properties only.
if (!I_CLOSED) then {
@ -83,6 +83,6 @@ if (!I_CLOSED) then {
};
};
if (_combinedPropertiesUpdate isEqualTo HASH_CREATE && _combinedPropertiesUpdate isEqualTo HASH_CREATE) exitWith {false};
if (_combinedPropertiesUpdate isEqualTo ([] call CBA_fnc_hashCreate) && {_combinedPropertiesUpdate isEqualTo ([] call CBA_fnc_hashCreate)}) exitWith {false};
true

View File

@ -20,15 +20,23 @@
params ["_interfaceID"];
private _mapTypes = [_interfaceID,"mapTypes"] call FUNC(getSettings);
_mapTypes params ["_mapTypesIndexes"];
private _mapTypesHash = [_interfaceID, "mapTypes"] call FUNC(getSettings);
private _currentMapType = [_interfaceID,"mapType"] call FUNC(getSettings);
private _currentMapTypeIndex = _mapTypesIndexes find _currentMapType;
if (_currentMapTypeIndex == count _mapTypesIndexes - 1) then {
[_interfaceID,[["mapType", _mapTypesIndexes select 0]]] call FUNC(setSettings);
private _mapTypes = _mapTypesHash select 1;
private _mapTypesIndexes = _mapTypesHash select 2;
systemChat format ["mapTypes %1", _mapTypes];
systemChat format ["mapTypesIndexes %1", _mapTypesIndexes];
private _currentMapType = [_interfaceID, "mapType"] call FUNC(getSettings);
private _currentMapTypeIndex = _mapTypes find _currentMapType;
systemChat format ["currentMapType %1", _currentMapType];
systemChat format ["currentMapIndex %1", _currentMapTypeIndex];
if (_currentMapTypeIndex == (count _mapTypesIndexes) - 1) then {
[_interfaceID, [["mapType", _mapTypes select 0]]] call FUNC(setSettings);
} else {
[_interfaceID,[["mapType", _mapTypesIndexes select (_currentMapTypeIndex + 1)]]] call FUNC(setSettings);
[_interfaceID, [["mapType", _mapTypes select (_currentMapTypeIndex + 1)]]] call FUNC(setSettings);
};
true

View File

@ -9,9 +9,9 @@ if (!hasInterface) exitWith {};
/*
// register with reporting channels when map is opened
["visibleMapChanged",{
["visibleMap",{
params ["", "_mapIsVisible"];
if (_mapIsVisible) then {
// set icon size back to default
[1] call FUNC(updateDrawSize);
@ -25,4 +25,4 @@ if (!hasInterface) exitWith {};
} else {
[false] call EFUNC(bft,updateAvailableDevicesPosition);
};
}] call EFUNC(common,addEventHandler);*/
}] call CBA_fnc_addPlayerEventHandler;*/

View File

@ -14,7 +14,7 @@ GVAR(selection) = ["",[]];
// register drawing with all main-maps (including briefing)
// ToDo: make stuff here switchable via module settings
["mapDisplayLoaded",{
["mapDisplayLoaded", {
[(_this select 0) displayCtrl 51] call FUNC(doBFTDraw);
// if we are loading the briefing screens set up encryption keys and register reporting channels
if ((_this select 1) != "Ingame") then {
@ -22,12 +22,12 @@ GVAR(selection) = ["",[]];
if (isNull (findDisplay 12)) then {
[[player] call EFUNC(bft,getEncryptionKey)] call EFUNC(bft,updateRegisteredEncryptionKeys);
[EGVAR(bft,allReportingModes)] call EFUNC(bft,updateRegisteredModes);
[true,5] call FUNC(updateAvailableDevicesPosition);
[true,5] call EFUNC(bft,updateAvailableDevicesPosition);
};
} else {
// once the main map loads in (i.e. briefing is done with), shut down the positional update loop
[false] call FUNC(updateAvailableDevicesPosition);
[false] call EFUNC(bft,updateAvailableDevicesPosition);
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
ADDON = true;

View File

@ -116,3 +116,21 @@ class RscInGameUI {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Stance')])] call CBA_fnc_localEvent;);
};
};
// map
class RscDisplayMainMap {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
};
class RscDisplayGetReady: RscDisplayMainMap {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
};
class RscDisplayServerGetReady: RscDisplayGetReady {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
};
class RscDisplayClientGetReady: RscDisplayGetReady {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
};