Skip to content

Commit f97ed6e

Browse files
authored
Use different color depending on pest count (hannibal002#753)
Use different color in tab list depending on pest count. hannibal002#753
1 parent 514ca68 commit f97ed6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ private fun replaceString(text: String): String? {
3838
val hasPests = text.contains("")
3939
val pestSuffix = if (hasPests) {
4040
val pests = text.last().digitToInt()
41-
" §7(§4${pests}ൠ§7)"
41+
val color = if (pests >= 4) "§c" else "§6"
42+
" §7(${color}${pests}ൠ§7)"
4243
} else ""
4344
val name = plot?.let {
4445
if (it.isBarn()) "§aThe Barn" else {

0 commit comments

Comments
 (0)