ITheme GetThemeOrDefault(Guid guid) { if (themes.TryGetValue(guid, out var theme)) { return(theme); } if (themes.TryGetValue(DefaultThemeGuid, out theme)) { return(theme); } return(AllThemes.FirstOrDefault()); }
/// <summary> Fetches a random, unlocked theme. /// This can be the same as the currently used theme. </summary> public Theme GetRandomTheme() { var unlocked = AllThemes.Where(t => t.Unlocked).ToList(); return(unlocked[RNG.Next(unlocked.Count)]); }