aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-11 11:46:49 +0200
committerLinnea Gräf <nea@nea.moe>2024-04-11 11:46:49 +0200
commitfa5dc11db897da6689ab1d8edbe7a26e03425dfd (patch)
tree3418f1979f49683ae9a66260e9ba9823930bf588 /src/main
parent7b69d10d00b3ecc31716294394f3a78fb9916f32 (diff)
downloadNotEnoughUpdates-fa5dc11db897da6689ab1d8edbe7a26e03425dfd.tar.gz
NotEnoughUpdates-fa5dc11db897da6689ab1d8edbe7a26e03425dfd.tar.bz2
NotEnoughUpdates-fa5dc11db897da6689ab1d8edbe7a26e03425dfd.zip
Fix dwarven overlay showing too often
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
index 39f7b716..818f626e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
@@ -28,6 +28,7 @@ import io.github.moulberry.notenoughupdates.guifeatures.SkyMallDisplay;
import io.github.moulberry.notenoughupdates.miscfeatures.ItemCooldowns;
import io.github.moulberry.notenoughupdates.miscfeatures.tablisttutorial.TablistAPI;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
+import io.github.moulberry.notenoughupdates.options.separatesections.Mining;
import io.github.moulberry.notenoughupdates.util.ItemResolutionQuery;
import io.github.moulberry.notenoughupdates.util.SBInfo;
import io.github.moulberry.notenoughupdates.util.StarCultCalculator;
@@ -172,7 +173,7 @@ public class MiningOverlay extends TextTabOverlay {
if (line == null) {
continue;
}
- if(!line.contains("▶"))continue;
+ if (!line.contains("▶")) continue;
String cleanLine = Utils.cleanColour(line).replace("▶", "").trim();
if (cleanLine.equals("Dwarven Mines")) {
commLocation = "mining_3";
@@ -265,7 +266,8 @@ public class MiningOverlay extends TextTabOverlay {
if (!NotEnoughUpdates.INSTANCE.config.mining.dwarvenOverlay &&
NotEnoughUpdates.INSTANCE.config.mining.emissaryWaypoints == 0 &&
!NotEnoughUpdates.INSTANCE.config.mining.titaniumAlert &&
- NotEnoughUpdates.INSTANCE.config.mining.locWaypoints == 0) {
+ NotEnoughUpdates.INSTANCE.config.mining.locWaypoints == 0
+ && NotEnoughUpdates.INSTANCE.config.mining.tunnelWaypoints != Mining.GlaciteTunnelWaypointBehaviour.NONE) {
return;
}
@@ -273,8 +275,8 @@ public class MiningOverlay extends TextTabOverlay {
//thanks to "Pure Genie#7250" for helping with this (makes tita alert and waypoints work without mine overlay)
if (SBInfo.getInstance().getLocation() == null) return;
if (SBInfo.getInstance().getLocation().equals("mining_3") ||
- SBInfo.getInstance().getLocation().equals("crystal_hollows") || SBInfo.getInstance().getLocation().equals(
- "mineshaft")) {
+ SBInfo.getInstance().getLocation().equals("crystal_hollows")
+ || SBInfo.getInstance().getLocation().equals("mineshaft")) {
commissionProgress.clear();
// These strings will be displayed one after the other when the player list is disabled
@@ -395,6 +397,18 @@ public class MiningOverlay extends TextTabOverlay {
}
}
+ if (ItemCooldowns.firstLoadMillis > 0) {
+ //set cooldown on first skyblock load.
+ ItemCooldowns.pickaxeUseCooldownMillisRemaining =
+ 60 * 1000 - (System.currentTimeMillis() - ItemCooldowns.firstLoadMillis);
+ ItemCooldowns.firstLoadMillis = 0;
+ }
+
+ if (!NotEnoughUpdates.INSTANCE.config.mining.dwarvenOverlay) {
+ overlayStrings = null;
+ return;
+ }
+
List<String> commissionsStrings = new ArrayList<>();
for (Map.Entry<String, Float> entry : commissionProgress.entrySet()) {
if (entry.getValue() >= 1) {
@@ -433,13 +447,6 @@ public class MiningOverlay extends TextTabOverlay {
}
}
- if (ItemCooldowns.firstLoadMillis > 0) {
- //set cooldown on first skyblock load.
- ItemCooldowns.pickaxeUseCooldownMillisRemaining =
- 60 * 1000 - (System.currentTimeMillis() - ItemCooldowns.firstLoadMillis);
- ItemCooldowns.firstLoadMillis = 0;
- }
-
String pickaxeCooldown;
if (ItemCooldowns.pickaxeUseCooldownMillisRemaining <= 0) {
pickaxeCooldown = DARK_AQUA + "Pickaxe CD: \u00a7aReady";