aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorLulonaut <lulonaut@tutanota.de>2023-06-08 09:34:50 +0200
committerGitHub <noreply@github.com>2023-06-08 17:34:50 +1000
commitabf5e1541e936f821216f11e285a33f2a50794b4 (patch)
tree8087e0f3e2f8127091b724f3c6aceec6ea13071b /src/main/java
parent374a1f1bb7b884622824d804592b83bb7d4094bc (diff)
downloadNotEnoughUpdates-abf5e1541e936f821216f11e285a33f2a50794b4.tar.gz
NotEnoughUpdates-abf5e1541e936f821216f11e285a33f2a50794b4.tar.bz2
NotEnoughUpdates-abf5e1541e936f821216f11e285a33f2a50794b4.zip
Add museum donation status to tooltip (#710)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java11
2 files changed, 23 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
index 6e7f83e4..64e83b3b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
+ * Copyright (C) 2022-2023 NotEnoughUpdates contributors
*
* This file is part of NotEnoughUpdates.
*
@@ -24,6 +24,7 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import io.github.moulberry.notenoughupdates.auction.APIManager;
import io.github.moulberry.notenoughupdates.core.config.KeybindHelper;
+import io.github.moulberry.notenoughupdates.miscfeatures.inventory.MuseumTooltipManager;
import io.github.moulberry.notenoughupdates.util.Constants;
import io.github.moulberry.notenoughupdates.util.Utils;
import io.github.moulberry.notenoughupdates.util.hypixelapi.HypixelItemAPI;
@@ -463,6 +464,17 @@ public class ItemPriceInformation {
tooltip.add("");
tooltip.add(formatPrice("NPC Sell Price: ", npcSellPrice * stackMultiplier));
}
+
+ if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.museumDonationStatus) {
+ if (!MuseumTooltipManager.INSTANCE.hasPlayerVisitedMuseum()) {
+ tooltip.add(EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() +
+ "[NEU] Visit your Museum to display donation status");
+ }
+ if (MuseumTooltipManager.INSTANCE.isItemDonated(internalname)) {
+ tooltip.add(
+ EnumChatFormatting.YELLOW + "Item already donated to museum");
+ }
+ }
}
private static String formatPrice(String label, double price) {
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 2957015b..e24800be 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
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
+ * Copyright (C) 2022-2023 NotEnoughUpdates contributors
*
* This file is part of NotEnoughUpdates.
*
@@ -104,6 +104,15 @@ public class TooltipTweaks {
@Expose
@ConfigOption(
+ name = "Display donation status",
+ desc = "Add an extra line on items you have already donated to the museum. Visit all pages of the museum to populate this list."
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 0)
+ public boolean museumDonationStatus = true;
+
+ @Expose
+ @ConfigOption(
name = "Use Short Number Format",
desc = "Use Short Numbers (5.1m) instead of 5,130,302"
)