public void HandleDidSelectLevel(LevelCollectionViewController sender, IPreviewBeatmapLevel level) { selectedLevel = level; selectedVideo = null; ChangeView(false); Plugin.logger.Debug("Selected Level: " + level.songName); }
// Purposefully ignore modifiers here - only 2 maps have them enabled and it doesn't make much sense to just filter to those two private static float GetHighestPP(IPreviewBeatmapLevel previewBeatmapLevel, bool ppGain) { float maxPP = 0; var id = SongDataUtils.GetHash(previewBeatmapLevel.levelID); // Check if in SDC if (SongDataCore.Plugin.Songs.Data.Songs.ContainsKey(id)) { // Loop through each diff foreach (var diff in SongDataCore.Plugin.Songs.Data.Songs[id].diffs) { var difficulty = SongDataUtils.GetBeatmapDifficulty(diff.diff); var songID = new SongID(id, difficulty); // Only go through ranked songs if (SongDataUtils.IsRankedSong(songID)) { float pp = PPUtils.CalculatePP(songID, AccLoader.instance.GetAcc(songID)); if (ppGain) { pp = PPUtils.GetPPGain(pp, songID); } maxPP = pp > maxPP ? pp : maxPP; } } return(maxPP); } return(0); }