From e9b2aa9b40150ad3e602d9f6e2674a7383f41c60 Mon Sep 17 00:00:00 2001 From: DoKM Date: Sun, 25 Jul 2021 21:08:51 +0200 Subject: Add a toggle for showing reforge stats on a reforge stone --- .../io/github/moulberry/notenoughupdates/NEUEventListener.java | 3 ++- .../notenoughupdates/options/seperateSections/TooltipTweaks.java | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java index b849c890..3240de03 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java @@ -1721,9 +1721,10 @@ public class NEUEventListener { int index = 0; List newTooltip = new ArrayList<>(); for(String line : event.toolTip) { - if(line.endsWith(EnumChatFormatting.DARK_GRAY+"Reforge Stone")) { + if(line.endsWith(EnumChatFormatting.DARK_GRAY+"Reforge Stone") && NotEnoughUpdates.INSTANCE.config.tooltipTweaks.showReforgeStats) { JsonObject reforgeStones = Constants.REFORGESTONES; + if(reforgeStones != null && reforgeStones.has(internalname)) { boolean shift = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); if(!pressedShiftLast && shift) { 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 e1b9780a..b7fb3433 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 @@ -60,6 +60,14 @@ public class TooltipTweaks { @ConfigEditorBoolean public boolean showPriceInfoAucItem = true; + @Expose + @ConfigOption( + name = "Show reforge stats", + desc = "Show statistics a reforge stone will apply." + ) + @ConfigEditorBoolean + public boolean showReforgeStats = true; + @Expose @ConfigOption( name = "Missing Enchant List", -- cgit