aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-12-19 20:57:25 +0100
committerLinnea Gräf <nea@nea.moe>2024-12-19 20:57:25 +0100
commit7e007e7a9adf550e70b809ce8239dd9b5a15d45c (patch)
tree00a83f44ad600896fda7233a64c9767545966844 /src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt
parent4d40f0fa713bc396def07f3f9e4760bf78b97777 (diff)
downloadLocalTransactionLedger-7e007e7a9adf550e70b809ce8239dd9b5a15d45c.tar.gz
LocalTransactionLedger-7e007e7a9adf550e70b809ce8239dd9b5a15d45c.tar.bz2
LocalTransactionLedger-7e007e7a9adf550e70b809ce8239dd9b5a15d45c.zip
feat: Add tab completion to query command
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt')
-rw-r--r--src/main/kotlin/moe/nea/ledger/ItemIdProvider.kt6
1 files changed, 5 insertions, 1 deletions
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<ItemId> {
+ return knownNames.values
+ }
} \ No newline at end of file