Commit 3e25e496 authored by rufix's avatar rufix

Allow custom short range radios

parent 36e396c6
......@@ -10,7 +10,7 @@ if (_loadConfig) then {
[QGVAR(preLoadout), [_unit, _loadout]] call CBA_fnc_localEvent;
};
_uniqueRadio = [_unit] call FUNC(getUniqueRadio);
_uniqueRadio = [_unit, _config] call FUNC(getUniqueRadio);
GVAR(overflowItems) = [];
if (_loadConfig) then {
......
#include "..\script_component.hpp"
params ["_unit"];
params ["_unit", "_config"];
private _srRadio = if (isText (_config >> "srRadio")) then {
getText (_config >> "srRadio")
} else {
if (GVAR(usesACRE)) then {"ACRE_PRC343"} else {"ItemRadio"};
};
if (_srRadio == "") exitWith {""};
switch (true) do {
case (GVAR(usesACRE)): {
{
if (_x isKindOf ["ACRE_PRC343", configFile >> "CfgWeapons"]) exitWith {_x};
"ACRE_PRC343"
if (_x isKindOf [_srRadio, configFile >> "CfgWeapons"]) exitWith {_x};
_srRadio
} forEach (items _unit);
};
case (GVAR(usesTFAR)): {
{
if (_x isKindOf ["ItemRadio", configFile >> "CfgWeapons"]) exitWith {_x};
"ItemRadio"
if (_x isKindOf [_srRadio, configFile >> "CfgWeapons"]) exitWith {_x};
_srRadio
} forEach (assignedItems _unit);
};
default {
"ItemRadio"
_srRadio
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment