aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt7
2 files changed, 13 insertions, 0 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 37bce7bca..37172b970 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
@@ -92,6 +92,12 @@ public class FilterTypesConfig {
@FeatureToggle
public boolean diana = false;
+ @Expose
+ @ConfigOption(name = "Factory Upgrade", desc = "Hide chocolate factory upgrade and employee promotion messages.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean factoryUpgrade = false;
+
//TODO remove
@Expose
@ConfigOption(name = "Others", desc = "Hide other annoying messages.")
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 a09a8d6f7..79009a559 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
@@ -347,6 +347,11 @@ class ChatFilter {
"§f +§r§7You earned §r§.* Event Silver§r§7!".toPattern(),
"§f +§r§.§k#§r§. LEVEL UP! §r§.§k#".toPattern(),
)
+ private val factoryUpgradePatterns = listOf(
+ "§.* §r§7has been promoted to §r§7\\[.*§r§7] §r§.*§r§7!".toPattern(),
+ "§7Your §r§aRabbit Barn §r§7capacity has been increased to §r§a.* Rabbits§r§7!".toPattern(),
+ "§7You will now produce §r§6.* Chocolate §r§7per click!".toPattern()
+ )
private val powderMiningMessages = listOf(
"§aYou uncovered a treasure chest!",
"§aYou received §r§f1 §r§aWishing Compass§r§a.",
@@ -380,6 +385,7 @@ class ChatFilter {
"powder_mining" to powderMiningPatterns,
"fire_sale" to fireSalePatterns,
"event" to eventPatterns,
+ "factory_upgrade" to factoryUpgradePatterns,
)
private val messagesMap: Map<String, List<String>> = mapOf(
@@ -436,6 +442,7 @@ class ChatFilter {
config.powderMining && message.isPresent("powder_mining") -> "powder_mining"
config.eventLevelUp && (message.isPresent("event") || StringUtils.isEmpty(message)) -> "event"
config.fireSale && (fireSalePattern.matches(message) || message.isPresent("fire_sale")) -> "fire_sale"
+ config.factoryUpgrade && message.isPresent("factory_upgrade") -> "factory_upgrade"
generalConfig.hideJacob && !GardenAPI.inGarden() && anitaFortunePattern.matches(message) -> "jacob_event"
generalConfig.hideSkyMall && !LorenzUtils.inMiningIsland() && skymallPerkPattern.matches(message) -> "skymall"