From 239cb18968043cb37bfd485c256b9112d7127ed4 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Tue, 28 Nov 2023 17:30:57 +0100 Subject: [PATCH] Don't show gil/mgp/allagan tomestones in item search (although they wouldn't be discarded anyway) --- ARDiscard/ARDiscard.csproj | 2 +- ARDiscard/GameData/InternalConfiguration.cs | 26 ++++++++++++--------- ARDiscard/Windows/ConfigWindow.cs | 1 + 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ARDiscard/ARDiscard.csproj b/ARDiscard/ARDiscard.csproj index f4863a7..49d083a 100644 --- a/ARDiscard/ARDiscard.csproj +++ b/ARDiscard/ARDiscard.csproj @@ -1,7 +1,7 @@ net7.0-windows - 3.7 + 3.8 11.0 enable true diff --git a/ARDiscard/GameData/InternalConfiguration.cs b/ARDiscard/GameData/InternalConfiguration.cs index 1fd26c4..c36008f 100644 --- a/ARDiscard/GameData/InternalConfiguration.cs +++ b/ARDiscard/GameData/InternalConfiguration.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; namespace ARDiscard.GameData; @@ -8,19 +9,22 @@ internal static class InternalConfiguration /// Not all of these *can* be discarded, but we shouldn't attempt it either. /// public static readonly IReadOnlyList BlacklistedItems = new List - { - 2820, // red onion helm + { + 2820, // red onion helm - 16039, // ala mhigan earrings - 24589, // aetheryte earrings - 33648, // menphina's earrings + 16039, // ala mhigan earrings + 24589, // aetheryte earrings + 33648, // menphina's earrings - 21197, // UCOB token - 23175, // UWU token - 28633, // TEA token - 36810, // DSR token - 38951, // TOP token - }.AsReadOnly(); + 21197, // UCOB token + 23175, // UWU token + 28633, // TEA token + 36810, // DSR token + 38951, // TOP token + } + .Concat(Enumerable.Range(1, 99).Select(x => (uint)x)) + .ToList() + .AsReadOnly(); /// /// Items that are unique/untradeable, but should still be possible to discard. This is moreso because diff --git a/ARDiscard/Windows/ConfigWindow.cs b/ARDiscard/Windows/ConfigWindow.cs index 673f337..b373942 100644 --- a/ARDiscard/Windows/ConfigWindow.cs +++ b/ARDiscard/Windows/ConfigWindow.cs @@ -380,6 +380,7 @@ internal sealed class ConfigWindow : LImGui.LWindow if (_allItems == null) { _allItems = _itemCache.AllItems + .Where(x => !InternalConfiguration.BlacklistedItems.Contains(x.ItemId)) .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 &&