aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
diff options
context:
space:
mode:
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.java31
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");
+ }
}
}