Ejemplo n.º 1
0
        private void OnPlayResultDismiss(ResultsViewController resultsViewController)
        {
            if (_isPractice)
            {
                return;
            }

            var result = resultsViewController.GetPrivateField <LevelCompletionResults>("_levelCompletionResults");

            if (result.rawScore > 0)
            {
                // Actually there's no way to know if any custom modifier was applied if the user failed a song.
                var beatmap            = BeatSaberUI.LevelDetailViewController.selectedDifficultyBeatmap;
                var submissionDisabled = ScoreSubmission.WasDisabled || ScoreSubmission.Disabled || ScoreSubmission.ProlongedDisabled;
                SPHModel.SaveRecord(beatmap, result, submissionDisabled);
            }
            Refresh();

            // The user may have voted on this song.
            SPHModel.ScanVoteData();
            BeatSaberUI.ReloadSongList();
        }