1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 15:27:24 +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
commit f6f44029e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 20 additions and 26 deletions

View File

@ -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
},

View File

@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
{
Artist = @"Unknown",
Title = @"Sample Beatmap",
AuthorString = @"peppy",
Author = { Username = @"peppy" },
},
Ruleset = new TaikoRuleset().RulesetInfo
},

View File

@ -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
},

View File

@ -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",
},

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

View File

@ -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

View File

@ -100,7 +100,7 @@ namespace osu.Game.Tests.Visual.Navigation
var metadata = new BeatmapMetadata
{
Artist = "SomeArtist",
AuthorString = "SomeAuthor",
Author = { Username = "SomeAuthor" },
Title = $"import {i}"
};

View File

@ -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(),

View File

@ -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);
}

View File

@ -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"

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,

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;

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();
}
}

View File

@ -32,6 +32,7 @@ namespace osu.Game.Beatmaps
public IList<RealmNamedFileUsage> Files { get; } = null!;
[Ignored]
public BeatmapOnlineStatus Status
{
get => (BeatmapOnlineStatus)StatusInt;

View File

@ -251,7 +251,7 @@ namespace osu.Game.Beatmaps.Formats
break;
case @"Creator":
metadata.AuthorString = pair.Value;
metadata.Author.Username = pair.Value;
break;
case @"Version":

View File

@ -177,7 +177,6 @@ namespace osu.Game.Database
PreviewTime = metadata.PreviewTime,
AudioFile = metadata.AudioFile,
BackgroundFile = metadata.BackgroundFile,
AuthorString = metadata.AuthorString,
};
}

View File

@ -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;

View File

@ -104,6 +104,7 @@ namespace osu.Game.Scoring
}
}
[Ignored]
public ScoreRank Rank
{
get => (ScoreRank)RankInt;

View File

@ -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;