summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/model
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-17 12:28:53 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-17 12:28:53 +0100
commit00b8eb5ab91b2870f8263e1ac8e66cb973916b1c (patch)
tree78953b61dd0237b2c2740a66839b2b51dffb99b2 /src/main/java/at/hannibal2/skyhanni/data/model
parentaee1bd5207a3193d05068fc046ef01e06fc1be67 (diff)
downloadskyhanni-00b8eb5ab91b2870f8263e1ac8e66cb973916b1c.tar.gz
skyhanni-00b8eb5ab91b2870f8263e1ac8e66cb973916b1c.tar.bz2
skyhanni-00b8eb5ab91b2870f8263e1ac8e66cb973916b1c.zip
Random regex code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/model')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt b/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt
index 4712689dc..627bfdef7 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/model/ComposterUpgrade.kt
@@ -10,9 +10,10 @@ enum class ComposterUpgrade(val displayName: String, val slotNumber: Int) {
companion object {
private fun regexValues() = entries.joinToString("|") { it.displayName }
+
// TODO USE SH-REPO
val regex = "§a(?<name>${regexValues()})(?: (?<level>.*))?".toPattern()
fun getByName(name: String) = entries.firstOrNull { it.displayName == name }
}
-} \ No newline at end of file
+}