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? CachedPlayerName { get; set; }
|
||||||
public string? CachedWorldName { get; set; }
|
public string? CachedWorldName { get; set; }
|
||||||
|
|
||||||
public bool DisableForCharacter { get; set; } = false;
|
public bool DisableForCharacter { get; set; }
|
||||||
public bool UseHideArmouryChestItemsFilter { get; set; } = false;
|
public bool UseHideArmouryChestItemsFilter { get; set; }
|
||||||
|
public bool IgnoreMinimumSealsToKeep { get; set; }
|
||||||
public bool OverrideItemsToPurchase { get; set; }
|
public bool OverrideItemsToPurchase { get; set; }
|
||||||
public List<Configuration.PurchasePriority> ItemsToPurchase { get; set; } = new();
|
public List<Configuration.PurchasePriority> ItemsToPurchase { get; set; } = new();
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0-windows</TargetFramework>
|
<TargetFramework>net7.0-windows</TargetFramework>
|
||||||
<Version>2.17</Version>
|
<Version>2.18</Version>
|
||||||
<LangVersion>11.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
@ -145,10 +145,18 @@ public sealed partial class DeliverooPlugin : IDalamudPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int EffectiveReservedSealCount =>
|
public int EffectiveReservedSealCount
|
||||||
_configuration.ReserveDifferentSealCountAtMaxRank && GetSealCap() == GetMaxSealCap()
|
{
|
||||||
? _configuration.ReservedSealCountAtMaxRank
|
get
|
||||||
: _configuration.ReservedSealCount;
|
{
|
||||||
|
if (CharacterConfiguration is { IgnoreMinimumSealsToKeep: true })
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return _configuration.ReserveDifferentSealCountAtMaxRank && GetSealCap() == GetMaxSealCap()
|
||||||
|
? _configuration.ReservedSealCountAtMaxRank
|
||||||
|
: _configuration.ReservedSealCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Login()
|
private void Login()
|
||||||
{
|
{
|
||||||
|
@ -205,9 +205,18 @@ internal sealed class ConfigWindow : LImGui.LWindow
|
|||||||
charConfiguration.Save(_pluginInterface);
|
charConfiguration.Save(_pluginInterface);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.IsItemHovered())
|
ImGui.SameLine();
|
||||||
ImGui.SetTooltip(
|
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.");
|
||||||
"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.EndDisabled();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
Loading…
Reference in New Issue
Block a user