aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
diff options
context:
space:
mode:
authorMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-04 05:36:16 +1100
committerMoulberry <james.jenour@student.scotch.wa.edu.au>2020-11-04 05:36:16 +1100
commitf89c363dda53046d832089d94f04695ce60d3ae6 (patch)
treefdbff20257b9fc4ff2f6ea82011f1fc6f95c0244 /src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
parent36af336e49662390c0f553da6f7f5ec424e5d37b (diff)
downloadnotenoughupdates-f89c363dda53046d832089d94f04695ce60d3ae6.tar.gz
notenoughupdates-f89c363dda53046d832089d94f04695ce60d3ae6.tar.bz2
notenoughupdates-f89c363dda53046d832089d94f04695ce60d3ae6.zip
fine 1.5.3
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index b2742bf9..73381955 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -2033,34 +2033,31 @@ public class NEUOverlay extends Gui {
}
} else if(hasBazaarPrice) {
+ int stackMultiplier = 1;
+ int shiftStackMultiplier = 64;
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
- int bazaarBuyPrice = (int)bazaarInfo.get("avg_buy").getAsFloat()*64;
- text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Buy (Stack): "+
- EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarBuyPrice)+" coins");
- int bazaarSellPrice = (int)bazaarInfo.get("avg_sell").getAsFloat()*64;
- text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Sell (Stack): "+
- EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarSellPrice)+" coins");
- if(manager.config.advancedPriceInfo.value) {
- int bazaarInstantBuyPrice = (int)bazaarInfo.get("curr_buy").getAsFloat()*64;
- text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Insta-Buy (Stack): "+
- EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarInstantBuyPrice)+" coins");
- int bazaarInstantSellPrice = (int)bazaarInfo.get("curr_sell").getAsFloat()*64;
- text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Insta-Sell (Stack): "+
- EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarInstantSellPrice)+" coins");
- }
+ stackMultiplier = shiftStackMultiplier;
} else {
- text.add(EnumChatFormatting.DARK_GRAY.toString()+"[SHIFT show stack]");
- int bazaarBuyPrice = (int)bazaarInfo.get("avg_buy").getAsFloat();
+ text.add(EnumChatFormatting.DARK_GRAY.toString()+"[SHIFT show x"+shiftStackMultiplier+"]");
+ }
+ if(bazaarInfo.has("avg_buy")) {
+ int bazaarBuyPrice = (int)bazaarInfo.get("avg_buy").getAsFloat()*stackMultiplier;
text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Buy: "+
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarBuyPrice)+" coins");
- int bazaarSellPrice = (int)bazaarInfo.get("avg_sell").getAsFloat();
+ }
+ if(bazaarInfo.has("avg_sell")) {
+ int bazaarSellPrice = (int)bazaarInfo.get("avg_sell").getAsFloat()*stackMultiplier;
text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Sell: "+
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarSellPrice)+" coins");
- if(manager.config.advancedPriceInfo.value) {
- int bazaarInstantBuyPrice = (int)bazaarInfo.get("curr_buy").getAsFloat();
+ }
+ if(manager.config.advancedPriceInfo.value) {
+ if(bazaarInfo.has("curr_buy")) {
+ int bazaarInstantBuyPrice = (int)bazaarInfo.get("curr_buy").getAsFloat()*stackMultiplier;
text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Insta-Buy: "+
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarInstantBuyPrice)+" coins");
- int bazaarInstantSellPrice = (int)bazaarInfo.get("curr_sell").getAsFloat();
+ }
+ if(bazaarInfo.has("curr_sell")) {
+ int bazaarInstantSellPrice = (int)bazaarInfo.get("curr_sell").getAsFloat()*stackMultiplier;
text.add(EnumChatFormatting.YELLOW.toString()+EnumChatFormatting.BOLD+"Bazaar Insta-Sell: "+
EnumChatFormatting.GOLD+EnumChatFormatting.BOLD+format.format(bazaarInstantSellPrice)+" coins");
}