Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add ACE Name support #210

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/nametags/functions/fnc_cacheLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private _rankNamesHashMap = GVAR(RankNames) get GVAR(rankNameStyle);

{
if (alive _x) then {
_x setVariable [QGVAR(name), _x getVariable [QEGVAR(main,customName), name _x]];
_x setVariable [QGVAR(name), _x getVariable [QEGVAR(main,customName), _x getVariable ["ACE_Name", name _x]]];
_x setVariable [QGVAR(groupName), _x getVariable [QGVAR(customGroup), groupID (group _x)]];
_x setVariable [QGVAR(side), side group _x];
private _rank = rank _x;
Expand Down
4 changes: 2 additions & 2 deletions addons/radar/functions/fnc_cacheLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private _circleRange = diwako_dui_compassRange;

private _unit = _x;
private _selected = "";
if ((count _selectedUnits) > 0 && {_unit isNotEqualTo _player}) then {
if (_selectedUnits isNotEqualTo [] && {_unit isNotEqualTo _player}) then {
private _curName = vehicleVarName _unit;
_unit setVehicleVarName "";
private _defaultIdent = str _unit;
Expand All @@ -291,7 +291,7 @@ private _circleRange = diwako_dui_compassRange;
private _speakingIcon = ["", _speakingIcon] select (_showSpeaking && { !_replaceIconWhenSpeaking && {_isSpeaking > 0 && {_inrange || {_isSpeaking isEqualTo 2}}}});
_text = format ["<t color='%3' size='%5' shadow='%7' shadowColor='#000000' valign='middle' align='left'>%4<img image='%6'valign='bottom'/><img image='%1'valign='bottom'/> %2 <img image='%8'valign='bottom'/></t><br/>",
_icon, // 1
_unit getVariable [QEGVAR(main,customName), name _unit], // 2
_unit getVariable [QEGVAR(main,customName), _unit getVariable ["ACE_Name", name _unit]], // 2
_unit getVariable [QEGVAR(main,color),"#FFFFFF"], // 3
_selected, // 4
(_textSize * _heightMod), // 5
Expand Down
6 changes: 3 additions & 3 deletions addons/radar/functions/fnc_sortNameList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ switch (GVAR(sortType)) do {
_newGrp = _newGrp apply { _x select 1 };
};
case "fireteam": {
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] };
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _x getVariable [QEGVAR(main,customName), _x getVariable ["ACE_Name", name _x]], _x] };
_newGrp sort true;
_newGrp = _newGrp apply { _x select 2 };
};
case "fireteam2": {
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] };
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), _x getVariable ["ACE_Name", name _x]], _x] };
_newGrp sort true;
_newGrp = _newGrp apply { _x select 3 };
};
case "rank": {
_newGrp = _newGrp apply { [_nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] };
_newGrp = _newGrp apply { [_nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), _x getVariable ["ACE_Name", name _x]], _x] };
_newGrp sort true;
_newGrp = _newGrp apply { _x select 2 };
};
Expand Down