aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-06-28 05:15:12 +1000
committerGitHub <noreply@github.com>2023-06-27 21:15:12 +0200
commit8eab7d2432eb35acae7dc14c22428c9192f3fd61 (patch)
tree3ff76fde96cc4c5cbc2f467a83023c89503fd860 /src/main/java/at/hannibal2/skyhanni/features
parentc2818f0e214e00f9e229fc18d487fa922c92defe (diff)
downloadskyhanni-8eab7d2432eb35acae7dc14c22428c9192f3fd61.tar.gz
skyhanni-8eab7d2432eb35acae7dc14c22428c9192f3fd61.tar.bz2
skyhanni-8eab7d2432eb35acae7dc14c22428c9192f3fd61.zip
Merge pull request #257
* made text coloured and on by default * small code cleanup * registers on an unused hook
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
index 60680897b..2622c8f14 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -164,8 +164,13 @@ class ItemDisplayOverlayFeatures {
if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(12)) {
if (item.getInternalName() == "LARVA_HOOK") {
for (line in item.getLore()) {
- "§7§7You may harvest §6(?<amount>.)/.*".toPattern().matchMatcher(line) {
- return group("amount")
+ "§7§7You may harvest §6(?<amount>.).*".toPattern().matchMatcher(line) {
+ val amount = group("amount").toInt()
+ return when {
+ amount > 4 -> "§a$amount"
+ amount > 2 -> "§e$amount"
+ else -> "§c$amount"
+ }
}
}
}