diff options
author | Vixid <52578495+Vixid1@users.noreply.github.com> | 2022-12-12 17:29:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-12 18:29:58 +0100 |
commit | dd91ed7db4a4323126a04ac88bd8a4c6d6c9c82d (patch) | |
tree | 6d06c948a2f7775a64357b346eb1a69c388a71c5 /src/main/java | |
parent | 7603f56ca7b2d2654fdde2f7a81bdd97f1b66a61 (diff) | |
download | NotEnoughUpdates-dd91ed7db4a4323126a04ac88bd8a4c6d6c9c82d.tar.gz NotEnoughUpdates-dd91ed7db4a4323126a04ac88bd8a4c6d6c9c82d.tar.bz2 NotEnoughUpdates-dd91ed7db4a4323126a04ac88bd8a4c6d6c9c82d.zip |
Added Highest Wave completed to Kuudra stats in pv (#489)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java index f9d91935..87548f5e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/CrimsonIslePage.java @@ -32,6 +32,7 @@ import org.lwjgl.opengl.GL11; import java.text.DateFormat; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.LinkedHashMap; @@ -129,7 +130,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage { drawDojoStats(netherIslandPlayerData, guiLeft, guiTop); // Kuudra stats - drawKuudraStats(netherIslandPlayerData, guiLeft, guiTop); + drawKuudraStats(netherIslandPlayerData, guiLeft, guiTop, mouseX, mouseY); // Last matriarch attempt drawLastMatriarchAttempt(netherIslandPlayerData, guiLeft, guiTop); @@ -138,7 +139,7 @@ public class CrimsonIslePage extends GuiProfileViewerPage { drawFactionReputation(netherIslandPlayerData, guiLeft, guiTop); } - public void drawKuudraStats(JsonObject data, int guiLeft, int guiTop) { + public void drawKuudraStats(JsonObject data, int guiLeft, int guiTop, int mouseX, int mouseY) { Utils.drawStringCentered( EnumChatFormatting.RED + "Kuudra Stats", Minecraft.getMinecraft().fontRendererObj, @@ -161,26 +162,48 @@ public class CrimsonIslePage extends GuiProfileViewerPage { int completions = kuudraCompletedTiers.has(kuudraTiers[i]) ? kuudraCompletedTiers.get(kuudraTiers[i]).getAsInt() : 0; + // Get the highest wave for this tier of kuudra if they have completed a run + // since infernal kuudra was released + int highestWaveCompleted = kuudraCompletedTiers.has("highest_wave_" + kuudraTiers[i]) ? + kuudraCompletedTiers.get("highest_wave_" + kuudraTiers[i]).getAsInt() : 0; + Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI( KUUDRA_KEYS[i], guiLeft + 8, - guiTop + 25 + (i * 12) + guiTop + 30 + (i * 30) ); Utils.renderAlignedString( EnumChatFormatting.RED + KUUDRA_TIERS[i] + ": ", EnumChatFormatting.WHITE + String.valueOf(completions), guiLeft + 23, - guiTop + 30 + (i * 12), + guiTop + 30 + (i * 30), + 110 + ); + + Utils.renderAlignedString( + EnumChatFormatting.RED + "Highest Wave: ", + EnumChatFormatting.WHITE + (highestWaveCompleted != 0 ? String.valueOf(highestWaveCompleted) : "N/A"), + guiLeft + 23, + guiTop + 42 + (i * 30), 110 ); + + if (highestWaveCompleted == 0) { + if (mouseX > guiLeft + 23 && mouseX < guiLeft + 133 && mouseY < guiTop + 50 + (i*30) && mouseY > guiTop + 42 + (i*30)) { + getInstance().tooltipToDisplay = new ArrayList<>(); + getInstance().tooltipToDisplay.add(EnumChatFormatting.RED + "N/A will only show for highest wave"); + getInstance().tooltipToDisplay.add(EnumChatFormatting.RED + "if you have not completed a run for"); + getInstance().tooltipToDisplay.add(EnumChatFormatting.RED + "this tier since Infernal tier was released."); + } + } } Utils.renderAlignedString( - EnumChatFormatting.RED + "Total: ", + EnumChatFormatting.RED + "Total runs: ", EnumChatFormatting.WHITE + String.valueOf(getTotalKuudraRuns(kuudraCompletedTiers)), guiLeft + 23, - guiTop + 40 + (5 * 12), + guiTop + 30 + (5 * 30), 110 ); } |