aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2023-02-11 12:37:43 +0100
committerGitHub <noreply@github.com>2023-02-11 12:37:43 +0100
commit1d1017c55492175b8a2c2329d8c050c71c45ccfe (patch)
tree6e6a6633dd3aeb65a99c2bf72435aba2b83d925a /src/main/java/io
parent7cdf7b41bfe5f2631827e0512fffe079972af586 (diff)
downloadNotEnoughUpdates-1d1017c55492175b8a2c2329d8c050c71c45ccfe.tar.gz
NotEnoughUpdates-1d1017c55492175b8a2c2329d8c050c71c45ccfe.tar.bz2
NotEnoughUpdates-1d1017c55492175b8a2c2329d8c050c71c45ccfe.zip
Merge pull request #583
* 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.
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/MiscOverlays.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java4
3 files changed, 28 insertions, 2 deletions
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;
@@ -61,6 +60,15 @@ public class MiscOverlays {
@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",
desc = "\u00a7eDrag text to change the appearance of the overlay\n" +
"\u00a7rIf you want to see the time until something is available, click \"Add\" and then the respective timer"
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();