From be5d92abdeeaa03cd201065b46e90a843f1663ba Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Wed, 5 Apr 2023 04:09:09 +1000 Subject: 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 --- .../github/moulberry/notenoughupdates/ItemPriceInformation.java | 9 +++++++++ .../notenoughupdates/options/seperateSections/TooltipTweaks.java | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'src/main') 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 @@ -73,6 +73,15 @@ public class TooltipTweaks { @ConfigAccordionId(id = 0) public List priceInfoBaz = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4)); + @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", -- cgit