aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authoralexia <me@alexia.lol>2023-12-02 17:55:08 +0100
committerGitHub <noreply@github.com>2023-12-02 17:55:08 +0100
commitf97ed6e1c08f86b6616f6708a2db0fbe3ad743d8 (patch)
treeb72408bd392678b4795560bcbcea5b2955964bb1 /src/main/java/at/hannibal2/skyhanni
parent514ca686a139e2286958570b4adcfe51e2d6d8e7 (diff)
downloadskyhanni-f97ed6e1c08f86b6616f6708a2db0fbe3ad743d8.tar.gz
skyhanni-f97ed6e1c08f86b6616f6708a2db0fbe3ad743d8.tar.bz2
skyhanni-f97ed6e1c08f86b6616f6708a2db0fbe3ad743d8.zip
Use different color depending on pest count (#753)
Use different color in tab list depending on pest count. #753
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt
index 8eb8442cd..896313d12 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt
@@ -38,7 +38,8 @@ private fun replaceString(text: String): String? {
val hasPests = text.contains("ൠ")
val pestSuffix = if (hasPests) {
val pests = text.last().digitToInt()
- " §7(§4${pests}ൠ§7)"
+ val color = if (pests >= 4) "§c" else "§6"
+ " §7(${color}${pests}ൠ§7)"
} else ""
val name = plot?.let {
if (it.isBarn()) "§aThe Barn" else {