mirror of
https://github.com/sp-tarkov/assembly-tool.git
synced 2025-02-13 09:50:44 -05:00
23 lines
696 B
C#
23 lines
696 B
C#
![]() |
using AssemblyRemapper.Enums;
|
|||
|
|
|||
|
namespace AssemblyRemapper.Utils;
|
|||
|
|
|||
|
internal static class EnumExtensions
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Returns a match from a list of match results
|
|||
|
/// </summary>
|
|||
|
/// <param name="matches"></param>
|
|||
|
/// <returns>highest EMatchResult</returns>
|
|||
|
public static EMatchResult GetMatch(this List<EMatchResult> matches)
|
|||
|
{
|
|||
|
if (matches.Contains(EMatchResult.Disabled)) { return EMatchResult.Disabled; }
|
|||
|
|
|||
|
if (matches.Contains(EMatchResult.NoMatch)) { return EMatchResult.NoMatch; }
|
|||
|
|
|||
|
if (matches.Contains(EMatchResult.Match)) { return EMatchResult.Match; }
|
|||
|
|
|||
|
// default to disabled
|
|||
|
return EMatchResult.Disabled;
|
|||
|
}
|
|||
|
}
|