Make versionString private

This commit is contained in:
PercyDan54 2021-04-18 20:57:25 +08:00
parent 646403b826
commit 38a7c590c4
No known key found for this signature in database
GPG Key ID: 6AEA7C525131BAF3

View File

@ -128,7 +128,7 @@ namespace osu.Game.Beatmaps
// Metadata
public string Version { get; set; }
public string VersionString => string.IsNullOrEmpty(Version) ? string.Empty : $"[{Version}]";
private string versionString => string.IsNullOrEmpty(Version) ? string.Empty : $"[{Version}]";
[JsonProperty("difficulty_rating")]
public double StarDifficulty { get; set; }
@ -146,12 +146,12 @@ namespace osu.Game.Beatmaps
Version
}.Concat(Metadata?.SearchableTerms ?? Enumerable.Empty<string>()).Where(s => !string.IsNullOrEmpty(s)).ToArray();
public override string ToString() => $"{Metadata ?? BeatmapSet?.Metadata} {VersionString}".Trim();
public override string ToString() => $"{Metadata ?? BeatmapSet?.Metadata} {versionString}".Trim();
public RomanisableString ToRomanisableString()
{
var metadata = (Metadata ?? BeatmapSet?.Metadata)?.ToRomanisableString() ?? new RomanisableString(null, null);
return new RomanisableString($"{metadata.GetPreferred(true)} {VersionString}".Trim(), $"{metadata.GetPreferred(false)} {VersionString}".Trim());
return new RomanisableString($"{metadata.GetPreferred(true)} {versionString}".Trim(), $"{metadata.GetPreferred(false)} {versionString}".Trim());
}
public bool Equals(BeatmapInfo other)