aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorefefury <69400149+efefury@users.noreply.github.com>2022-12-31 00:48:37 +0000
committerGitHub <noreply@github.com>2022-12-31 11:48:37 +1100
commit400033abc97a281b3ca71a771734f139b7949875 (patch)
tree549629dc2e6e8817c1c57aa3117e53b3e9384e9a /src/main/java/io
parent354aed689ae3d5d7bfd8ab1d7ce9002127b8c526 (diff)
downloadNotEnoughUpdates-400033abc97a281b3ca71a771734f139b7949875.tar.gz
NotEnoughUpdates-400033abc97a281b3ca71a771734f139b7949875.tar.bz2
NotEnoughUpdates-400033abc97a281b3ca71a771734f139b7949875.zip
show neu nw if soopy doesn't work (#532)
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java29
1 files changed, 15 insertions, 14 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 30ac269b..873ee9f2 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
@@ -265,6 +265,16 @@ public class BasicPage extends GuiProfileViewerPage {
networth = profile.getNetWorth(profileId);
}
+ //Networth is under 0
+ //If = -1 -> an error occurred
+ //If = -2 -> still loading networth
+ String stateStr = EnumChatFormatting.RED + "An error occurred";
+ if (networth == -2) {
+ stateStr = EnumChatFormatting.YELLOW + "Loading...";
+ } else if (networth == -1) {
+ networth = profile.getNetWorth(profileId);
+ }
+
if (networth > 0) {
Utils.drawStringCentered(
EnumChatFormatting.GREEN + "Net Worth: " + EnumChatFormatting.GOLD +
@@ -302,16 +312,16 @@ public class BasicPage extends GuiProfileViewerPage {
EnumChatFormatting.GOLD +
networthIRLMoney
);
- getInstance().tooltipToDisplay.add("");
if (NotEnoughUpdates.INSTANCE.config.profileViewer.useSoopyNetworth
&& profile.getSoopyNetworthLeaderboardPosition() >= 0
&& profile.isProfileMaxSoopyWeight(profile, profileId)) {
-
+ getInstance().tooltipToDisplay.add("");
String lbPosStr =
EnumChatFormatting.DARK_GREEN + "#" + EnumChatFormatting.GOLD + GuiProfileViewer.numberFormat.format(
profile.getSoopyNetworthLeaderboardPosition());
- getInstance().tooltipToDisplay.add(lbPosStr + EnumChatFormatting.GREEN + " on soopy's networth leaderboard!");
+ getInstance().tooltipToDisplay.add(
+ lbPosStr + EnumChatFormatting.GREEN + " on soopy's networth leaderboard!");
}
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
@@ -336,15 +346,6 @@ public class BasicPage extends GuiProfileViewerPage {
}
}
} else {
- //Networth is under 0
- //If = -1 -> an error occured
- //If = -2 -> still loading networth
-
- String stateStr = EnumChatFormatting.RED + "An error occured";
- if (networth == -2) {
- stateStr = EnumChatFormatting.YELLOW + "Loading...";
- }
-
Utils.drawStringCentered(
EnumChatFormatting.GREEN + "Net Worth: " + stateStr,
fr,
@@ -886,14 +887,14 @@ public class BasicPage extends GuiProfileViewerPage {
EnumChatFormatting.DARK_GREEN + "#" + EnumChatFormatting.GOLD + GuiProfileViewer.numberFormat.format(
profile.getSoopyWeightLeaderboardPosition());
getInstance().tooltipToDisplay.add("");
- String stateStr = EnumChatFormatting.RED + "An error occured";
+ String stateStr = EnumChatFormatting.RED + "An error occurred";
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");
+ getInstance().tooltipToDisplay.add(stateStr + " on soopy's weight leaderboard");
}
}
}