From 356b814102b65e961a8f9c5c9a2e536df4f7f16a Mon Sep 17 00:00:00 2001 From: Cordelia Mist Date: Fri, 24 Jan 2025 11:14:50 -0800 Subject: [PATCH] Append conversion for SetMetaFlag -> MetaIndex for help in moving down the API call to the state editor call. --- Glamourer/Designs/MetaIndex.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Glamourer/Designs/MetaIndex.cs b/Glamourer/Designs/MetaIndex.cs index edbf7b6..9cf6472 100644 --- a/Glamourer/Designs/MetaIndex.cs +++ b/Glamourer/Designs/MetaIndex.cs @@ -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 {