diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-02-22 18:33:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 18:33:20 +0100 |
commit | cf3f08e4fd340ab331a4b61c1159fb527027ade7 (patch) | |
tree | f0fa524ef72817eeab73bdacc6df0f360b646060 /src/main/java/io | |
parent | 30bd46e46aab73e2927fa5631c49ace84708e590 (diff) | |
download | NotEnoughUpdates-cf3f08e4fd340ab331a4b61c1159fb527027ade7.tar.gz NotEnoughUpdates-cf3f08e4fd340ab331a4b61c1159fb527027ade7.tar.bz2 NotEnoughUpdates-cf3f08e4fd340ab331a4b61c1159fb527027ade7.zip |
Added Sky Mall to Dwarven Overlay (#604)
* Added Sky Mall to Dwarven Overlay.
* Made SkyBlockTime a data object.
* Added color to names and display item per different perk variant.
* Added daySuffix support for days greater 10.
* Data classes have a copy method already.
* Green color does not work.
* Fixed a bug in monthName.
* Add Unit Tests and make use of Instant
* Fixed Sky Mall overlay showing in crystal hollows.
* 11st
12nd
13rd
---------
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: nea <nea@nea.moe>
Co-authored-by: nopo <nopotheemail@gmail.com>
Diffstat (limited to 'src/main/java/io')
3 files changed, 34 insertions, 21 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java index 301a90b9..baea367c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -129,11 +129,11 @@ public class CalendarOverlay { private static final long HOUR = MINUTE * 60; private static final long DAY = HOUR * 24; - private static final long DA_OFFSET = 1000 * 60 * 55; - private static final long JF_OFFSET = 1000 * 60 * 15; + private static final long DA_OFFSET = 1000 * 60 * 55; // Dark Auction + private static final long JF_OFFSET = 1000 * 60 * 15; // Jacob's Farming Contest - private static final ItemStack DA_STACK; - private static final ItemStack JF_STACK; + private static final ItemStack DA_STACK; // Dark Auction + private static final ItemStack JF_STACK; // Jacob's Farming Contest static { NBTTagCompound tag = new NBTTagCompound(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java index 74400f59..e1b2662a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java @@ -152,16 +152,17 @@ public class Mining { ) @ConfigEditorDraggableList( exampleText = { - "\u00a73Goblin Slayer: \u00a7626.5%\n\u00a73Lucky Raffle: \u00a7c0.0%", - "\u00a73Mithril Powder: \u00a726,243", - "\u00a73Gemstone Powder: \u00a7d6,243", - "\u00a73Forge 1) \u00a79Diamonite\u00a77: \u00a7aReady!", - "\u00a73Pickaxe CD: \u00a7a78s", - "\u00a73Star Cult: \u00a7a78s" + "§3Goblin Slayer: §626.5%\n§3Lucky Raffle: §c0.0%", + "§3Mithril Powder: §26,243", + "§3Gemstone Powder: §d6,243", + "§3Forge 1) §9Diamonite§7: §aReady!", + "§3Pickaxe CD: §a78s", + "§3Star Cult: §a78s", + "§3Sky Mall: §a5x Titanium (78s)" } ) @ConfigAccordionId(id = 2) - public List<Integer> dwarvenText2 = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5)); + public List<Integer> dwarvenText2 = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6)); @Expose public Position overlayPosition = new Position(10, 100); 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 ea253e94..db1a7755 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java @@ -24,6 +24,7 @@ import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.core.config.Position; import io.github.moulberry.notenoughupdates.core.util.StringUtils; import io.github.moulberry.notenoughupdates.core.util.lerp.LerpUtils; +import io.github.moulberry.notenoughupdates.guifeatures.SkyMallDisplay; import io.github.moulberry.notenoughupdates.miscfeatures.ItemCooldowns; import io.github.moulberry.notenoughupdates.options.NEUConfig; import io.github.moulberry.notenoughupdates.util.SBInfo; @@ -45,6 +46,7 @@ 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; @@ -439,6 +441,12 @@ public class MiningOverlay extends TextTabOverlay { DARK_AQUA + "Star Cult: " + GREEN + StarCultCalculator.getNextStarCult()); break; + case 6: + + if (Objects.equals(SBInfo.getInstance().getLocation(), "mining_3")) { + overlayStrings.add("§3Sky Mall: §a" + SkyMallDisplay.Companion.getDisplayText()); + } + break; } } } else { @@ -714,17 +722,17 @@ public class MiningOverlay extends TextTabOverlay { String cleaned = Utils.cleanColour(line); String beforeColon = cleaned.split(":")[0]; - if (miningOverlayCommisionItems == null) { - setupMiningOverlayCommisionItems(); + if (miningOverlayCommissionItems == null) { + setupMiningOverlayCommissionItems(); } - if (miningOverlayCommisionItems.containsKey(beforeColon)) { - icon = miningOverlayCommisionItems.get(beforeColon); + if (miningOverlayCommissionItems.containsKey(beforeColon)) { + icon = miningOverlayCommissionItems.get(beforeColon); } else { if (beforeColon.startsWith("Forge")) { - icon = miningOverlayCommisionItems.get("Forge"); + icon = miningOverlayCommissionItems.get("Forge"); } else if (beforeColon.contains("Mithril")) { - icon = miningOverlayCommisionItems.get("Mithril"); + icon = miningOverlayCommissionItems.get("Mithril"); } else if (beforeColon.endsWith(" Gemstone Collector")) { String gemName = "ROUGH_" + beforeColon.replace(" Gemstone Collector", "").toUpperCase() + "_GEM"; @@ -748,7 +756,11 @@ public class MiningOverlay extends TextTabOverlay { miningOverlayPerfectGems.put(gemName, icon); } } else if (beforeColon.contains("Titanium")) { - icon = miningOverlayCommisionItems.get("Titanium"); + icon = miningOverlayCommissionItems.get("Titanium"); + } else if (beforeColon.contains("Sky Mall")) { + if (Objects.equals(SBInfo.getInstance().getLocation(), "mining_3")) { + icon = SkyMallDisplay.Companion.getDisplayItem(); + } } } @@ -768,10 +780,10 @@ public class MiningOverlay extends TextTabOverlay { private static final HashMap<String, ItemStack> miningOverlayRoughGems = new HashMap<String, ItemStack>() {}; private static final HashMap<String, ItemStack> miningOverlayPerfectGems = new HashMap<String, ItemStack>() {}; - private static HashMap<String, ItemStack> miningOverlayCommisionItems; + private static HashMap<String, ItemStack> miningOverlayCommissionItems; - private static void setupMiningOverlayCommisionItems() { - miningOverlayCommisionItems = new HashMap<String, ItemStack>() {{ + private static void setupMiningOverlayCommissionItems() { + miningOverlayCommissionItems = new HashMap<String, ItemStack>() {{ put( "Mithril Powder", NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager |