mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Add various logging of global WorkingBeatmap
state changes
This commit is contained in:
parent
e131101708
commit
50c1c066de
@ -486,6 +486,7 @@ namespace osu.Game
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public void PresentBeatmap(IBeatmapSetInfo beatmap, Predicate<BeatmapInfo> difficultyCriteria = null)
|
public void PresentBeatmap(IBeatmapSetInfo beatmap, Predicate<BeatmapInfo> difficultyCriteria = null)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Beginning {nameof(PresentBeatmap)} with beatmap {beatmap}");
|
||||||
Live<BeatmapSetInfo> databasedSet = null;
|
Live<BeatmapSetInfo> databasedSet = null;
|
||||||
|
|
||||||
if (beatmap.OnlineID > 0)
|
if (beatmap.OnlineID > 0)
|
||||||
@ -522,6 +523,7 @@ namespace osu.Game
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Completing {nameof(PresentBeatmap)} with beatmap {beatmap} ruleset {selection.Ruleset}");
|
||||||
Ruleset.Value = selection.Ruleset;
|
Ruleset.Value = selection.Ruleset;
|
||||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(selection);
|
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(selection);
|
||||||
}
|
}
|
||||||
@ -534,6 +536,8 @@ namespace osu.Game
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void PresentScore(IScoreInfo score, ScorePresentType presentType = ScorePresentType.Results)
|
public void PresentScore(IScoreInfo score, ScorePresentType presentType = ScorePresentType.Results)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Beginning {nameof(PresentScore)} with score {score}");
|
||||||
|
|
||||||
// The given ScoreInfo may have missing properties if it was retrieved from online data. Re-retrieve it from the database
|
// The given ScoreInfo may have missing properties if it was retrieved from online data. Re-retrieve it from the database
|
||||||
// to ensure all the required data for presenting a replay are present.
|
// to ensure all the required data for presenting a replay are present.
|
||||||
ScoreInfo databasedScoreInfo = null;
|
ScoreInfo databasedScoreInfo = null;
|
||||||
@ -568,6 +572,8 @@ namespace osu.Game
|
|||||||
|
|
||||||
PerformFromScreen(screen =>
|
PerformFromScreen(screen =>
|
||||||
{
|
{
|
||||||
|
Logger.Log($"{nameof(PresentScore)} updating beatmap ({databasedBeatmap}) and ruleset ({databasedScore.ScoreInfo.Ruleset} to match score");
|
||||||
|
|
||||||
Ruleset.Value = databasedScore.ScoreInfo.Ruleset;
|
Ruleset.Value = databasedScore.ScoreInfo.Ruleset;
|
||||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap);
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Audio;
|
using osu.Framework.Graphics.Audio;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
@ -106,10 +107,12 @@ namespace osu.Game.Overlays
|
|||||||
if (beatmap.Disabled)
|
if (beatmap.Disabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Logger.Log($"{nameof(MusicController)} skipping to next track to {nameof(EnsurePlayingSomething)}");
|
||||||
NextTrack();
|
NextTrack();
|
||||||
}
|
}
|
||||||
else if (!IsPlaying)
|
else if (!IsPlaying)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"{nameof(MusicController)} starting playback to {nameof(EnsurePlayingSomething)}");
|
||||||
Play();
|
Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
@ -302,6 +303,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public void PresentBeatmap(WorkingBeatmap beatmap, RulesetInfo ruleset)
|
public void PresentBeatmap(WorkingBeatmap beatmap, RulesetInfo ruleset)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"{nameof(MainMenu)} completing {nameof(PresentBeatmap)} with beatmap {beatmap} ruleset {ruleset}");
|
||||||
|
|
||||||
Beatmap.Value = beatmap;
|
Beatmap.Value = beatmap;
|
||||||
Ruleset.Value = ruleset;
|
Ruleset.Value = ruleset;
|
||||||
|
|
||||||
|
@ -494,7 +494,7 @@ namespace osu.Game.Screens.Select
|
|||||||
// clear pending task immediately to track any potential nested debounce operation.
|
// clear pending task immediately to track any potential nested debounce operation.
|
||||||
selectionChangedDebounce = null;
|
selectionChangedDebounce = null;
|
||||||
|
|
||||||
Logger.Log($"updating selection with beatmap:{beatmap?.ID.ToString() ?? "null"} ruleset:{ruleset?.ShortName ?? "null"}");
|
Logger.Log($"Song select updating selection with beatmap:{beatmap?.ID.ToString() ?? "null"} ruleset:{ruleset?.ShortName ?? "null"}");
|
||||||
|
|
||||||
if (transferRulesetValue())
|
if (transferRulesetValue())
|
||||||
{
|
{
|
||||||
@ -519,7 +519,7 @@ namespace osu.Game.Screens.Select
|
|||||||
// In these cases, the other component has already loaded the beatmap, so we don't need to do so again.
|
// In these cases, the other component has already loaded the beatmap, so we don't need to do so again.
|
||||||
if (!EqualityComparer<BeatmapInfo>.Default.Equals(beatmap, Beatmap.Value.BeatmapInfo))
|
if (!EqualityComparer<BeatmapInfo>.Default.Equals(beatmap, Beatmap.Value.BeatmapInfo))
|
||||||
{
|
{
|
||||||
Logger.Log($"beatmap changed from \"{Beatmap.Value.BeatmapInfo}\" to \"{beatmap}\"");
|
Logger.Log($"Song select changing beatmap from \"{Beatmap.Value.BeatmapInfo}\" to \"{beatmap?.ToString() ?? "null"}\"");
|
||||||
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap);
|
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,7 +737,10 @@ namespace osu.Game.Screens.Select
|
|||||||
bool isNewTrack = !lastTrack.TryGetTarget(out var last) || last != track;
|
bool isNewTrack = !lastTrack.TryGetTarget(out var last) || last != track;
|
||||||
|
|
||||||
if (!track.IsRunning && (music.UserPauseRequested != true || isNewTrack))
|
if (!track.IsRunning && (music.UserPauseRequested != true || isNewTrack))
|
||||||
|
{
|
||||||
|
Logger.Log($"Song select decided to {nameof(ensurePlayingSelected)}");
|
||||||
music.Play(true);
|
music.Play(true);
|
||||||
|
}
|
||||||
|
|
||||||
lastTrack.SetTarget(track);
|
lastTrack.SetTarget(track);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user