1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:12:57 +08:00

Improved readability again

This commit is contained in:
Terochi 2023-02-06 09:49:42 +01:00
parent 4f23e096d7
commit 43f7665c9e

View File

@ -614,7 +614,7 @@ namespace osu.Game.Screens.Play
resultsDisplayDelegate?.Cancel(); resultsDisplayDelegate?.Cancel();
// import current score if possible. // import current score if possible.
beginScoreImport(); attemptScoreImport();
// The actual exit is performed if // The actual exit is performed if
// - the pause / fail dialog was not requested // - the pause / fail dialog was not requested
@ -772,8 +772,8 @@ namespace osu.Game.Screens.Play
if (prepareScoreForDisplayTask == null) if (prepareScoreForDisplayTask == null)
{ {
// Try importing score since the task hasn't been invoked yet. // Try importing score since the task hasn't been invoked yet.
if (!beginScoreImport()) if (!attemptScoreImport())
// If the task hasn't started, the score will never be imported. // If attempt failed, trying again is unnecessary
resultsDisplayDelegate?.Cancel(); resultsDisplayDelegate?.Cancel();
return; return;
@ -796,12 +796,12 @@ namespace osu.Game.Screens.Play
} }
/// <summary> /// <summary>
/// Ends replay recording and runs <see cref="prepareAndImportScore"/> only when results can be shown /// Attempts to run <see cref="prepareAndImportScore"/>
/// </summary> /// </summary>
/// <returns> /// <returns>
/// Whether the task has been invoked /// Whether the attempt was successful
/// </returns> /// </returns>
private bool beginScoreImport() private bool attemptScoreImport()
{ {
// Ensure we are not writing to the replay any more, as we are about to consume and store the score. // Ensure we are not writing to the replay any more, as we are about to consume and store the score.
DrawableRuleset.SetRecordTarget(null); DrawableRuleset.SetRecordTarget(null);