mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Add Yield return Indices List for setter helper
This commit is contained in:
parent
356b814102
commit
091aadd4a6
1 changed files with 13 additions and 0 deletions
|
|
@ -48,6 +48,19 @@ public static class MetaExtensions
|
|||
_ => (MetaIndex)byte.MaxValue,
|
||||
};
|
||||
|
||||
public static IEnumerable<MetaIndex> ToIndices(this SetMetaFlag index)
|
||||
{
|
||||
if (index.HasFlag(SetMetaFlag.Wetness))
|
||||
yield return MetaIndex.Wetness;
|
||||
if (index.HasFlag(SetMetaFlag.HatState))
|
||||
yield return MetaIndex.HatState;
|
||||
if (index.HasFlag(SetMetaFlag.VisorState))
|
||||
yield return MetaIndex.VisorState;
|
||||
if (index.HasFlag(SetMetaFlag.WeaponState))
|
||||
yield return MetaIndex.WeaponState;
|
||||
}
|
||||
|
||||
|
||||
public static MetaIndex ToIndex(this MetaFlag index)
|
||||
=> index switch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue