aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-16 16:54:33 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-12-16 16:54:33 +0100
commit35eea60d6d77681d5fc1964a3a1d29b531ee1e28 (patch)
tree731e01171a969456de470f6ae1d3300f16a5b24a
parent905ae153d6a4b1b1bcb36636474b6910ef65404f (diff)
downloadskyhanni-35eea60d6d77681d5fc1964a3a1d29b531ee1e28.tar.gz
skyhanni-35eea60d6d77681d5fc1964a3a1d29b531ee1e28.tar.bz2
skyhanni-35eea60d6d77681d5fc1964a3a1d29b531ee1e28.zip
Diana Chat hider.
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt19
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"
}
}