diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt | 19 |
2 files changed, 23 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java index f37e66705..d8f930423 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java @@ -80,6 +80,12 @@ public class FilterTypesConfig { @FeatureToggle public boolean fireSale = true; + @Expose + @ConfigOption(name = "Diana", desc = "Hide chat messages around griffin burrow chains and griffin feather drops and coin drops.") + @ConfigEditorBoolean + @FeatureToggle + public boolean diana = false; + //TODO remove @Expose @ConfigOption(name = "Others", desc = "Hide other annoying messages.") diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt index d6849e9aa..7563a7bc9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt @@ -114,14 +114,29 @@ object DianaProfitTracker { @SubscribeEvent fun onChat(event: LorenzChatEvent) { - if (chatDugOutPattern.matches(event.message)) { + val message = event.message + if (chatDugOutPattern.matches(message)) { tracker.modify { it.burrowsDug++ } + tryHide(event) } - chatDugOutCoinsPattern.matchMatcher(event.message) { + chatDugOutCoinsPattern.matchMatcher(message) { val coins = group("coins").formatNumber().toInt() tracker.addCoins(coins) + tryHide(event) + } + + if (message == "§6§lRARE DROP! §r§eYou dug out a §r§9Griffin Feather§r§e!" || + message == "§eFollow the arrows to find the §r§6treasure§r§e!" + ) { + tryHide(event) + } + } + + private fun tryHide(event: LorenzChatEvent) { + if (SkyHanniMod.feature.chat.filterType.diana) { + event.blockedReason = "diana_chain_or_drops" } } |