diff options
-rw-r--r-- | CHANGELOG.md | 7 | ||||
-rw-r--r-- | FEATURES.md | 12 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/TrophyFishMessages.kt | 46 |
4 files changed, 41 insertions, 30 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 414144b35..9b5e8781e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,12 @@ ### Features + Added Bazaar Update Timer - Forrick. + Added Crimson Isle Reputation Helper. -+ Added Barn Timer - Shows the time and amount of sea creatures while fishing on the barn via hub. -+ Added Shark Fish Counter - Counts how many sharks have been caught. ++ Added **Barn Timer** - Shows the time and amount of sea creatures while fishing on the barn via hub. ++ Added **Shark Fish Counter** - Counts how many sharks have been caught. ++ Added **Hide Silver Duplicates** - Hiding chat message when catching a duplicate silver trophy fish. ### Fixes -+ Fixed steaming hot flounder in custom trophy fish counter. ++ Fixed **Steaming Hot Flounder** in custom trophy fish counter. + Fixed hide powder gain message from chests in crystal hollows. (thanks hypixel) + Fixed damage indicator for M3 Professor bug. (Thanks hypixel) diff --git a/FEATURES.md b/FEATURES.md index 10c8238dd..6d21c69ab 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -95,12 +95,12 @@ - Update Timer showing when the next api data update happens. ## Fishing -- Trophy Counter (After fishing a new trophy fish, showing you in chat how many more trophies you have collected in total) -- Hide Bronze Duplicates (Hiding chat message when picking up a duplicate bronze trophy fish) -- Shorten Fishing Message (Replacing the green chat message when fishing a sea creature with a more clean format) -- Highlight Thunder Sparks that spawn after killing a Thunder -- Barn Timer - Shows the time and amount of sea creatures while fishing on the barn via hub. -- Shark Fish Counter - Counts how many sharks have been caught. +- **Trophy Counter** - After fishing a new trophy fish, showing you in chat how many more trophies you have collected in total. +- **Hide Bronze/Silver Duplicates** - Hiding chat message when catching a duplicate bronze/silver trophy fish. +- **Shorten Fishing Message** (Replacing the green chat message when fishing a sea creature with a more clean format) +- Highlight Thunder Sparks that spawn after killing a Thunder. +- **Barn Timer** - Shows the time and amount of sea creatures while fishing on the barn via hub. +- **Shark Fish Counter** - Counts how many sharks have been caught. ## Damage Indicator - Show the remaining health of selected bosses in the game in a bigger GUI. diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java b/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java index 52065e37b..46173740a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Fishing.java @@ -26,6 +26,12 @@ public class Fishing { public boolean trophyFishBronzeHider = false; @Expose + @ConfigOption(name = "Hide Silver Duplicates", desc = "Hide duplicate messages for silver trophy fishes from chat.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 0) + public boolean trophyFishSilverHider = false; + + @Expose @ConfigOption(name = "Shorten Fishing Message", desc = "Shorten the message what type of sea creature you have fished.") @ConfigEditorBoolean public boolean shortenFishingMessage = false; diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/TrophyFishMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/TrophyFishMessages.kt index 2bf5bb2ce..080fa89c4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/TrophyFishMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/TrophyFishMessages.kt @@ -45,29 +45,33 @@ class TrophyFishMessages { val message = event.message //TODO replace logic with regex - if (message.startsWith("§6§lTROPHY FISH! §r§bYou caught a")) { - var displayName = - if (message.contains(" a §r")) message.between(" a §r", "§r §r") else message.between(" an §r", "§r §r") - if (displayName.contains("§k")) { - displayName = displayName.replace("§k", "") - displayName = displayName.replace("Obfuscated", "Obfuscated Fish") - } - val rarity = message.between("§r §r", "§b.").lowercase().replace("§l", "") + if (!message.startsWith("§6§lTROPHY FISH! §r§bYou caught a")) return - val name = (rarity + "_" + displayName).removeColor().lowercase().replace(" ", "").replace("-", "") - val amount = map.getOrDefault(name, 0) + 1 - map[name] = amount - event.blockedReason = "trophy_fish" + var displayName = + if (message.contains(" a §r")) message.between(" a §r", "§r §r") else message.between(" an §r", "§r §r") + if (displayName.contains("§k")) { + displayName = displayName.replace("§k", "") + displayName = displayName.replace("Obfuscated", "Obfuscated Fish") + } + val rarity = message.between("§r §r", "§b.").lowercase().replace("§l", "") - if (amount == 1) { - LorenzUtils.chat("§6TROPHY FISH! §c§lFIRST §r$rarity $displayName") - } else { - if (rarity.contains("bronze")) { - if (SkyHanniMod.feature.fishing.trophyFishBronzeHider) return - } - LorenzUtils.chat("§6TROPHY FISH! §7$amount. §r$rarity $displayName") - } -// LorenzDebug.log("new trophy: $name = $amount") + val name = (rarity + "_" + displayName).removeColor().lowercase().replace(" ", "").replace("-", "") + val amount = map.getOrDefault(name, 0) + 1 + map[name] = amount + event.blockedReason = "trophy_fish" + + if (amount == 1) { + LorenzUtils.chat("§6TROPHY FISH! §c§lFIRST §r$rarity $displayName") + return } + + if (rarity.contains("bronze")) { + if (SkyHanniMod.feature.fishing.trophyFishBronzeHider) return + } + if (rarity.contains("silver")) { + if (SkyHanniMod.feature.fishing.trophyFishSilverHider) return + } + + LorenzUtils.chat("§6TROPHY FISH! §7$amount. §r$rarity $displayName") } }
\ No newline at end of file |