Skip to content

Commit

Permalink
Add an option to respect manual changes on changing automation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ottermandias committed Mar 3, 2024
1 parent e6bd913 commit 9f9a58a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Glamourer/Automation/AutoDesignApplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void ApplyNew(AutoDesignSet? newSet)
{
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);
}
Expand All @@ -163,7 +163,7 @@ void ApplyNew(AutoDesignSet? newSet)
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);
}
}
Expand Down
1 change: 1 addition & 0 deletions Glamourer/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion Glamourer/Gui/Tabs/SettingsTab/SettingsTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Glamourer.Gui.Tabs.DesignTab;
using Glamourer.Interop;
using Glamourer.Interop.PalettePlus;
using Glamourer.Interop.Penumbra;
using Glamourer.Services;
using Glamourer.State;
using ImGuiNET;
Expand Down Expand Up @@ -78,6 +77,9 @@ private void DrawBehaviorSettings()
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);
Expand Down

0 comments on commit 9f9a58a

Please sign in to comment.