use string.Empty, use base SettingDescription for [Osu/Catch]ModDifficultyAdjust

This commit is contained in:
Liam DeVoe
2020-03-22 18:49:45 -04:00
parent 4907fb8fd1
commit 63e9b2a299
7 changed files with 54 additions and 26 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
@ -35,15 +36,15 @@ namespace osu.Game.Rulesets.Catch.Mods
{
get
{
string circleSize = CircleSize.IsDefault ? "" : $"CS {CircleSize.Value}";
string drainRate = DrainRate.IsDefault ? "" : $"HP {DrainRate.Value}";
string overallDifficulty = OverallDifficulty.IsDefault ? "" : $"OD {OverallDifficulty.Value}";
string approachRate = ApproachRate.IsDefault ? "" : $"AR {ApproachRate.Value}";
string circleSize = CircleSize.IsDefault ? string.Empty : $"CS {CircleSize.Value}";
string approachRate = ApproachRate.IsDefault ? string.Empty : $"AR {ApproachRate.Value}";
string[] settings = { circleSize, drainRate, overallDifficulty, approachRate };
// filter out empty strings so we don't have orphaned commas
settings = Array.FindAll(settings, s => !string.IsNullOrEmpty(s));
return string.Join(", ", settings);
return string.Join(", ", new[]
{
circleSize,
base.SettingDescription,
approachRate
}.Where(s => !string.IsNullOrEmpty(s)));
}
}