From 02e3ebe1a01a39fb692ac13d2c37f6c7bdbc138a Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sun, 27 Nov 2022 09:42:55 +0900 Subject: [PATCH] DifficultyIncrease use `+` and other all `-` mod.Name to mod.Acronym --- osu.Game/Online/Chat/NowPlayingCommand.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/osu.Game/Online/Chat/NowPlayingCommand.cs b/osu.Game/Online/Chat/NowPlayingCommand.cs index 93ea597afa..6d3e1ad50c 100644 --- a/osu.Game/Online/Chat/NowPlayingCommand.cs +++ b/osu.Game/Online/Chat/NowPlayingCommand.cs @@ -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();