forked from liza/ARDiscard
Add an option to never discard items crafted manually
This commit is contained in:
parent
24b76b1b49
commit
0d7f9f4aa4
@ -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>4.5</Version>
|
<Version>4.6</Version>
|
||||||
<LangVersion>11.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
@ -15,6 +15,7 @@ internal sealed class Configuration : IPluginConfiguration
|
|||||||
public ContextMenuConfiguration ContextMenu { get; set; } = new();
|
public ContextMenuConfiguration ContextMenu { get; set; } = new();
|
||||||
public PreviewConfiguration Preview { get; set; } = new();
|
public PreviewConfiguration Preview { get; set; } = new();
|
||||||
public uint IgnoreItemCountWhenAbove { get; set; } = 50;
|
public uint IgnoreItemCountWhenAbove { get; set; } = 50;
|
||||||
|
public bool IgnoreItemWithSignature { get; set; }
|
||||||
|
|
||||||
public sealed class CharacterInfo
|
public sealed class CharacterInfo
|
||||||
{
|
{
|
||||||
|
@ -133,6 +133,9 @@ internal sealed class InventoryUtils
|
|||||||
itemInfo.ILvl >= _configuration.Armoury.MaximumGearItemLevel)
|
itemInfo.ILvl >= _configuration.Armoury.MaximumGearItemLevel)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (_configuration.IgnoreItemWithSignature && item->CrafterContentID != 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
//PluginLog.Verbose($"{i} → {item->ItemID}");
|
//PluginLog.Verbose($"{i} → {item->ItemID}");
|
||||||
if (_configuration.DiscardingItems.Contains(item->ItemID))
|
if (_configuration.DiscardingItems.Contains(item->ItemID))
|
||||||
{
|
{
|
||||||
|
@ -284,7 +284,8 @@ internal sealed class ConfigWindow : LImGui.LWindow
|
|||||||
ImGui.Indent(30);
|
ImGui.Indent(30);
|
||||||
|
|
||||||
bool mainHandOffHand = _configuration.Armoury.CheckMainHandOffHand;
|
bool mainHandOffHand = _configuration.Armoury.CheckMainHandOffHand;
|
||||||
if (ImGui.Checkbox("Discard when items are found in Main Hand/Off Hand (Weapons and Tools)", ref mainHandOffHand))
|
if (ImGui.Checkbox("Discard when items are found in Main Hand/Off Hand (Weapons and Tools)",
|
||||||
|
ref mainHandOffHand))
|
||||||
{
|
{
|
||||||
_configuration.Armoury.CheckMainHandOffHand = mainHandOffHand;
|
_configuration.Armoury.CheckMainHandOffHand = mainHandOffHand;
|
||||||
Save();
|
Save();
|
||||||
@ -348,6 +349,15 @@ internal sealed class ConfigWindow : LImGui.LWindow
|
|||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ignoreItemWithSignature = _configuration.IgnoreItemWithSignature;
|
||||||
|
if (ImGui.Checkbox(
|
||||||
|
"Ignore items with a 'crafted by' signature (manually crafted by yourself or someone else)",
|
||||||
|
ref ignoreItemWithSignature))
|
||||||
|
{
|
||||||
|
_configuration.IgnoreItemWithSignature = ignoreItemWithSignature;
|
||||||
|
Save();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
bool groupPreviewByCategory = _configuration.Preview.GroupByCategory;
|
bool groupPreviewByCategory = _configuration.Preview.GroupByCategory;
|
||||||
|
Loading…
Reference in New Issue
Block a user