diff options
| author | GodOfPro <59516901+GodOfProDev@users.noreply.github.com> | 2022-11-20 14:02:47 +0330 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-20 21:32:47 +1100 |
| commit | 69b2de53866b665a5b63c08afd3d92c0d068e812 (patch) | |
| tree | 0ce9cf9e6e3893a579246bd3b80f9397a2242948 /src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java | |
| parent | 5b3f8b0fad77d00f8f6bbd849fecd495421c3d91 (diff) | |
| download | notenoughupdates-69b2de53866b665a5b63c08afd3d92c0d068e812.tar.gz notenoughupdates-69b2de53866b665a5b63c08afd3d92c0d068e812.tar.bz2 notenoughupdates-69b2de53866b665a5b63c08afd3d92c0d068e812.zip | |
Added Senither Weight Leaderboard Position (#436)
Co-authored-by: nopo <nopotheemail@gmail.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java index 97db29cf..30ac269b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java @@ -306,13 +306,12 @@ public class BasicPage extends GuiProfileViewerPage { if (NotEnoughUpdates.INSTANCE.config.profileViewer.useSoopyNetworth && profile.getSoopyNetworthLeaderboardPosition() >= 0 - && profile.isProfileMaxSoopyNetworth(profileId)) { + && profile.isProfileMaxSoopyWeight(profile, profileId)) { String lbPosStr = EnumChatFormatting.DARK_GREEN + "#" + EnumChatFormatting.GOLD + GuiProfileViewer.numberFormat.format( profile.getSoopyNetworthLeaderboardPosition()); - getInstance().tooltipToDisplay.add(lbPosStr + EnumChatFormatting.GREEN + " on the networth leaderboard!"); - getInstance().tooltipToDisplay.add(""); + getInstance().tooltipToDisplay.add(lbPosStr + EnumChatFormatting.GREEN + " on soopy's networth leaderboard!"); } if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { @@ -809,6 +808,9 @@ public class BasicPage extends GuiProfileViewerPage { return; } + ProfileViewer.Profile profile = GuiProfileViewer.getProfile(); + String profileId = GuiProfileViewer.getProfileId(); + if (Constants.WEIGHT == null || Utils.getElement(Constants.WEIGHT, "lily.skills.overall") == null || !Utils.getElement(Constants.WEIGHT, "lily.skills.overall").isJsonPrimitive()) { Utils.showOutdatedRepoNotification(); @@ -822,6 +824,12 @@ public class BasicPage extends GuiProfileViewerPage { SenitherWeight senitherWeight = new SenitherWeight(skyblockInfo); LilyWeight lilyWeight = new LilyWeight(skyblockInfo, profileInfo); + long weight = -2L; + if (NotEnoughUpdates.INSTANCE.config.profileViewer.useSoopyNetworth) { + weight = profile.getSoopyWeightLeaderboardPosition(); + } + + Utils.drawStringCentered( EnumChatFormatting.GREEN + "Senither Weight: " + @@ -870,6 +878,23 @@ public class BasicPage extends GuiProfileViewerPage { roundToNearestInt(senitherWeight.getDungeonsWeight().getWeightStruct().getRaw()) ) ); + + if (NotEnoughUpdates.INSTANCE.config.profileViewer.useSoopyNetworth + && profile.isProfileMaxSoopyWeight(profile, profileId)) { + + String lbPosStr = + EnumChatFormatting.DARK_GREEN + "#" + EnumChatFormatting.GOLD + GuiProfileViewer.numberFormat.format( + profile.getSoopyWeightLeaderboardPosition()); + getInstance().tooltipToDisplay.add(""); + String stateStr = EnumChatFormatting.RED + "An error occured"; + if (weight == -2) { + stateStr = EnumChatFormatting.YELLOW + "Loading"; + } + if (weight > 0) + getInstance().tooltipToDisplay.add(lbPosStr + EnumChatFormatting.GREEN + " on soopy's weight leaderboard!"); + else + getInstance().tooltipToDisplay.add(stateStr + " soopy's weight leaderboard"); + } } } |
