aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-07-07 14:48:04 +0200
committerDoKM <mcazzyman@gmail.com>2021-07-07 14:48:04 +0200
commita2156de62b477cbd89aa3469a1e7a53477c0736e (patch)
tree3fc6196fa7572c5c1264be308cfa15f057788656 /src/main/java
parentbc6a76d6b5348b450ffc2e398030da6128a31cae (diff)
downloadNotEnoughUpdates-a2156de62b477cbd89aa3469a1e7a53477c0736e.tar.gz
NotEnoughUpdates-a2156de62b477cbd89aa3469a1e7a53477c0736e.tar.bz2
NotEnoughUpdates-a2156de62b477cbd89aa3469a1e7a53477c0736e.zip
fix 1s on godpot when godpot runs out due to not finding godpot text in tab
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java9
1 files changed, 9 insertions, 0 deletions
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 2a67d384..73371462 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
@@ -206,11 +206,13 @@ public class TimersOverlay extends TextOverlay {
}
boolean foundCookieBuffText = false;
+ boolean foundGodPotText = false;
if(SBInfo.getInstance().getLocation() != null && !SBInfo.getInstance().getLocation().equals("dungeon") && SBInfo.getInstance().footer != null) {
String formatted = SBInfo.getInstance().footer.getFormattedText();
for(String line : formatted.split("\n")) {
Matcher activeEffectsMatcher = PATTERN_ACTIVE_EFFECTS.matcher(line);
if(activeEffectsMatcher.matches()) {
+ foundGodPotText = true;
String[] godpotRemaingTimeUnformatted= activeEffectsMatcher.group(1).split(":");
long godPotDuration = 0;
try {
@@ -232,6 +234,7 @@ public class TimersOverlay extends TextOverlay {
}
} catch(Exception ignored){}
+
hidden.godPotionDuration = godPotDuration;
} else if(line.contains("\u00a7d\u00a7lCookie Buff")) {
@@ -279,6 +282,11 @@ public class TimersOverlay extends TextOverlay {
}
}
+ if(!foundGodPotText){
+ hidden.godPotionDuration = 0;
+ }
+
+
if(!NotEnoughUpdates.INSTANCE.config.miscOverlays.todoOverlay) {
overlayStrings = null;
return;
@@ -320,6 +328,7 @@ public class TimersOverlay extends TextOverlay {
map.put(1, DARK_AQUA+"Cookie Buff: "+EnumChatFormatting.values()[NotEnoughUpdates.INSTANCE.config.miscOverlays.defaultColour]+Utils.prettyTime(hidden.cookieBuffRemaining));
}
+
long godpotEnd = hidden.godPotionDuration;
//Godpot Display
if(hidden.godPotionDuration <= 0) {