123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- private ["_cTabBFTmembers","_cTabBFTgroups","_cTabBFTvehicles","_cTabUAVlist","_cTabHcamlist","_validSides","_playerEncryptionKey","_playerVehicle","_playerGroup","_updateInterface"];
- _cTabBFTmembers = [];
- _cTabBFTgroups = [];
- _cTabBFTvehicles = [];
- _cTabUAVlist = [];
- _cTabHcamlist = [];
- _validSides = call cTab_fnc_getPlayerSides;
- _playerVehicle = vehicle cTab_player;
- _playerGroup = group cTab_player;
- {
- if ((_x != cTab_player) && {[_x,["ItemcTab","ItemAndroid","ItemMicroDAGR"]] call cTab_fnc_checkGear}) then {
- 0 = _cTabBFTmembers pushBack [_x,_x call cTab_fnc_getInfMarkerIcon,"",name _x,str([_x] call CBA_fnc_getGroupIndex)];
- };
- } count units cTab_player;
- {
- if ((side _x in _validSides) && {_x != _playerGroup}) then {
- _leader = objNull;
- call {
- if ([leader _x,["ItemcTab","ItemAndroid"]] call cTab_fnc_checkGear) exitWith {_leader = leader _x;};
- {
- if ([_x,["ItemcTab","ItemAndroid"]] call cTab_fnc_checkGear) exitWith {_leader = _x;};
- } count units _x;
- };
- if !(IsNull _leader) then {
- _groupSize = count units _x;
- _sizeIcon = call {
- if (_groupSize <= 3) exitWith {"\A3\ui_f\data\map\markers\nato\group_0.paa"};
- if (_groupSize <= 9) exitWith {"\A3\ui_f\data\map\markers\nato\group_1.paa"};
- "\A3\ui_f\data\map\markers\nato\group_2.paa"
- };
- 0 = _cTabBFTgroups pushBack [_leader,"\A3\ui_f\data\map\markers\nato\b_inf.paa",_sizeIcon,groupID _x,""];
- };
- };
- } count allGroups;
- {
- if ((side _x in _validSides) && {count (crew _x) > 0} && {_x != _playerVehicle}) then {
- _groupID = "";
- _name = "";
- _customName = _x getVariable ["cTab_groupId",""];
- call {
- if !(_customName isEqualTo "") exitWith {
- _name = _customName;
- };
- if (group _x == _playerGroup) then {
- _groupID = str([_x] call CBA_fnc_getGroupIndex)
- };
- _name = groupID group _x;
- };
- _iconA = "";
- _iconB = "";
- call {
- if (_x isKindOf "MRAP_01_base_F") exitWith {_iconA = "\ClonecTab\img\b_mech_inf_wheeled.paa";};
- if (_x isKindOf "MRAP_02_base_F") exitWith {_iconA = "\ClonecTab\img\b_mech_inf_wheeled.paa";};
- if (_x isKindOf "MRAP_03_base_F") exitWith {_iconA = "\ClonecTab\img\b_mech_inf_wheeled.paa";};
- if (_x isKindOf "Wheeled_APC_F") exitWith {_iconA = "\ClonecTab\img\b_mech_inf_wheeled.paa";};
- if (_x isKindOf "Truck_F" && {getNumber (configfile >> "cfgVehicles" >> typeOf _x >> "transportSoldier") > 2}) exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_motor_inf.paa";};
- if (_x isKindOf "Truck_F") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_support.paa";};
- if (_x isKindOf "Car_F") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_motor_inf.paa";};
- if (_x isKindOf "UAV") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_uav.paa";};
- if (_x isKindOf "UAV_01_base_F") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_uav.paa";};
- if (_x isKindOf "Helicopter") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_air.paa"; _iconB = "\ClonecTab\img\icon_air_contact_ca.paa";};
- if (_x isKindOf "Plane") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_plane.paa"; _iconB = "\ClonecTab\img\icon_air_contact_ca.paa";};
- if (_x isKindOf "Tank" && {getNumber (configfile >> "cfgVehicles" >> typeOf _x >> "transportSoldier") > 6}) exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_mech_inf.paa";};
- if (_x isKindOf "MBT_01_arty_base_F") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_art.paa";};
- if (_x isKindOf "MBT_01_mlrs_base_F") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_art.paa";};
- if (_x isKindOf "MBT_02_arty_base_F") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_art.paa";};
- if (_x isKindOf "Tank") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_armor.paa";};
- if (_x isKindOf "StaticMortar") exitWith {_iconA = "\A3\ui_f\data\map\markers\nato\b_mortar.paa";};
- };
- call {
- if (_iconA isEqualTo "" && {!(_x isKindOf "Static")} && {!(_x isKindOf "StaticWeapon")}) then {_iconA = "\A3\ui_f\data\map\markers\nato\b_unknown.paa";};
- if (_iconA isEqualTo "") exitWith {};
- 0 = _cTabBFTvehicles pushBack [_x,_iconA,_iconB,_name,_groupID];
- };
- };
- } count vehicles;
- {
- if (side _x in _validSides) then {
- 0 = _cTabUAVlist pushBack _x;
- };
- } count allUnitsUav;
- {
- if (side _x in _validSides) then {
- if (headgear _x in cTab_helmetClass_has_HCam || {[_x,["ItemcTabHCam"]] call cTab_fnc_checkGear}) then {
- 0 = _cTabHcamlist pushBack _x;
- };
- };
- } count allUnits;
- _updateInterface = [];
- cTabBFTmembers = [] + _cTabBFTmembers;
- cTabBFTgroups = [] + _cTabBFTgroups;
- cTabBFTvehicles = [] + _cTabBFTvehicles;
- if !(cTabUAVlist isEqualTo _cTabUAVlist) then {
- cTabUAVlist = [] + _cTabUAVlist;
- _updateInterface pushBack ["uavListUpdate",true];
- };
- if !(cTabHcamlist isEqualTo _cTabHcamlist) then {
- cTabHcamlist = [] + _cTabHcamlist;
- _updateInterface pushBack ["hCamListUpdate",true];
- };
- if (count _updateInterface > 0) then {
- [_updateInterface] call cTab_fnc_updateInterface;
- };
- true
|