mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
46 lines
1.1 KiB
Plaintext
46 lines
1.1 KiB
Plaintext
/*
|
|
* Author: Glowbal
|
|
*
|
|
*
|
|
* Arguments:
|
|
* origin <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params ["_origin"];
|
|
|
|
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);
|
|
} forEach GVAR(deviceData);
|
|
|
|
// Alternative:
|
|
//if (count GVAR(deviceData) > 0) then {
|
|
// (owner _origin) publicVariableClient QGVAR(deviceData);
|
|
//};
|
|
|
|
{
|
|
diag_log format["handleRequestAllData: Add synced array variable: %1", _x];
|
|
private ["_varName", "_variable"];
|
|
_varName = _x;
|
|
_variable = missionNamespace getvariable [_varName, []];
|
|
|
|
{
|
|
diag_log format["handleRequestAllData: Add synced array variable (%1) value: %2", _varName, _x];
|
|
["bft_syncedArrayPushback", _origin, [_varName, _x]] call EFUNC(common,targetEvent);
|
|
} forEach _variable;
|
|
|
|
// Alternative:
|
|
//if (count _variable > 0) then {
|
|
// (owner _origin) publicVariableClient _x;
|
|
//};
|
|
} forEach GVAR(syncedArrayVariables);
|