Add Onion items as possbily discardable

master v2.5
Liza 2023-09-26 20:28:32 +02:00
parent 778df35626
commit 1ffeb4ae14
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 14 additions and 2 deletions

View File

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

View File

@ -17,4 +17,15 @@ internal static class InternalConfiguration
36810, // DSR
38951, // TOP
}.AsReadOnly();
/// <summary>
/// Items that are unique/untradeable, but should still be possible to discard. This is moreso because
/// 99% of the unique/untradeable items should NOT be selectable for discard, but these are OK.
/// </summary>
public static readonly IReadOnlyList<uint> WhitelistedItems = new List<uint>
{
2962, // Onion Doublet
3279, // Onion Gaskins
3743, // Onion Patterns
}.AsReadOnly();
}

View File

@ -354,7 +354,8 @@ internal sealed class ConfigWindow : Window
if (_allItems == null)
{
_allItems = _itemCache.AllItems
.Where(x => x is { IsUnique: false, IsUntradable: false, IsIndisposable: false })
.Where(x => InternalConfiguration.WhitelistedItems.Contains(x.ItemId) ||
x is { IsUnique: false, IsUntradable: false, IsIndisposable: false })
.Where(x => x.UiCategory != UiCategories.Currency && x.UiCategory != UiCategories.Crystals &&
x.UiCategory != UiCategories.Unobtainable)
.Select(x => (x.ItemId, x.Name.ToString()))