aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Mining.java21
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java23
2 files changed, 43 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Mining.java
index de65f3e9..38aefcaf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Mining.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Mining.java
@@ -240,6 +240,27 @@ public class Mining {
@Expose
@ConfigOption(
+ name = "Sky Mall Location",
+ desc = "Change when the Sky Mall perk gets shown"
+ )
+ @ConfigEditorDropdown(
+ values = {"Dwarven Mines+Crystal Hollows", "Everywhere except dungeons", "Everywhere"}
+ )
+ @ConfigAccordionId(id = 2)
+ public int skyMallDisplayEnabledLocations = 0;
+
+ @Expose
+ @ConfigOption(
+ name = "Sky Mall Tab",
+ desc = "Only show the Sky Mall perk when tab list is open\n" +
+ "§cThis only works outside of Dwarven Caves!"
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 2)
+ public boolean skyMallDisplayOnlyShowTab = false;
+
+ @Expose
+ @ConfigOption(
name = "Commission Task Tips",
desc = "Show tips to help complete commission tasks"
)
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 2f0388f4..f479276a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
@@ -46,7 +46,6 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.Objects;
import java.util.function.Supplier;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -456,6 +455,7 @@ public class MiningOverlay extends TextTabOverlay {
}
boolean forgeDisplay = false;
boolean starCultDisplay = false;
+ boolean skyMallDisplay = false;
for (int i = 0; i < NotEnoughUpdates.INSTANCE.config.mining.dwarvenText2.size(); i++) {
if (NotEnoughUpdates.INSTANCE.config.mining.dwarvenText2.get(i) == 3) {
forgeDisplay = true;
@@ -463,6 +463,9 @@ public class MiningOverlay extends TextTabOverlay {
if (NotEnoughUpdates.INSTANCE.config.mining.dwarvenText2.get(i) == 5) {
starCultDisplay = true;
}
+ if (NotEnoughUpdates.INSTANCE.config.mining.dwarvenText2.get(i) == 6) {
+ skyMallDisplay = true;
+ }
}
if (starCultDisplay) {
@@ -496,6 +499,24 @@ public class MiningOverlay extends TextTabOverlay {
}
}
}
+
+ if (skyMallDisplay) {
+ if (overlayStrings == null) overlayStrings = new ArrayList<>();
+
+ if (!NotEnoughUpdates.INSTANCE.config.mining.skyMallDisplayOnlyShowTab ||
+ lastTabState) {
+ if (NotEnoughUpdates.INSTANCE.config.mining.skyMallDisplayEnabledLocations == 1 &&
+ !SBInfo.getInstance().isInDungeon) {
+ overlayStrings.add(
+ DARK_AQUA + "Sky Mall: " + GREEN +
+ SkyMallDisplay.Companion.getDisplayText());
+ } else if (NotEnoughUpdates.INSTANCE.config.mining.skyMallDisplayEnabledLocations == 2) {
+ overlayStrings.add(
+ DARK_AQUA + "Sky Mall: " + GREEN +
+ SkyMallDisplay.Companion.getDisplayText());
+ }
+ }
+ }
}
if (overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null;