1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 11:30:04 +08:00

Merge pull request #16507 from peppy/more-ingore-rules

Add some missing `IgnoredAttributes` to reduce automapper overhead
This commit is contained in:
Dan Balasescu
2022-01-19 12:26:37 +09:00
committed by GitHub
Unverified
19 changed files with 20 additions and 26 deletions
@@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Catch.Tests
{
Artist = @"Unknown",
Title = @"You're breathtaking",
AuthorString = @"Everyone",
Author = { Username = @"Everyone" },
},
Ruleset = new CatchRuleset().RulesetInfo
},
@@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
{
Artist = @"Unknown",
Title = @"Sample Beatmap",
AuthorString = @"peppy",
Author = { Username = @"peppy" },
},
Ruleset = new TaikoRuleset().RulesetInfo
},
@@ -163,7 +163,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
{
Artist = "Unknown",
Title = "Sample Beatmap",
AuthorString = "Craftplacer",
Author = { Username = "Craftplacer" },
},
Ruleset = new TaikoRuleset().RulesetInfo
},
@@ -30,7 +30,7 @@ namespace osu.Game.Tests.NonVisual.Filtering
ArtistUnicode = "check unicode too",
Title = "Title goes here",
TitleUnicode = "Title goes here",
AuthorString = "The Author",
Author = { Username = "The Author" },
Source = "unit tests",
Tags = "look for tags too",
},
+1 -1
View File
@@ -89,7 +89,7 @@ namespace osu.Game.Tests.Resources
// Create random metadata, then we can check if sorting works based on these
Artist = "Some Artist " + RNG.Next(0, 9),
Title = $"Some Song (set id {setId}) {Guid.NewGuid()}",
AuthorString = "Some Guy " + RNG.Next(0, 9),
Author = { Username = "Some Guy " + RNG.Next(0, 9) },
};
var beatmapSet = new BeatmapSetInfo
@@ -52,7 +52,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
{
Artist = "Some Artist",
Title = "Some Beatmap",
AuthorString = "Some Author"
Author = { Username = "Some Author" },
};
var beatmapSetInfo = new BeatmapSetInfo
@@ -100,7 +100,7 @@ namespace osu.Game.Tests.Visual.Navigation
var metadata = new BeatmapMetadata
{
Artist = "SomeArtist",
AuthorString = "SomeAuthor",
Author = { Username = "SomeAuthor" },
Title = $"import {i}"
};
@@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual.Navigation
Metadata = new BeatmapMetadata
{
Artist = "SomeArtist",
AuthorString = "SomeAuthor",
Author = { Username = "SomeAuthor" },
Title = "import"
},
BaseDifficulty = new BeatmapDifficulty(),
@@ -53,7 +53,7 @@ namespace osu.Game.Tests.Visual.Navigation
Metadata = new BeatmapMetadata
{
Artist = "SomeArtist",
AuthorString = "SomeAuthor",
Author = { Username = "SomeAuthor" },
Title = "import"
},
BaseDifficulty = new BeatmapDifficulty(),
@@ -409,7 +409,7 @@ namespace osu.Game.Tests.Visual.SongSelect
set.Beatmaps.ForEach(b => b.Metadata.Artist = zzz_string);
if (i == 16)
set.Beatmaps.ForEach(b => b.Metadata.AuthorString = zzz_string);
set.Beatmaps.ForEach(b => b.Metadata.Author.Username = zzz_string);
sets.Add(set);
}
@@ -208,7 +208,7 @@ namespace osu.Game.Tests.Visual.SongSelect
{
Metadata = new BeatmapMetadata
{
AuthorString = $"{ruleset.ShortName}Author",
Author = { Username = $"{ruleset.ShortName}Author" },
Artist = $"{ruleset.ShortName}Artist",
Source = $"{ruleset.ShortName}Source",
Title = $"{ruleset.ShortName}Title"
@@ -230,7 +230,7 @@ namespace osu.Game.Tests.Visual.SongSelect
{
Metadata = new BeatmapMetadata
{
AuthorString = "WWWWWWWWWWWWWWW",
Author = { Username = "WWWWWWWWWWWWWWW" },
Artist = "Verrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrry long Artist",
Source = "Verrrrry long Source",
Title = "Verrrrry long Title"
+1 -1
View File
@@ -54,7 +54,7 @@ namespace osu.Game.Beatmaps
{
Artist = @"Unknown",
Title = @"Unknown",
AuthorString = @"Unknown Creator",
Author = { Username = @"Unknown Creator" },
},
DifficultyName = @"Normal",
BaseDifficulty = Difficulty,
+1
View File
@@ -64,6 +64,7 @@ namespace osu.Game.Beatmaps
[Ignored]
public RealmNamedFileUsage? File => BeatmapSet?.Files.FirstOrDefault(f => f.File.Hash == Hash);
[Ignored]
public BeatmapOnlineStatus Status
{
get => (BeatmapOnlineStatus)StatusInt;
-10
View File
@@ -45,16 +45,6 @@ namespace osu.Game.Beatmaps
IUser IBeatmapMetadataInfo.Author => Author;
#region Compatibility properties
public string AuthorString
{
get => Author.Username;
set => Author.Username = value;
}
#endregion
public override string ToString() => this.GetDisplayTitle();
}
}
+1
View File
@@ -32,6 +32,7 @@ namespace osu.Game.Beatmaps
public IList<RealmNamedFileUsage> Files { get; } = null!;
[Ignored]
public BeatmapOnlineStatus Status
{
get => (BeatmapOnlineStatus)StatusInt;
@@ -251,7 +251,7 @@ namespace osu.Game.Beatmaps.Formats
break;
case @"Creator":
metadata.AuthorString = pair.Value;
metadata.Author.Username = pair.Value;
break;
case @"Version":
-1
View File
@@ -177,7 +177,6 @@ namespace osu.Game.Database
PreviewTime = metadata.PreviewTime,
AudioFile = metadata.AudioFile,
BackgroundFile = metadata.BackgroundFile,
AuthorString = metadata.AuthorString,
};
}
@@ -20,12 +20,14 @@ namespace osu.Game.Input.Bindings
public int? Variant { get; set; }
[Ignored]
public KeyCombination KeyCombination
{
get => KeyCombinationString;
set => KeyCombinationString = value.ToString();
}
[Ignored]
public object Action
{
get => ActionInt;
+1
View File
@@ -104,6 +104,7 @@ namespace osu.Game.Scoring
}
}
[Ignored]
public ScoreRank Rank
{
get => (ScoreRank)RankInt;
@@ -110,7 +110,7 @@ namespace osu.Game.Screens.Edit.Setup
Beatmap.Metadata.TitleUnicode = TitleTextBox.Current.Value;
Beatmap.Metadata.Title = RomanisedTitleTextBox.Current.Value;
Beatmap.Metadata.AuthorString = creatorTextBox.Current.Value;
Beatmap.Metadata.Author.Username = creatorTextBox.Current.Value;
Beatmap.BeatmapInfo.DifficultyName = difficultyTextBox.Current.Value;
Beatmap.Metadata.Source = sourceTextBox.Current.Value;
Beatmap.Metadata.Tags = tagsTextBox.Current.Value;