From 617c4352fdb622b1b21769823c0af0235d539717 Mon Sep 17 00:00:00 2001 From: CalMWolfs Date: Fri, 23 Jun 2023 08:18:38 +1000 Subject: fixed up --- .../at/hannibal2/skyhanni/config/features/Misc.java | 21 +++++++++++---------- .../skyhanni/features/misc/FrozenTreasureTracker.kt | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java index ebfe716fe..e9def2a1c 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java @@ -504,12 +504,12 @@ public class Misc { desc = "Drag text to change the appearance of the overlay." ) @ConfigEditorDraggableList( - exampleText = { // todo change colours - "§e§lFrozen Treasure Tracker", - "§e1,636 Treasures Mined", - "§e3.2m Total Ice", - "§e342,192 Ice/hr", - "§e1,002 Compact Procs", + exampleText = { + "§1§lFrozen Treasure Tracker", + "§61,636 Treasures Mined", + "§33.2m Total Ice", + "§3342,192 Ice/hr", + "§81,002 Compact Procs", " ", "§b182 §fWhite Gift", "§b94 §aGreen Gift", @@ -527,14 +527,15 @@ public class Misc { public List textFormat = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 14, 15)); @Expose - @ConfigOption(name = "Count Compact", desc = "Adds compact drops from your pickaxe to the ice total.") + @ConfigOption(name = "Only in Glacial Cave", desc = "Only shows the overlay while in the Glacial Cave.") @ConfigEditorBoolean - public boolean countCompact = true; + public boolean onlyInCave = true; @Expose - @ConfigOption(name = "Only in Glacial Cave", desc = "Only shows the overlay while in the Glacial Cave.") + @ConfigOption(name = "Show as drops", desc = "Multiplies the numbers on the display by the base drop. \n" + + "E.g. 3 Ice Bait -> 48 Ice Bait") @ConfigEditorBoolean - public boolean onlyInCave = true; + public boolean showAsDrops = false; @Expose @ConfigOption(name = "Hide Chat messages", desc = "Hides the chat messages from frozen treasures.") diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt index 006916e4f..2022713b5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt @@ -84,15 +84,16 @@ class FrozenTreasureTracker { compactPattern.matchMatcher(message) { compactProcs += 1 saveAndUpdate() - if (config.hideMessages) event.isCanceled + if (config.hideMessages) event.blockedReason = "frozen treasure tracker" } for (treasure in FrozenTreasure.values()) { if ("FROZEN TREASURE! You found ${treasure.displayName.removeColor()}!".toRegex().matches(message)) { + treasuresMined += 1 val old = treasureCount[treasure] ?: 0 treasureCount = treasureCount.editCopy { this[treasure] = old + 1 } saveAndUpdate() - if (config.hideMessages) event.isCanceled + if (config.hideMessages) event.blockedReason = "frozen treasure tracker" } } } @@ -112,15 +113,15 @@ class FrozenTreasureTracker { } private fun drawTreasureDisplay() = buildList> { - addAsSingletonList("§e§lFrozen Treasure Tracker") - addAsSingletonList("§e${formatNumber(treasuresMined)} Treasures Mined") - addAsSingletonList("§e${formatNumber(estimatedIce)} Total Ice") - addAsSingletonList("§e${formatNumber(icePerHour)} Ice/hr") - addAsSingletonList("§e${formatNumber(compactProcs)} Compact Procs") + addAsSingletonList("§1§lFrozen Treasure Tracker") + addAsSingletonList("§6${formatNumber(treasuresMined)} Treasures Mined") + addAsSingletonList("§3${formatNumber(estimatedIce)} Total Ice") + addAsSingletonList("§3${formatNumber(icePerHour)} Ice/hr") + addAsSingletonList("§8${formatNumber(compactProcs)} Compact Procs") addAsSingletonList("") for (treasure in FrozenTreasure.values()) { - val count = (treasureCount[treasure] ?: 0) * treasure.defaultAmount // enchanted ice will be inaccurate + val count = (treasureCount[treasure] ?: 0) * if (config.showAsDrops) treasure.defaultAmount else 1 addAsSingletonList("§b${formatNumber(count)} ${treasure.displayName}") } addAsSingletonList("") @@ -142,7 +143,7 @@ class FrozenTreasureTracker { private fun calculateIce() { estimatedIce = 0 - if (config.countCompact) estimatedIce += compactProcs * 160 + estimatedIce += compactProcs * 160 for (treasure in FrozenTreasure.values()) { val amount = treasureCount[treasure] ?: 0 estimatedIce += amount * treasure.defaultAmount * treasure.iceMultiplier @@ -158,5 +159,5 @@ class FrozenTreasureTracker { } private fun onJerryWorkshop() = LorenzUtils.inSkyBlock && LorenzUtils.skyBlockIsland == IslandType.WINTER - private fun inGlacialCave() = onJerryWorkshop() && ScoreboardData.sidebarLinesFormatted.contains("Glacial Cave") + private fun inGlacialCave() = onJerryWorkshop() && ScoreboardData.sidebarLinesFormatted.contains(" §7⏣ §3Glacial Cave") } \ No newline at end of file -- cgit