From 2352b74bb9764eb0bfa96c786182a38e0967fa35 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Mon, 27 Nov 2023 22:21:41 +0100 Subject: Green maxed Trophy Fish progress (#954) mark green if maxed Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../notenoughupdates/profileviewer/trophy/TrophyFishPage.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java index 2695f8d0..fad950fb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java @@ -276,7 +276,7 @@ public class TrophyFishPage extends GuiProfileViewerPage { int hasValue = trophiesPerTier[integer - 1]; int neededValue = integer == 1 ? 15 : 18; - String neededText = "§c" + hasValue + "/" + neededValue; + String neededText = (hasValue == neededValue ? "§a" : "§c") + hasValue + "/" + neededValue; try { JsonElement jsonElement = rewards.get(integer - 1); @@ -308,7 +308,7 @@ public class TrophyFishPage extends GuiProfileViewerPage { } private int[] getTrophiesPerTier(JsonObject trophyFish) { - int[] trophiesPerTier = new int[] { 0, 0, 0, 0 }; + int[] trophiesPerTier = new int[]{0, 0, 0, 0}; for (String fishType : internalTrophyFish.keySet()) { int highestTier = 0; if (trophyFish.has((fishType + "_bronze"))) highestTier = 1; @@ -326,7 +326,8 @@ public class TrophyFishPage extends GuiProfileViewerPage { private List getTooltip(String name, Map trophyFishRarityIntegerMap) { List tooltip = new ArrayList<>(); - tooltip.add(internalTrophyFish.get(name.toLowerCase(Locale.US).replace(" ", "_")) + WordUtils.capitalize(name.replace("_", " "))); + tooltip.add(internalTrophyFish.get(name.toLowerCase(Locale.US).replace(" ", "_")) + + WordUtils.capitalize(name.replace("_", " "))); List lore = readLoreFromRepo(name.toUpperCase(Locale.US)); List description = readDescriptionFromLore(lore); -- cgit