aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2023-04-05 04:09:09 +1000
committerGitHub <noreply@github.com>2023-04-04 20:09:09 +0200
commitbe5d92abdeeaa03cd201065b46e90a843f1663ba (patch)
tree4f4c2c6d4169049d2560984d6030dac7b1fa71d4 /src/main/java
parente00d51e54b9c7303097ecd264412ed7b98f1f804 (diff)
downloadNotEnoughUpdates-be5d92abdeeaa03cd201065b46e90a843f1663ba.tar.gz
NotEnoughUpdates-be5d92abdeeaa03cd201065b46e90a843f1663ba.tar.bz2
NotEnoughUpdates-be5d92abdeeaa03cd201065b46e90a843f1663ba.zip
Fixed craft cost on items that cant be sold like minions (#665)
* Fixed craft cost on items that cant be sold (minions) * add config option
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java9
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
index c46b7bb1..537ba270 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -365,6 +365,15 @@ public class ItemPriceInformation {
}
}
+ } else if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.rawCraft && craftCost != null && craftCost.fromRecipe) {
+
+ if (craftCost.craftCost == 0) return;
+ double cost = craftCost.craftCost;
+ int shiftStackMultiplier = useStackSize && stack.stackSize > 1 ? stack.stackSize : 64;
+ if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) cost = cost * shiftStackMultiplier;
+ tooltip.add("");
+ tooltip.add(formatPrice("Raw Craft Cost: ", cost));
+
} else if (auctionInfoErrored && NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) {
String message = EnumChatFormatting.RED.toString() + EnumChatFormatting.BOLD + "[NEU] API is down";
if (auctionableItems != null && !auctionableItems.isEmpty()) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
index a9dae604..900ecf13 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
@@ -75,6 +75,15 @@ public class TooltipTweaks {
@Expose
@ConfigOption(
+ name = "Show raw craft on items that can't be sold",
+ desc = "Raw craft cost will be shown on items that can't be sold on the ah or bz"
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean rawCraft = true;
+
+ @Expose
+ @ConfigOption(
name = "Use Short Number Format",
desc = "Use Short Numbers (5.1m) instead of 5,130,302"
)