diff --git a/Deliveroo/CharacterConfiguration.cs b/Deliveroo/CharacterConfiguration.cs index 411c6d5..6e5026d 100644 --- a/Deliveroo/CharacterConfiguration.cs +++ b/Deliveroo/CharacterConfiguration.cs @@ -11,8 +11,9 @@ internal sealed class CharacterConfiguration public string? CachedPlayerName { get; set; } public string? CachedWorldName { get; set; } - public bool DisableForCharacter { get; set; } = false; - public bool UseHideArmouryChestItemsFilter { get; set; } = false; + public bool DisableForCharacter { get; set; } + public bool UseHideArmouryChestItemsFilter { get; set; } + public bool IgnoreMinimumSealsToKeep { get; set; } public bool OverrideItemsToPurchase { get; set; } public List ItemsToPurchase { get; set; } = new(); diff --git a/Deliveroo/Deliveroo.csproj b/Deliveroo/Deliveroo.csproj index 22c9bce..7015949 100644 --- a/Deliveroo/Deliveroo.csproj +++ b/Deliveroo/Deliveroo.csproj @@ -1,7 +1,7 @@ net7.0-windows - 2.17 + 2.18 11.0 enable true diff --git a/Deliveroo/DeliverooPlugin.cs b/Deliveroo/DeliverooPlugin.cs index 3a8150b..e3d850a 100644 --- a/Deliveroo/DeliverooPlugin.cs +++ b/Deliveroo/DeliverooPlugin.cs @@ -145,10 +145,18 @@ public sealed partial class DeliverooPlugin : IDalamudPlugin } } - public int EffectiveReservedSealCount => - _configuration.ReserveDifferentSealCountAtMaxRank && GetSealCap() == GetMaxSealCap() - ? _configuration.ReservedSealCountAtMaxRank - : _configuration.ReservedSealCount; + public int EffectiveReservedSealCount + { + get + { + if (CharacterConfiguration is { IgnoreMinimumSealsToKeep: true }) + return 0; + + return _configuration.ReserveDifferentSealCountAtMaxRank && GetSealCap() == GetMaxSealCap() + ? _configuration.ReservedSealCountAtMaxRank + : _configuration.ReservedSealCount; + } + } private void Login() { diff --git a/Deliveroo/Windows/ConfigWindow.cs b/Deliveroo/Windows/ConfigWindow.cs index e40857d..c275bbd 100644 --- a/Deliveroo/Windows/ConfigWindow.cs +++ b/Deliveroo/Windows/ConfigWindow.cs @@ -205,9 +205,18 @@ internal sealed class ConfigWindow : LImGui.LWindow charConfiguration.Save(_pluginInterface); } - if (ImGui.IsItemHovered()) - ImGui.SetTooltip( - "The default filter for all characters is 'Hide Gear Set Items', but you may want to override this to hide all Armoury Chest items (regardless of whether they're part of a gear set) e.g. for your main character."); + ImGui.SameLine(); + ImGuiComponents.HelpMarker("The default filter for all characters is 'Hide Gear Set Items', but you may want to override this to hide all Armoury Chest items (regardless of whether they're part of a gear set) e.g. for your main character."); + + bool ignoreMinimumSealsToKeep = charConfiguration.IgnoreMinimumSealsToKeep; + if (ImGui.Checkbox("Ignore 'Minimum Seals to keep' setting", ref ignoreMinimumSealsToKeep)) + { + charConfiguration.IgnoreMinimumSealsToKeep = ignoreMinimumSealsToKeep; + charConfiguration.Save(_pluginInterface); + } + + ImGui.SameLine(); + ImGuiComponents.HelpMarker("When enabled, all GC seals will be spent. This is effectively the same as setting 'Minimum Seals to keep' to 0."); ImGui.EndDisabled(); ImGui.Spacing();