diff --git a/ARDiscard/ARDiscard.csproj b/ARDiscard/ARDiscard.csproj index e911935..a0aede9 100644 --- a/ARDiscard/ARDiscard.csproj +++ b/ARDiscard/ARDiscard.csproj @@ -1,7 +1,7 @@ net7.0-windows - 1.1 + 1.2 11.0 enable true diff --git a/ARDiscard/AutoDiscardPlogon.cs b/ARDiscard/AutoDiscardPlogon.cs index c3598a8..247130c 100644 --- a/ARDiscard/AutoDiscardPlogon.cs +++ b/ARDiscard/AutoDiscardPlogon.cs @@ -61,7 +61,7 @@ public class AutoDiscardPlogon : IDalamudPlugin private unsafe void CheckPostProcess(string retainerName) { - if (_inventoryUtils.GetNextItemToDiscard() != null) + if (_configuration.RunAfterVenture && _inventoryUtils.GetNextItemToDiscard() != null) _autoRetainerApi.RequestPostprocess(); } diff --git a/ARDiscard/ConfigWindow.cs b/ARDiscard/ConfigWindow.cs index 386d2ac..b9d881b 100644 --- a/ARDiscard/ConfigWindow.cs +++ b/ARDiscard/ConfigWindow.cs @@ -43,6 +43,13 @@ public class ConfigWindow : Window public override void Draw() { + bool runAfterVenture = _configuration.RunAfterVenture; + if (ImGui.Checkbox("Run automatically after AutoRetainer's venture", ref runAfterVenture)) + { + _configuration.RunAfterVenture = runAfterVenture; + _pluginInterface.SavePluginConfig(_configuration); + } + var ws = ImGui.GetWindowSize(); if (ImGui.BeginChild("Left", new Vector2(Math.Max(10, ws.X / 2), -1), true)) { diff --git a/ARDiscard/Configuration.cs b/ARDiscard/Configuration.cs index 99aaf10..a023393 100644 --- a/ARDiscard/Configuration.cs +++ b/ARDiscard/Configuration.cs @@ -6,5 +6,6 @@ namespace ARDiscard; public class Configuration : IPluginConfiguration { public int Version { get; set; } = 1; - public List DiscardingItems = new(); + public bool RunAfterVenture { get; set; } + public List DiscardingItems { get; set; }= new(); }