aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/io
diff options
context:
space:
mode:
authorLulonaut <lulonaut@tutanota.de>2022-12-28 14:15:05 +0100
committerLulonaut <lulonaut@tutanota.de>2022-12-28 14:15:05 +0100
commitd17ec9b2b2d1ad8dae4633b08e740bf878301189 (patch)
tree3dac6586732cfae7e35a70c683d9c2e5342373f4 /src/main/kotlin/io
parentc7d2826c366803c3a0ad0bb0870191f910dc8ab0 (diff)
downloadNotEnoughUpdates-d17ec9b2b2d1ad8dae4633b08e740bf878301189.tar.gz
NotEnoughUpdates-d17ec9b2b2d1ad8dae4633b08e740bf878301189.tar.bz2
NotEnoughUpdates-d17ec9b2b2d1ad8dae4633b08e740bf878301189.zip
fix duplicates
Diffstat (limited to 'src/main/kotlin/io')
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/MuseumCheapestItemOverlay.kt4
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 {