mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 14:52:54 +08:00
Ignore duplicate configs
This commit is contained in:
parent
4719aac235
commit
881ec146af
@ -4,6 +4,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
|
|
||||||
namespace osu.Game.Skinning
|
namespace osu.Game.Skinning
|
||||||
@ -42,7 +43,10 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
case "Keys":
|
case "Keys":
|
||||||
currentConfig = new LegacyManiaSkinConfiguration(int.Parse(pair.Value, CultureInfo.InvariantCulture));
|
currentConfig = new LegacyManiaSkinConfiguration(int.Parse(pair.Value, CultureInfo.InvariantCulture));
|
||||||
output.Add(currentConfig);
|
|
||||||
|
// Silently ignore duplicate configurations.
|
||||||
|
if (output.All(c => c.Keys != currentConfig.Keys))
|
||||||
|
output.Add(currentConfig);
|
||||||
|
|
||||||
// All existing lines can be flushed now that we have a valid configuration.
|
// All existing lines can be flushed now that we have a valid configuration.
|
||||||
flushPendingLines();
|
flushPendingLines();
|
||||||
|
Loading…
Reference in New Issue
Block a user