Append conversion for SetMetaFlag -> MetaIndex for help in moving down the API call to the state editor call.

This commit is contained in:
Cordelia Mist 2025-01-24 11:14:50 -08:00
parent cd6a6a462d
commit 356b814102

View file

@ -1,4 +1,5 @@
using Glamourer.State;
using Glamourer.Api.Enums;
using Glamourer.State;
namespace Glamourer.Designs;
@ -37,6 +38,16 @@ public static class MetaExtensions
_ => (MetaFlag)byte.MaxValue,
};
public static MetaIndex ToIndex(this SetMetaFlag index)
=> index switch
{
SetMetaFlag.Wetness => MetaIndex.Wetness,
SetMetaFlag.HatState => MetaIndex.HatState,
SetMetaFlag.VisorState => MetaIndex.VisorState,
SetMetaFlag.WeaponState => MetaIndex.WeaponState,
_ => (MetaIndex)byte.MaxValue,
};
public static MetaIndex ToIndex(this MetaFlag index)
=> index switch
{