 sreV                prefix idi\acre\addons\sys_modes  CfgAcreRadioModes.hpp     )          )  CfgEventHandlers.hpp                   config.bin     Ö          Ö  fnc_checkAvailability.sqf     l          l  fnc_sc_muting.sqf     �          �  fnc_sc_speaking.sqf     {          {  fnc_sem70akw_muting.sqf     $          $  fnc_sem70akw_speaking.sqf     ’          ’  script_component.hpp     O          O  XEH_preInit.sqf     ‹           ‹   XEH_PREP.hpp     É           É   XEH_preStart.sqf     <           <                        //CfgAcreRadioModes.hpp

class CfgAcreRadioModes {
    class singleChannel {
        availability = QFUNC(sc_muting);
        speaking = QFUNC(sc_speaking);
        channelHash[] = {
            "frequencyTX",
            "frequencyRX",
            "power",
            "mode",
            "CTCSSTx",
            "CTCSSRx",
            "modulation",
            "encryption",
            "TEK",
            "trafficRate",
            "syncLength"
        };
    };

    class sem70AKW {
        availability = QFUNC(sem70akw_muting);
        speaking = QFUNC(sem70akw_speaking);
        channelHash[] = {
            "frequencies",
            "frequencyTX",
            "frequencyRX",
            "power",
            "mode",
            "networkID"
        };
    };

    class singleChannelPRR {
        availability = QFUNC(sc_muting);
        speaking = QFUNC(sc_speaking);
        channelHash[] = {
            "frequencyTX",
            "frequencyRX",
            "power",
            "mode"
        };
    };
};
class Extended_PreStart_EventHandlers {
    class ADDON {
        init = QUOTE(call COMPILE_FILE(XEH_preStart));
    };
};

class Extended_PreInit_EventHandlers {
    class ADDON {
        init = QUOTE(call COMPILE_FILE(XEH_preInit));
    };
};
 raP       Ò    CfgPatches ‚    Extended_PreStart_EventHandlers Ÿ   Extended_PreInit_EventHandlers    CfgAcreRadioModes †    acre_sys_modes ˜    
 name ACRE2 - Modes units  weapons  requiredVersion ®G@requiredAddons  acre_main  acre_sys_data  acre_sys_radio  acre_sys_core  author $STR_acre_main_Author  url $STR_acre_main_URL version š™9@ versionStr 2.9.0.1042 versionAr    	           acre_sys_modes µ    init call compile preprocessFileLineNumbers '\idi\acre\addons\sys_modes\XEH_preStart.sqf'   acre_sys_modes )    init call compile preprocessFileLineNumbers '\idi\acre\addons\sys_modes\XEH_preInit.sqf'   singleChannel ¿   sem70AKW ”   singleChannelPRR E    availability acre_sys_modes_fnc_sc_muting  speaking acre_sys_modes_fnc_sc_speaking channelHash  frequencyTX  frequencyRX  power  mode  CTCSSTx  CTCSSRx  modulation  encryption  TEK  trafficRate  syncLength   availability acre_sys_modes_fnc_sem70akw_muting  speaking acre_sys_modes_fnc_sem70akw_speaking channelHash  frequencies  frequencyTX  frequencyRX  power  mode  networkID   availability acre_sys_modes_fnc_sc_muting  speaking acre_sys_modes_fnc_sc_speaking channelHash  frequencyTX  frequencyRX  power  mode     #include "script_component.hpp"
/*
 * Author: ACRE2Team
 * Calls the mode specific availability function and there checks if two list of radios are able to communicate with each other.
 *
 * Arguments:
 * 0: First radio list <ARRAY>
 * 1: Second radio list <ARRAY>
 * 2: Quick, only check if any radio can communicate <BOOL> (optional)
 *
 * Return Value:
 * List of Radios who can communicate <ARRAY>
 *
 * Example:
 * [[ACRE_ACTIVE_RADIO], [] call acre_sys_data_fnc_getPlayerRadioList, false] call acre_sys_modes_fnc_checkAvailability
 *
 * Public: No
 */

params ["_list1", "_list2", ["_quick", true]];

private _foundRadios = [];

{
    private _matches = [];
    private _exit = false;
    private _radioId1 = _x;
    PUSH(_foundRadios, [ARR_2(_radioId1,_matches)]);
    private _radio1Data = [_radioId1, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent);
    private _mode1 = HASH_GET(_radio1Data, "mode");
    private _functionName = getText (configFile >> "CfgAcreRadioModes" >> _mode1 >> "availability");
    if (_functionName != "") then {
        private _function = missionNamespace getVariable _functionName;
        {
            private _radioId2 = _x;
            private _on = [_radioId2, "getOnOffState"] call EFUNC(sys_data,dataEvent);
            private _isAvailable = false;
            if (_on == 1) then {
                _isAvailable = [_radioId1, _radioId2] call CALLSTACK_NAMED(_function, _functionName);
                if (_isAvailable) then {
                    PUSH(_matches, _radioId2);
                };
            };
            if (_isAvailable && {_quick}) exitWith {};
        } forEach _list2;
        if (_matches isNotEqualTo []) then {
            if (_quick) then {
                _exit = true;
            };
        };
        if (_exit) exitWith { };
    };
} forEach _list1;

_foundRadios
#include "script_component.hpp"
/*
 * Author: ACRE2Team
 * Checks if two radios in singleChannel or singleChannelPRR mode can "hear" eachother
 *
 * Arguments:
 * 0: Radio ID one <STRING>
 * 1: Radio ID two <STRING>
 *
 * Return Value:
 * TRUE if match <BOOL>
 *
 * Example:
 * ["_radioId1","_radioId2"] call acre_sys_modes_fnc_sc_muting
 *
 * Public: No
 */

params ["_radioId1", "_radioId2"];

private _radioTxData = [_radioId1, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent);
private _radioRxData = [_radioId2, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent);

private _mode1 = HASH_GET(_radioTxData, "mode");
private _mode2 = HASH_GET(_radioRxData, "mode");
private _match = false;
private _modeIsSingleChannel = (_mode1 == "singleChannel") && {_mode1 == _mode2};
private _modeIsSingleChannelPRR = (_mode1 == "singleChannelPRR") && {_mode1 == _mode2};

if (_modeIsSingleChannel || {_modeIsSingleChannelPRR}) then {
    private _freq1 = HASH_GET(_radioTxData, "frequencyTX");
    private _freq2 = HASH_GET(_radioRxData, "frequencyRX");
    if (_freq1 == _freq2) then {
        _match = true;
    };
};

_match
#include "script_component.hpp"
/*
 * Author: ACRE2Team
 * Initiates the signal calculation function for a transmission between two radios. This is done on the receiving client
 *
 * Arguments:
 * 0: Transmitter <OBJECT>
 * 1: Transmitter Radio ID <STRING>
 * 2: Receiver <OBJECT>
 * 3: Receiver Radio ID <STRING>
 *
 * Return Value:
 * Signal Calculation Paramteres <ARRAY>
 *
 * Example:
 * [unit1, "_txRadioId", acre_player, "_rxRadioId"] call acre_sys_modes_fnc_sc_speaking
 *
 * Public: No
 */

params ["", "_txRadioId", "", "_rxRadioId"];

private _txData = [_txRadioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent);
private _txFreq = HASH_GET(_txData, "frequencyTX");
private _txPower = HASH_GET(_txData, "power");

private _maxSignal = [0, -993];

if (_rxRadioId != _txRadioId) then {
    _maxSignal = [_txFreq, _txPower, _rxRadioId, _txRadioId] call EFUNC(sys_signal,getSignal);
} else {
    if ((toLower _txRadioId) in ACRE_SPECTATOR_RADIOS) then {
        _maxSignal = [1, 0];
    };
};

private _return = [_txRadioId, _rxRadioId, _maxSignal select 0, _maxSignal select 1, 0];

_return
#include "script_component.hpp"
/*
 * Author: ACRE2Team
 * Checks if two radios in sem70AKW mode can "hear" eachother
 *
 * Arguments:
 * 0: Radio ID one <STRING>
 * 1: Radio ID two <STRING>
 *
 * Return Value:
 * TRUE if match <BOOL>
 *
 * Example:
 * ["_radioId1","_radioId2"] call acre_sys_modes_fnc_sem70akw_muting
 *
 * Public: No
 */

params ["_radioIdTX", "_radioIdRX"];

TRACE_1("SEM70AKWMuting", _this);

private _radioTxData = [_radioIdTX, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent);
private _radioRxData = [_radioIdRX, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent);

private _modeTX = HASH_GET(_radioTxData, "mode");
private _modeRX = HASH_GET(_radioRxData, "mode");
private _match = false;

if (_modeTX == "sem70AKW" && {_modeRX == "sem70AKW"}) then {
    private _frequenciesTX = HASH_GET(_radioTxData, "frequencies");
    private _frequenciesRX = HASH_GET(_radioRxData, "frequencies");

    if (_frequenciesTX isEqualTo _frequenciesRX) then {
        _match = true;
    };
};

_match
#include "script_component.hpp"
/*
 * Author: ACRE2Team
 * Initiates the signal calculation function for a transmission between two radios in sem70AKW mode. This is done on the receiving client
 *
 * Arguments:
 * 0: Transmitter <OBJECT>
 * 1: Transmitter Radio ID <STRING>
 * 2: Receiver <OBJECT>
 * 3: Receiver Radio ID <STRING>
 *
 * Return Value:
 * Signal Calculation Paramteres <ARRAY>
 *
 * Example:
 * [unit1, "_txRadioId", acre_player, "_rxRadioId"] call acre_sys_modes_fnc_sem70akw_speaking
 *
 * Public: No
 */

params ["", "_txRadioId", "", "_rxRadioId"];

private _txData = [_txRadioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent);
private _txFreq = HASH_GET(_txData, "frequencyTX");
private _txPower = HASH_GET(_txData, "power");

private _maxSignal = [0, -993];

if (_rxRadioId != _txRadioId) then {
    _maxSignal = [_txFreq, _txPower, _rxRadioId, _txRadioId] call EFUNC(sys_signal,getSignal);
} else {
    if ((toLower _txRadioId) in ACRE_SPECTATOR_RADIOS) then {
        _maxSignal = [1, 0];
    };
};

private _return = [_txRadioId, _rxRadioId, _maxSignal select 0, _maxSignal select 1, 0];

_return
#define COMPONENT sys_modes
#define COMPONENT_BEAUTIFIED Modes
#include "\idi\acre\addons\main\script_mod.hpp"

#ifdef DEBUG_ENABLED_SYS_MODES
    #define DEBUG_MODE_FULL
#endif

#ifdef DEBUG_SETTINGS_SYS_MODES
    #define DEBUG_SETTINGS DEBUG_SETTINGS_SYS_MODES
#endif

#include "\idi\acre\addons\main\script_macros.hpp"
#include "script_component.hpp"

ADDON = false;

PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;

ADDON = true;
/*
Single Channel with crypto
*/
PREP(sc_muting);
PREP(sc_speaking);

/*
Frequency Hopping mode on SEM70/80/90
*/
PREP(sem70akw_muting);
PREP(sem70akw_speaking);

PREP(checkAvailability);
#include "script_component.hpp"

#include "XEH_PREP.hpp"
 p7‰7‚÷%Ún@O¢å¢ñðCL