diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/misc/fn_getSitrep.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/misc/fn_getSitrep.sqf index c4aefeadb..d9a21a07c 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/misc/fn_getSitrep.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/misc/fn_getSitrep.sqf @@ -45,22 +45,21 @@ switch (toUpper _task) do _artyUnitLb = _display displayCtrl 655594; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; if ((lbCurSel _artyUnitLb) < 0) exitwith {}; diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyBaseButton.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyBaseButton.sqf index 6698b974a..a3141acc9 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyBaseButton.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyBaseButton.sqf @@ -2,22 +2,21 @@ private ["_display", "_artyUnitLb", "_artyArray", "_battery", "_callsign", "_cal _display = findDisplay 655555; _artyUnitLb = _display displayCtrl 655594; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; _battery = _artyArray select (lbCurSel _artyUnitLb) select 0; if (!isNil { NEO_radioLogic getVariable "NEO_radioTalkWithArty" }) then { _battery = ((NEO_radioLogic getVariable "NEO_radioTalkWithArty") getVariable "NEO_radioArtyModule") select 0 }; _callsign = _artyArray select (lbCurSel _artyUnitLb) select 2; if (!isNil { NEO_radioLogic getVariable "NEO_radioTalkWithArty" }) then { _callsign = ((NEO_radioLogic getVariable "NEO_radioTalkWithArty") getVariable "NEO_radioArtyModule") select 1 }; diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButton.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButton.sqf index fd0ee9913..22c1025af 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButton.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButton.sqf @@ -6,22 +6,21 @@ private ]; _display = findDisplay 655555; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; _audio = NEO_radioLogic getVariable format ["combatsupport_audio", true]; _artyConfirmButton = _display displayCtrl 655597; diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButtonEnable.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButtonEnable.sqf index d62b1152e..60de3c34e 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButtonEnable.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyConfirmButtonEnable.sqf @@ -5,22 +5,21 @@ private ]; _display = findDisplay 655555; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; _artyConfirmButton = _display displayCtrl 655597; _artyUnitLb = _display displayCtrl 655594; diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyMoveButtons.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyMoveButtons.sqf index 9628f0d96..df8f29eee 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyMoveButtons.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyMoveButtons.sqf @@ -5,22 +5,21 @@ _artyMoveButton = _display displayCtrl 655606; _artyDontMoveButton = _display displayCtrl 655607; _artyUnitLb = _display displayCtrl 655594; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; _battery = _artyArray select (lbCurSel _artyUnitLb) select 0; if (!isNil { NEO_radioLogic getVariable "NEO_radioTalkWithArty" }) then { _battery = ((NEO_radioLogic getVariable "NEO_radioTalkWithArty") getVariable "NEO_radioArtyModule") select 0 }; diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyOrdLbSelChanged.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyOrdLbSelChanged.sqf index 83d8246d8..3188db620 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyOrdLbSelChanged.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyOrdLbSelChanged.sqf @@ -5,22 +5,21 @@ private "_battery", "_ord", "_count", "_countArray" ]; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; _display = findDisplay 655555; _artyOrdnanceTypeLb = _this select 0; diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyUnitLbSelChanged.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyUnitLbSelChanged.sqf index a75f94565..9928fdce9 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyUnitLbSelChanged.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/arty/fn_artyUnitLbSelChanged.sqf @@ -10,22 +10,21 @@ private "_supportMarker", "_artyMarkers", "_battery", "_status", "_class", "_ord" ]; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; _artyUnitLb = _display displayCtrl 655594; _artyUnitText = _display displayCtrl 655595; diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioLbSelChanged.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioLbSelChanged.sqf index e0f2ee8cb..0ff94acb9 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioLbSelChanged.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioLbSelChanged.sqf @@ -173,22 +173,21 @@ switch (toUpper (_lb lbText _index)) do { - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; if ((count _artyArray > 0) && (isNil { NEO_radioLogic getVariable "NEO_radioTalkWithPilot" })) then diff --git a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioOnLoad.sqf b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioOnLoad.sqf index 91a0523e5..266574d6f 100644 --- a/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioOnLoad.sqf +++ b/addons/sup_combatsupport/scripts/NEO_radio/functions/ui/fn_radioOnLoad.sqf @@ -46,22 +46,21 @@ _available = []; _transportArray = NEO_radioLogic getVariable format ["NEO_radioTrasportArray_%1", playerSide]; _casArray = NEO_radioLogic getVariable format ["NEO_radioCasArray_%1", playerSide]; - private ["_artyArray","_count"]; - _newArtyArray = []; + _has_SPE_leFH18 = false; + { + if(_x select 1 == "SPE_leFH18") then { + _has_SPE_leFH18 = true; + } + } forEach SUP_ARTYARRAYS; + _artyArray = []; - _count = 0; - { - _thisPlayerSide = playerSide; - if (_x find "SPE_leFH18" != -1) then { - if (playerSide != WEST) then { - _thisPlayerSide = WEST; - }; - }; - _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", _thisPlayerSide]); - _newArtyArray append ([_artyArray select _count]); - _count = _count +1; - } forEach SUP_ARTYARRAYS; - _artyArray = _newArtyArray; + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", playerSide]); + + if (_has_SPE_leFH18) then { + if (playerSide != WEST) then { + _artyArray append (NEO_radioLogic getVariable format ["NEO_radioArtyArray_%1", WEST]); + }; + }; //Available Supports if (count _transportArray > 0) then { _available pushback (["TRANSPORT", "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\transport_ca.paa"]) };