mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:42:55 +08:00
Tidy up code
This commit is contained in:
parent
b5c514a8f0
commit
2df6ccf33e
@ -68,6 +68,9 @@ namespace osu.Game.Online.Chat
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
channelManager.PostMessage($"is {verb} {getBeatmapPart()} {getModPart()}", true, target);
|
||||||
|
Expire();
|
||||||
|
|
||||||
string getBeatmapPart()
|
string getBeatmapPart()
|
||||||
{
|
{
|
||||||
string beatmapInfoString = localisation.GetLocalisedBindableString(beatmapInfo.GetDisplayTitleRomanisable()).Value;
|
string beatmapInfoString = localisation.GetLocalisedBindableString(beatmapInfo.GetDisplayTitleRomanisable()).Value;
|
||||||
@ -84,23 +87,20 @@ namespace osu.Game.Online.Chat
|
|||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder modS = new StringBuilder();
|
StringBuilder modsString = new StringBuilder();
|
||||||
|
|
||||||
foreach (var mod in selectedMods.Value.Where(mod => mod.Type == ModType.DifficultyIncrease))
|
foreach (var mod in selectedMods.Value.Where(mod => mod.Type == ModType.DifficultyIncrease))
|
||||||
{
|
{
|
||||||
modS.Append($"+{mod.Acronym} ");
|
modsString.Append($"+{mod.Acronym} ");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var mod in selectedMods.Value.Where(mod => mod.Type != ModType.DifficultyIncrease))
|
foreach (var mod in selectedMods.Value.Where(mod => mod.Type != ModType.DifficultyIncrease))
|
||||||
{
|
{
|
||||||
modS.Append($"-{mod.Acronym} ");
|
modsString.Append($"-{mod.Acronym} ");
|
||||||
}
|
}
|
||||||
|
|
||||||
return modS.ToString();
|
return modsString.ToString().Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
channelManager.PostMessage($"is {verb} {getBeatmapPart()} {getModPart()}", true, target);
|
|
||||||
Expire();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user