DifficultyIncrease use `+` and other all `-`

mod.Name to mod.Acronym
This commit is contained in:
cdwcgt 2022-11-27 09:42:55 +09:00
parent 653875bbb4
commit 02e3ebe1a0
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2
1 changed files with 9 additions and 3 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using System.Text;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@ -76,7 +77,7 @@ string getBeatmapPart()
string getModPart()
{
if (api.Activity.Value is UserActivity.InGame) return string.Empty;
if (api.Activity.Value is not UserActivity.InGame) return string.Empty;
if (selectedMods.Value.Count == 0)
{
@ -85,9 +86,14 @@ string getModPart()
StringBuilder modS = new StringBuilder();
foreach (var mod in selectedMods.Value)
foreach (var mod in selectedMods.Value.Where(mod => mod.Type == ModType.DifficultyIncrease))
{
modS.Append($"+{mod.Name} ");
modS.Append($"+{mod.Acronym} ");
}
foreach (var mod in selectedMods.Value.Where(mod => mod.Type != ModType.DifficultyIncrease))
{
modS.Append($"-{mod.Acronym} ");
}
return modS.ToString();