From 861892b7353f32bad70fa1a9248d8c717e813a53 Mon Sep 17 00:00:00 2001 From: martimavocado <39881008+martimavocado@users.noreply.github.com> Date: Sat, 1 Jun 2024 10:56:39 +0100 Subject: Improvement: Move all SkyMall message hiding to the same toggle (#1971) --- .../java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index 15f3135e9..1b4ae762c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -266,12 +266,15 @@ class ChatFilter { "§6§lGOOD CATCH! §r§bYou found a §r§fLight Bait§r§b.", "§6§lGOOD CATCH! §r§bYou found a §r§aHot Bait§r§b.", "§6§lGOOD CATCH! §r§bYou found a §r§fSpooky Bait§r§b.", - "§bNew day! §r§eYour §r§2Sky Mall §r§ebuff changed!", - "§8§oYou can disable this messaging by toggling Sky Mall in your /hotm!", "§e[NPC] Jacob§f: §rMy contest has started!", "§eObtain a §r§6Booster Cookie §r§efrom the community shop in the hub!", ) + private val skymallMessages = listOf( + "§bNew day! §r§eYour §r§2Sky Mall §r§ebuff changed!", + "§8§oYou can disable this messaging by toggling Sky Mall in your /hotm!", + ) + /** * REGEX-TEST: §e[NPC] Jacob§f: §rYour §9Anita's Talisman §fis giving you §6+25☘ Carrot Fortune §fduring the contest! */ @@ -443,6 +446,7 @@ class ChatFilter { "powder_mining" to powderMiningMessages, "fire_sale" to fireSaleMessages, "event" to eventMessage, + "skymall" to skymallMessages, ) private val messagesContainsMap: Map> = mapOf( "lobby" to lobbyMessagesContains, @@ -484,7 +488,7 @@ class ChatFilter { config.factoryUpgrade && message.isPresent("factory_upgrade") -> "factory_upgrade" config.sacrifice && message.isPresent("sacrifice") -> "sacrifice" generalConfig.hideJacob && !GardenAPI.inGarden() && anitaFortunePattern.matches(message) -> "jacob_event" - generalConfig.hideSkyMall && !LorenzUtils.inMiningIsland() && skymallPerkPattern.matches(message) -> "skymall" + generalConfig.hideSkyMall && !LorenzUtils.inMiningIsland() && (skymallPerkPattern.matches(message) || message.isPresent("skymall")) -> "skymall" dungeonConfig.rareDrops && message.isPresent("rare_drops") -> "rare_drops" dungeonConfig.soloClass && DungeonAPI.inDungeon() && message.isPresent("solo_class") -> "solo_class" dungeonConfig.soloStats && DungeonAPI.inDungeon() && message.isPresent("solo_stats") -> "solo_stats" -- cgit