Skip to content

Commit

Permalink
Use different color depending on pest count (#753)
Browse files Browse the repository at this point in the history
Use different color in tab list depending on pest count. #753
  • Loading branch information
qtlunya authored Dec 2, 2023
1 parent 514ca68 commit f97ed6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f97ed6e

Please sign in to comment.