Configuration to disable running after venture

This commit is contained in:
Liza 2023-09-09 19:49:45 +02:00
parent 2fbf350c97
commit 9d0dc9bdd7
Signed by: liza
GPG Key ID: 7199F8D727D55F67
4 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<Version>1.1</Version>
<Version>1.2</Version>
<LangVersion>11.0</LangVersion>
<Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

View File

@ -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();
}

View File

@ -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))
{

View File

@ -6,5 +6,6 @@ namespace ARDiscard;
public class Configuration : IPluginConfiguration
{
public int Version { get; set; } = 1;
public List<uint> DiscardingItems = new();
public bool RunAfterVenture { get; set; }
public List<uint> DiscardingItems { get; set; }= new();
}