1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 07:50:02 +08:00

Add ToString() overrides on many classes to make debugging easier

This commit is contained in:
Dean Herbert
2017-12-16 16:14:01 +09:00
Unverified
parent a8a2c233a0
commit 49ce42d90c
5 changed files with 12 additions and 0 deletions
@@ -228,9 +228,13 @@ namespace osu.Game.Tests.Visual
checkVisibleItemCount(false, set_count + 1);
setSelected(set_count + 1, 1);
AddStep("Remove set", () => carousel.RemoveBeatmapSet(createTestBeatmapSet(set_count + 1)));
checkVisibleItemCount(false, set_count);
checkSelected(set_count, 1);
}
/// <summary>
+2
View File
@@ -118,6 +118,8 @@ namespace osu.Game.Beatmaps
[JsonProperty("difficulty_rating")]
public double StarDifficulty { get; set; }
public override string ToString() => $"{Metadata} [{Version}]";
public bool Equals(BeatmapInfo other)
{
if (ID == 0 || other?.ID == 0)
+2
View File
@@ -57,6 +57,8 @@ namespace osu.Game.Beatmaps
public string AudioFile { get; set; }
public string BackgroundFile { get; set; }
public override string ToString() => $"{Artist} - {Title} ({Author})";
public string[] SearchableTerms => new[]
{
Author?.Username,
+2
View File
@@ -33,6 +33,8 @@ namespace osu.Game.Beatmaps
public List<BeatmapSetFileInfo> Files { get; set; }
public override string ToString() => Metadata.ToString();
public bool Protected { get; set; }
}
}
+2
View File
@@ -136,5 +136,7 @@ namespace osu.Game.Users
[JsonProperty(@"rankHistory")]
public RankHistoryData RankHistory;
public override string ToString() => Username;
}
}