locally tested. adds settings, fixes removal logic

This commit is contained in:
2024-01-26 16:16:18 -08:00
parent 754d7356e1
commit 7e4af79fed
3 changed files with 101 additions and 18 deletions

View File

@@ -2,14 +2,37 @@ private _par = [["Players Awaiting Reinsert", 1.2, [1,0.64,0,1]]];
private _baseNames = (missionNamespace getVariable ["milsim_respawn_reinsertionQueue", []]) apply {_x#1};
{
private _baseName = _x;
_par pushBack [format ["Location: %1", _baseName], 1, [0,1,0,1]];
{
_par pushBack _x;
} forEach ((missionNamespace getVariable ["milsim_respawn_reinsertionQueue", []]) select {
private _peopleAtThisBase = (missionNamespace getVariable ["milsim_respawn_reinsertionQueue", []]) select {
_x#1 isEqualTo _baseName
} apply {
[name (_x#0), 0.7, [1,1,1,1]];
});
};
private _playerCountText = "";
switch (count _peopleAtThisBase) do {
case 0: {
_playerCountText = "No players";
};
case 1: {
_playerCountText = "1 player";
};
default {
_playerCountText = format ["%1 players", count _peopleAtThisBase];
};
};
_par pushBack [
format ["Location: %1 (%2)",
_baseName,
_playerCountText
],
1,
[0,1,0,1]
];
{
_par pushBack _x;
} forEach _peopleAtThisBase;
} forEach _baseNames;
_par call CBA_fnc_notify;