forked from liza/Deliveroo
Add an option to ignore 'Minimum Seals to keep' for a character
This commit is contained in:
parent
2198fdc4e1
commit
5b0bcd981b
@ -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<Configuration.PurchasePriority> ItemsToPurchase { get; set; } = new();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<Version>2.17</Version>
|
||||
<Version>2.18</Version>
|
||||
<LangVersion>11.0</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
|
@ -145,10 +145,18 @@ public sealed partial class DeliverooPlugin : IDalamudPlugin
|
||||
}
|
||||
}
|
||||
|
||||
public int EffectiveReservedSealCount =>
|
||||
_configuration.ReserveDifferentSealCountAtMaxRank && GetSealCap() == GetMaxSealCap()
|
||||
public int EffectiveReservedSealCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CharacterConfiguration is { IgnoreMinimumSealsToKeep: true })
|
||||
return 0;
|
||||
|
||||
return _configuration.ReserveDifferentSealCountAtMaxRank && GetSealCap() == GetMaxSealCap()
|
||||
? _configuration.ReservedSealCountAtMaxRank
|
||||
: _configuration.ReservedSealCount;
|
||||
}
|
||||
}
|
||||
|
||||
private void Login()
|
||||
{
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user