From 1d1017c55492175b8a2c2329d8c050c71c45ccfe Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 11 Feb 2023 12:37:43 +0100 Subject: Merge pull request #583 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bingo has already enough to do. * Typo. * Realization: Century Cakes exist. * I added back cakes, so I removed them back from the list of features … * Default enabled. --- .../options/seperateSections/MiscOverlays.java | 10 +++++++++- .../notenoughupdates/overlays/TimersOverlay.java | 16 +++++++++++++++- .../github/moulberry/notenoughupdates/util/SBInfo.java | 4 ++++ 3 files changed, 28 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java index 714dd7b7..5634a4b7 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java @@ -24,7 +24,6 @@ import io.github.moulberry.notenoughupdates.core.config.Position; import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigAccordionId; import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorAccordion; import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorBoolean; -import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorButton; import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorDraggableList; import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorDropdown; import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigOption; @@ -59,6 +58,15 @@ public class MiscOverlays { @ConfigAccordionId(id = 0) public boolean todoOverlayOnlyShowTab = false; + @Expose + @ConfigOption( + name = "Todo Overlay Hide Bingo", + desc = "Hide some tasks from the todo overlay while on a bingo profile: Cookie Buff, Godpot, Heavy Pearls, Crimson Isle Quests" + ) + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean todoOverlayHideAtBingo = true; + @Expose @ConfigOption( name = "Todo Text", diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java index 419c9785..90aa2984 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java @@ -898,12 +898,26 @@ public class TimersOverlay extends TextTabOverlay { overlayStrings = new ArrayList<>(); for (int index : NotEnoughUpdates.INSTANCE.config.miscOverlays.todoText2) { if (map.containsKey(index)) { - overlayStrings.add(map.get(index)); + String text = map.get(index); + if (hideBecauseOfBingo(text)) continue; + overlayStrings.add(text); } } if (overlayStrings.isEmpty()) overlayStrings = null; } + private boolean hideBecauseOfBingo(String text) { + if (!SBInfo.getInstance().bingo) return false; + if (!NotEnoughUpdates.INSTANCE.config.miscOverlays.todoOverlayHideAtBingo) return false; + + if (text.contains("Cookie Buff")) return true; + if (text.contains("Godpot")) return true; + if (text.contains("Heavy Pearls")) return true; + if (text.contains("Crimson Isle Quests")) return true; + + return false; + } + public static int beforePearls = -1; public static int afterPearls = -1; public static int availablePearls = -1; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java index 8ce765aa..d0af9091 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java @@ -86,6 +86,7 @@ public class SBInfo { public String objective = ""; public String slayer = ""; public boolean stranded = false; + public boolean bingo = false; public String mode = null; @@ -388,6 +389,7 @@ public class SBInfo { isInDungeon = tempIsInDungeon; boolean containsStranded = false; + boolean containsBingo = false; for (String line : lines) { //Slayer stuff if (line.contains("Tarantula Broodfather")) { slayer = "Tarantula"; @@ -422,8 +424,10 @@ public class SBInfo { } } if (line.contains("☀ Stranded")) containsStranded = true; + if (line.contains("Ⓑ Bingo")) containsBingo = true; } stranded = containsStranded; + bingo = containsBingo; if (lines.size() >= 5) { date = Utils.cleanColour(lines.get(1)).trim(); -- cgit