From ac74ab8c13cf486cf36cb911f0a723908b0c5072 Mon Sep 17 00:00:00 2001 From: heyngra Date: Fri, 9 Dec 2022 12:45:29 +0100 Subject: Make MinionHelper show North Stars without a price (#482) fixes https://github.com/NotEnoughUpdates/NotEnoughUpdates/issues/472 --- .../miscgui/minionhelper/render/MinionHelperOverlayHover.java | 6 ++++++ .../miscgui/minionhelper/util/MinionHelperPriceCalculation.java | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java index fcafa534..84678c0c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java @@ -253,6 +253,12 @@ public class MinionHelperOverlayHover { lines.add(" §8- §5" + peltCount + "§8/§5" + amount + " Pelts"); continue; } + if (internalName.equals("SKYBLOCK_NORTH_STAR")) { + // North Stars are not in the API + + lines.add(" §8- §a" + amount + "§7x §d" + "North Star"); + continue; + } String name = NotEnoughUpdates.INSTANCE.manager.getDisplayName(internalName); double price = manager.getPriceCalculation().getPrice(internalName); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java index 8f75b32c..cb43100b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/util/MinionHelperPriceCalculation.java @@ -84,6 +84,10 @@ public class MinionHelperPriceCalculation { int amount = items.get("SKYBLOCK_PELT").get(0); result += " §7+ §5" + amount + " Pelts"; } + if (items.containsKey("SKYBLOCK_NORTH_STAR")) { + int amount = items.get("SKYBLOCK_NORTH_STAR").get(0); + result += " §7+ §d" + amount + " North Stars"; + } } if (upgradeOnly) { -- cgit