diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-11-27 22:21:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 22:21:41 +0100 |
commit | 2352b74bb9764eb0bfa96c786182a38e0967fa35 (patch) | |
tree | b2cc465cc3e4b4a45435ac58b7ea78711d1f6ce5 /src/main | |
parent | de0accead4110bf9aa49e4de7202b8d4da55ecff (diff) | |
download | NotEnoughUpdates-2352b74bb9764eb0bfa96c786182a38e0967fa35.tar.gz NotEnoughUpdates-2352b74bb9764eb0bfa96c786182a38e0967fa35.tar.bz2 NotEnoughUpdates-2352b74bb9764eb0bfa96c786182a38e0967fa35.zip |
Green maxed Trophy Fish progress (#954)
mark green if maxed
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/trophy/TrophyFishPage.java | 7 |
1 files changed, 4 insertions, 3 deletions
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<String> getTooltip(String name, Map<TrophyFish.TrophyFishRarity, Integer> trophyFishRarityIntegerMap) { List<String> 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<String> lore = readLoreFromRepo(name.toUpperCase(Locale.US)); List<String> description = readDescriptionFromLore(lore); |