From f97ed6e1c08f86b6616f6708a2db0fbe3ad743d8 Mon Sep 17 00:00:00 2001 From: alexia Date: Sat, 2 Dec 2023 17:55:08 +0100 Subject: Use different color depending on pest count (#753) Use different color in tab list depending on pest count. #753 --- src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') 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 { -- cgit