aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-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 {