Created GetBySteamID function for the GameRegistry

This commit is contained in:
erri120 2019-12-02 17:43:05 +01:00
parent 57c421967d
commit f4b3ba9a72
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -96,6 +96,12 @@ namespace Wabbajack.Common
return Games.Values.FirstOrDefault(g => g.NexusName == gameName.ToLower());
}
public static GameMetaData GetBySteamID(int id)
{
return Games.Values
.FirstOrDefault(g => g.SteamIDs != null && g.SteamIDs.Count > 0 && g.SteamIDs.Any(i => i == id));
}
public static IReadOnlyDictionary<Game, GameMetaData> Games = new Dictionary<Game, GameMetaData>
{
{