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

Remove TMF slotting group names #426

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
3 changes: 0 additions & 3 deletions addons/common/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class Extended_Respawn_EventHandlers {
};

class Extended_DisplayLoad_EventHandlers {
class RscDisplayMultiplayerSetup {
tmf_slotting = QUOTE(_this call (uiNamespace getVariable 'FUNC(initDisplayMultiplayerSetup)'));
};
class RscDisplayDebriefing {
tmf_override_end_text = QUOTE(_this call (uiNamespace getVariable 'FUNC(initDisplayDebriefing)'));
};
Expand Down
1 change: 0 additions & 1 deletion addons/common/XEH_PREP.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ PREP(edenHideMapObjects);
PREP(hideMapObjectsInit);
PREP(getPosVisual);
PREP(initDisplayDebriefing);
PREP(initDisplayMultiplayerSetup);
PREP(testGroupsSlottingScreen);
PREP(secondsToTime);
PREP(edenDisplayFactionIcons);
66 changes: 8 additions & 58 deletions addons/common/functions/fnc_testGroupsSlottingScreen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,66 +14,16 @@

private _output = [];

// Deprecated in newer versions, replaced by CBA system
// https://github.com/CBATeam/CBA_A3/wiki/Name-Groups-in-Lobby
if ([[1,1,0]] call FUNC(checkTMFVersion)) then {
// Find groups with playableUnits
private _groups = [];
{_groups pushBackUnique (group _x);} forEach playableUnits;
{
private _desc = (_x get3DENAttribute "description") # 0;

private _outputGroups = [];
{
private _group = _x;
private _descriptions = [];
private _skip = false;
{
private _description = (_x get3DENAttribute "description") select 0;
if (_description find "@" != -1) exitWith {_skip = true};
_descriptions pushBack _description;
} forEach (units _group select {_x in playableUnits});
if (!_skip) then {
_descriptions = _descriptions apply {(/*toLower*/ _x) splitString " "};
if (count (units _group) > 1) then {
private _common = _descriptions select 0;
{
// Ensure common is not more tokens than the present description.
_common resize ((count _x) min (count _common));
for "_idx2" from 0 to (count _common -1) do {
//diag_log str [_idx2,"c",_common,"d",_descriptions];
if (_common select _idx2 != _x select _idx2) exitWith { _common resize _idx2;}
};
} forEach _descriptions;
//diag_log str ["group",_common,"d",_descriptions];
//_common = _common apply {/*toUpper*/ (_x select [0,1]) + (_x select [1])};
if (count _common == 0) then {
// No common part.
_outputGroups pushBackUnique _group;
};
};
if (_desc isEqualTo "") then {
_output pushBack [1,format ["Unit lacks role description: %1",_x]];
} else {
if !("@" in _desc) then {
_output pushBack [1,format ["Unit lacks slotting group name: %1 (should be: %1@Group Name)", _desc]];
};
} forEach _groups;

if (count _outputGroups > 0) then {
_output pushBack [1,"Some groups do not have a slotting screen name:"];
private _string = "";
{
_string = _string + ((side _x) call BIS_fnc_sideName) + " - " + groupID _x + ", ";
} forEach _outputGroups;
_output pushBack [1,format ["groups (%1): %2",count _outputGroups,_string]];
};
} else {
private _units = (playableUnits + [player]);
{
private _desc = (_x get3DENAttribute "description") # 0;

if (_desc isEqualTo "") then {
_output pushBack [1,format ["Unit lacks role description: %1",_x]];
} else {
if !("@" in _desc) then {
_output pushBack [1,format ["Unit lacks slotting group name: %1 (should be: %1@Group Name)", _desc]];
};
};
} forEach (playableUnits + [player]);
};
} forEach (playableUnits + [player] - [objNull]);

_output