Example #1
0
 public bool Equals(PlaylistItem other)
 => ID == other?.ID &&
 BeatmapID == other.BeatmapID &&
 RulesetID == other.RulesetID &&
 Expired == other.Expired &&
 AllowedMods.SequenceEqual(other.AllowedMods) &&
 RequiredMods.SequenceEqual(other.RequiredMods);
Example #2
0
 public bool Equals(MultiplayerRoomSettings other)
 => BeatmapID == other.BeatmapID &&
 BeatmapChecksum == other.BeatmapChecksum &&
 RequiredMods.SequenceEqual(other.RequiredMods) &&
 AllowedMods.SequenceEqual(other.AllowedMods) &&
 RulesetID == other.RulesetID &&
 Name.Equals(other.Name, StringComparison.Ordinal) &&
 PlaylistItemId == other.PlaylistItemId;
        public bool IsCompatible(PathTuple <ModConfig> mod)
        {
            try
            {
                if (Task.Run(AssertGitHubOK).Result)
                {
                    string path = GitHubConfig.GetFilePath(GetModDirectory(mod));

                    if (File.Exists(path) && AllowedMods.Contains(mod.Config))
                    {
                        return(true);
                    }
                }
            }
            catch (Exception) { }

            return(false);
        }