mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Merge branch 'master' into do_not_use_local_user_for_autoplay_score
This commit is contained in:
@ -170,7 +170,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
Retries = RestartCount,
|
||||
OnRetry = Restart,
|
||||
OnQuit = Exit,
|
||||
OnQuit = performUserRequestedExit,
|
||||
CheckCanPause = () => AllowPause && ValidForResume && !HasFailed && !RulesetContainer.HasReplayLoaded,
|
||||
Children = new[]
|
||||
{
|
||||
@ -211,7 +211,7 @@ namespace osu.Game.Screens.Play
|
||||
failOverlay = new FailOverlay
|
||||
{
|
||||
OnRetry = Restart,
|
||||
OnQuit = Exit,
|
||||
OnQuit = performUserRequestedExit,
|
||||
},
|
||||
new HotkeyRetryOverlay
|
||||
{
|
||||
@ -225,7 +225,7 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
};
|
||||
|
||||
hudOverlay.HoldToQuit.Action = Exit;
|
||||
hudOverlay.HoldToQuit.Action = performUserRequestedExit;
|
||||
hudOverlay.KeyCounter.Visible.BindTo(RulesetContainer.HasReplayLoaded);
|
||||
|
||||
RulesetContainer.IsPaused.BindTo(pauseContainer.IsPaused);
|
||||
@ -250,8 +250,16 @@ namespace osu.Game.Screens.Play
|
||||
mod.ApplyToClock(sourceClock);
|
||||
}
|
||||
|
||||
private void performUserRequestedExit()
|
||||
{
|
||||
if (!IsCurrentScreen) return;
|
||||
Exit();
|
||||
}
|
||||
|
||||
public void Restart()
|
||||
{
|
||||
if (!IsCurrentScreen) return;
|
||||
|
||||
sampleRestart?.Play();
|
||||
ValidForResume = false;
|
||||
RestartRequested?.Invoke();
|
||||
@ -280,7 +288,7 @@ namespace osu.Game.Screens.Play
|
||||
if (RulesetContainer.ReplayScore == null)
|
||||
scoreManager.Import(score, true);
|
||||
|
||||
Push(new Results(score));
|
||||
Push(CreateResults(score));
|
||||
|
||||
onCompletionEvent = null;
|
||||
});
|
||||
@ -293,7 +301,8 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
Beatmap = Beatmap.Value.BeatmapInfo,
|
||||
Ruleset = ruleset,
|
||||
User = api.LocalUser.Value
|
||||
Mods = Beatmap.Value.Mods.Value.ToArray(),
|
||||
User = api.LocalUser.Value,
|
||||
};
|
||||
|
||||
ScoreProcessor.PopulateScore(score);
|
||||
@ -424,5 +433,7 @@ namespace osu.Game.Screens.Play
|
||||
if (storyboardVisible && beatmap.Storyboard.ReplacesBackground)
|
||||
Background?.FadeTo(0, BACKGROUND_FADE_DURATION, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected virtual Results CreateResults(ScoreInfo score) => new SoloResults(score);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user