From 7e007e7a9adf550e70b809ce8239dd9b5a15d45c Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Thu, 19 Dec 2024 20:57:25 +0100 Subject: feat: Add tab completion to query command --- src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt') diff --git a/src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt b/src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt index c269c3d..30610e9 100644 --- a/src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt +++ b/src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt @@ -137,7 +137,7 @@ class ItemIdProvider { ItemId("SKYBLOCK_POWDER_${generateName(it).string}") } ?: id.ifDropLast(" Essence") { ItemId("ESSENCE_${generateName(it).string}") - } ?: generateName(id) + } ?: generateName(id) } } return Pair(id, parseShortNumber(group("amount"))) @@ -155,4 +155,8 @@ class ItemIdProvider { } return findForName(properName, fallbackToGenerated)?.let { Pair(it, 1.0) } } + + fun getKnownItemIds(): Collection { + return knownNames.values + } } \ No newline at end of file -- cgit