Add an option to respect manual changes on changing automation.

This commit is contained in:
Ottermandias 2024-03-03 13:42:57 +01:00
parent e6bd91319b
commit 9f9a58af2a
3 changed files with 6 additions and 3 deletions

View file

@ -151,7 +151,7 @@ public sealed class AutoDesignApplier : IDisposable
{
if (_state.GetOrCreate(id, data.Objects[0], out var state))
{
Reduce(data.Objects[0], state, newSet, false, false);
Reduce(data.Objects[0], state, newSet, _config.RespectManualOnAutomationUpdate, false);
foreach (var actor in data.Objects)
_state.ReapplyState(actor, StateSource.Fixed);
}
@ -163,7 +163,7 @@ public sealed class AutoDesignApplier : IDisposable
var specificId = actor.GetIdentifier(_actors);
if (_state.GetOrCreate(specificId, actor, out var state))
{
Reduce(actor, state, newSet, false, false);
Reduce(actor, state, newSet, _config.RespectManualOnAutomationUpdate, false);
_state.ReapplyState(actor, StateSource.Fixed);
}
}

View file

@ -45,6 +45,7 @@ public class Configuration : IPluginConfiguration, ISavable
public bool ChangeEntireItem { get; set; } = false;
public bool AlwaysApplyAssociatedMods { get; set; } = false;
public bool AllowDoubleClickToApply { get; set; } = false;
public bool RespectManualOnAutomationUpdate { get; set; } = false;
public ModifiableHotkey ToggleQuickDesignBar { get; set; } = new(VirtualKey.NO_KEY);
public DoubleModifier DeleteDesignModifier { get; set; } = new(ModifierHotkey.Control, ModifierHotkey.Shift);
public ChangeLogDisplayType ChangeLogDisplayType { get; set; } = ChangeLogDisplayType.New;

View file

@ -7,7 +7,6 @@ using Glamourer.Designs;
using Glamourer.Gui.Tabs.DesignTab;
using Glamourer.Interop;
using Glamourer.Interop.PalettePlus;
using Glamourer.Interop.Penumbra;
using Glamourer.Services;
using Glamourer.State;
using ImGuiNET;
@ -78,6 +77,9 @@ public class SettingsTab(
Checkbox("Do Not Apply Unobtained Items in Automation",
"Enable this if you want automatically applied designs to only consider items and customizations you have actually unlocked once, and skip those you have not.",
config.UnlockedItemMode, v => config.UnlockedItemMode = v);
Checkbox("Respect Manual Changes When Editing Automation",
"Whether changing any currently active automation group will respect manual changes to the character before re-applying the changed automation or not.",
config.RespectManualOnAutomationUpdate, v => config.RespectManualOnAutomationUpdate = v);
Checkbox("Enable Festival Easter-Eggs",
"Glamourer may do some fun things on specific dates. Disable this if you do not want your experience disrupted by this.",
config.DisableFestivals == 0, v => config.DisableFestivals = v ? (byte)0 : (byte)2);