v1.6.17.0 (Unto the Breach update)

This commit is contained in:
Regalis11
2024-10-22 17:29:04 +03:00
parent e74b3cdb17
commit 6e6c17e100
417 changed files with 17166 additions and 5870 deletions
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
namespace Barotrauma.Extensions
{
@@ -36,5 +37,13 @@ namespace Barotrauma.Extensions
int flagValue = Convert.ToInt32(flag);
return (T)(object)(enumValue & ~flagValue);
}
public static IEnumerable<T> GetIndividualFlags<T>(T flagsEnum) where T : Enum
{
foreach (T value in Enum.GetValues(typeof(T)))
{
if (flagsEnum.HasFlag(value)) { yield return value; }
}
}
}
}