aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
diff options
context:
space:
mode:
authorefefury <69400149+efefury@users.noreply.github.com>2022-11-20 11:53:21 +0000
committerGitHub <noreply@github.com>2022-11-20 12:53:21 +0100
commitc7989c3a139ebf058c816f1312c29b7b4ef293b3 (patch)
tree1953b46e609cde2a5cf02893e3ea1d0aff8e398e /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
parent69b2de53866b665a5b63c08afd3d92c0d068e812 (diff)
downloadnotenoughupdates-c7989c3a139ebf058c816f1312c29b7b4ef293b3.tar.gz
notenoughupdates-c7989c3a139ebf058c816f1312c29b7b4ef293b3.tar.bz2
notenoughupdates-c7989c3a139ebf058c816f1312c29b7b4ef293b3.zip
Fixed bugs & added sb xp to minion helper (#443)
* fixed minion helper bugs and croesus thing * fixed another npe * no more NPEs with missing/broken repo * properly handle repo error and show error message when exp gain is not in repo Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
index 7caa4d6b..34a40c2f 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
@@ -204,8 +204,8 @@ public class DungeonNpcProfitOverlay {
Utils.renderAlignedString(
chestProfit.name,
(chestProfit.profit > 0
- ? EnumChatFormatting.GREEN.toString()
- : EnumChatFormatting.RED) + Utils.shortNumberFormat(chestProfit.profit, 0),
+ ? EnumChatFormatting.GREEN + Utils.shortNumberFormat(chestProfit.profit, 0)
+ : EnumChatFormatting.RED + "-" + Utils.shortNumberFormat(-chestProfit.profit, 0)),
x,
y,
160
@@ -273,8 +273,12 @@ public class DungeonNpcProfitOverlay {
lore.add(
EnumChatFormatting.AQUA + "Cost to open: " + EnumChatFormatting.RED + Utils.shortNumberFormat(costToOpen, 0));
lore.add(
- EnumChatFormatting.AQUA + "Total profit: " + (profit > 0 ? EnumChatFormatting.GREEN : EnumChatFormatting.RED) +
- Utils.shortNumberFormat(profit, 0));
+ EnumChatFormatting.AQUA + "Total profit: " +
+ (profit > 0 ? EnumChatFormatting.GREEN + Utils.shortNumberFormat(profit, 0)
+ : EnumChatFormatting.RED + "-" + Utils.shortNumberFormat(
+ -profit,
+ 0
+ )));
}
}