1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 21:42:58 +08:00

Merge branch 'add-mod-utils' into freemods

This commit is contained in:
smoogipoo 2021-02-02 19:02:45 +09:00
commit 4fee762a4f

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
@ -45,7 +46,7 @@ namespace osu.Game.Utils
/// <param name="combination">The <see cref="Mod"/> combination to check.</param> /// <param name="combination">The <see cref="Mod"/> combination to check.</param>
/// <param name="invalidMods">Any invalid mods in the set.</param> /// <param name="invalidMods">Any invalid mods in the set.</param>
/// <returns>Whether all <see cref="Mod"/>s in the combination are compatible with each-other.</returns> /// <returns>Whether all <see cref="Mod"/>s in the combination are compatible with each-other.</returns>
public static bool CheckCompatibleSet(IEnumerable<Mod> combination, out List<Mod>? invalidMods) public static bool CheckCompatibleSet(IEnumerable<Mod> combination, [NotNullWhen(false)] out List<Mod>? invalidMods)
{ {
combination = FlattenMods(combination).ToArray(); combination = FlattenMods(combination).ToArray();
invalidMods = null; invalidMods = null;