diff --git a/Glamourer/Automation/AutoDesignApplier.cs b/Glamourer/Automation/AutoDesignApplier.cs index 4cd07e5..e21d522 100644 --- a/Glamourer/Automation/AutoDesignApplier.cs +++ b/Glamourer/Automation/AutoDesignApplier.cs @@ -223,6 +223,7 @@ public sealed class AutoDesignApplier : IDisposable if (!GetPlayerSet(identifier, out var set)) return; + _state.ResetState(state, StateSource.Game); Reduce(actor, state, set, false, false); } diff --git a/Glamourer/Gui/Tabs/AutomationTab/AutomationTab.cs b/Glamourer/Gui/Tabs/AutomationTab/AutomationTab.cs index 145531f..831ee7c 100644 --- a/Glamourer/Gui/Tabs/AutomationTab/AutomationTab.cs +++ b/Glamourer/Gui/Tabs/AutomationTab/AutomationTab.cs @@ -4,25 +4,19 @@ using OtterGui.Widgets; namespace Glamourer.Gui.Tabs.AutomationTab; -public class AutomationTab : ITab +public class AutomationTab(SetSelector selector, SetPanel panel, Configuration config) : ITab { - private readonly SetSelector _selector; - private readonly SetPanel _panel; - - public AutomationTab(SetSelector selector, SetPanel panel) - { - _selector = selector; - _panel = panel; - } - public ReadOnlySpan Label => "Automation"u8; + public bool IsVisible + => config.EnableAutoDesigns; + public void DrawContent() { - _selector.Draw(GetSetSelectorSize()); + selector.Draw(GetSetSelectorSize()); ImGui.SameLine(); - _panel.Draw(); + panel.Draw(); } public float GetSetSelectorSize() diff --git a/Glamourer/State/InternalStateEditor.cs b/Glamourer/State/InternalStateEditor.cs index 045c0df..eaf7c21 100644 --- a/Glamourer/State/InternalStateEditor.cs +++ b/Glamourer/State/InternalStateEditor.cs @@ -223,8 +223,7 @@ public class InternalStateEditor( /// Change the value of a single material color table entry. public bool ChangeMaterialValue(ActorState state, MaterialValueIndex index, in MaterialValueState newValue, StateSource source, - out ColorRow? oldValue, - uint key = 0) + out ColorRow? oldValue, uint key = 0) { // We already have an existing value. if (state.Materials.TryGetValue(index, out var old))