SaveShortcutsForOutputResolutions

This commit is contained in:
2023-01-02 20:22:27 -07:00
parent d0cd52807d
commit 92288c9381
7 changed files with 252 additions and 143 deletions

View File

@ -680,4 +680,26 @@ internal abstract class MapLogic
return results;
}
internal static Dictionary<int, List<long>> GetIdToPersonKeys(Dictionary<long, List<int>> personKeyToIds)
{
Dictionary<int, List<long>> results = new();
List<long>? collection;
foreach (KeyValuePair<long, List<int>> keyValuePair in personKeyToIds)
{
foreach (int id in keyValuePair.Value)
{
if (!results.TryGetValue(id, out collection))
{
results.Add(id, new());
if (!results.TryGetValue(id, out collection))
throw new Exception();
}
if (collection.Contains(keyValuePair.Key))
continue;
collection.Add(keyValuePair.Key);
}
}
return results;
}
}