diff options
author | Lulonaut <lulonaut@tutanota.de> | 2022-12-28 14:15:05 +0100 |
---|---|---|
committer | Lulonaut <lulonaut@tutanota.de> | 2022-12-28 14:15:05 +0100 |
commit | d17ec9b2b2d1ad8dae4633b08e740bf878301189 (patch) | |
tree | 3dac6586732cfae7e35a70c683d9c2e5342373f4 /src/main | |
parent | c7d2826c366803c3a0ad0bb0870191f910dc8ab0 (diff) | |
download | NotEnoughUpdates-d17ec9b2b2d1ad8dae4633b08e740bf878301189.tar.gz NotEnoughUpdates-d17ec9b2b2d1ad8dae4633b08e740bf878301189.tar.bz2 NotEnoughUpdates-d17ec9b2b2d1ad8dae4633b08e740bf878301189.zip |
fix duplicates
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/MuseumCheapestItemOverlay.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/MuseumCheapestItemOverlay.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/MuseumCheapestItemOverlay.kt index bb4ae936..6cd102c9 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/MuseumCheapestItemOverlay.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/MuseumCheapestItemOverlay.kt @@ -198,6 +198,7 @@ object MuseumCheapestItemOverlay { ) val monochromeName = NEUManager.cleanForTitleMapSearch(itemName) val candidates = monochromeName.split(" ") + .asSequence() .mapNotNull { NotEnoughUpdates.INSTANCE.manager.titleWordMap[it]?.keys } .flatten() .filter { @@ -209,6 +210,9 @@ object MuseumCheapestItemOverlay { item.contains(it) } } + //filter out duplicates + .toSet() + .toList() return candidates } else { |