diff options
author | Not a cow <104355555+Not-a-cowfr@users.noreply.github.com> | 2024-09-10 11:09:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 20:09:08 +0200 |
commit | f8a3b96bb34db1105d0f0d92b77ee38095c45792 (patch) | |
tree | 72dc6c1195ee55d4354d5027b3c879684708dfcb /src/main | |
parent | b86c79591b87d6fc5f9ee91e1dd7ff9ff48fa63f (diff) | |
download | skyhanni-f8a3b96bb34db1105d0f0d92b77ee38095c45792.tar.gz skyhanni-f8a3b96bb34db1105d0f0d92b77ee38095c45792.tar.bz2 skyhanni-f8a3b96bb34db1105d0f0d92b77ee38095c45792.zip |
Fix: Fix some regex tests from old pr (#2490)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/chat/FilterTypesConfig.java | 8 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt | 13 |
2 files changed, 12 insertions, 9 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 b2fb03d76..c50a04bae 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 @@ -118,16 +118,16 @@ public class FilterTypesConfig { public boolean hideAlphaAchievements = false; @Expose - @ConfigOption(name = "Hide Parkour", desc = "Hide parkour messages (starting, stopping, reaching a milestone).") + @ConfigOption(name = "Parkour Messages", desc = "Hide parkour messages (starting, stopping, reaching a checkpoint).") @ConfigEditorBoolean @FeatureToggle - public boolean hideParkour = false; + public boolean parkour = false; @Expose - @ConfigOption(name = "Hide Teleport Pads", desc = "Hide annoying messages when using teleport pads.") + @ConfigOption(name = "Teleport Pad Messages", desc = "Hide annoying messages when using teleport pads.") @ConfigEditorBoolean @FeatureToggle - public boolean hideTeleportPads = false; + public boolean teleportPads = false; //TODO remove @Expose 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 0e23fbb79..964b25573 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.features.chat.ChatFilter.messagesMap import at.hannibal2.skyhanni.features.chat.PowderMiningChatFilter.genericMiningRewardMessage import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -408,7 +409,7 @@ object ChatFilter { /** * REGEX-TEST: §aStarted parkour cocoa! - * REGEX-TEST: §aFinished parkour cocoa in 12:34.567 + * REGEX-TEST: §aFinished parkour cocoa in 12:34.567! * REGEX-TEST: §aReached checkpoint #4 for parkour cocoa! * REGEX-TEST: §4Wrong checkpoint for parkour cocoa! * REGEX-TEST: §4You haven't reached all checkpoints for parkour cocoa! @@ -432,14 +433,16 @@ object ChatFilter { "§4Cancelled parkour!", ) - // §r§aWarped from the tppadone §r§ato the tppadtwo§r§a! + /** + ** REGEX-TEST: §r§aWarped from the tpPadOne §r§ato the tpPadTwo§r§a! + */ private val teleportPadPatterns = listOf( "§aWarped from the (.*) §r§ato the (.*)§r§a!".toPattern(), ) // §r§4This Teleport Pad does not have a destination set! private val teleportPadMessages = listOf( - "§4This Teleport Pad does not have a destination set!" + "§4This Teleport Pad does not have a destination set!", ) private val patternsMap: Map<String, List<Pattern>> = mapOf( @@ -520,8 +523,8 @@ object ChatFilter { config.guildExp && message.isPresent("guild_exp") -> "guild_exp" config.killCombo && message.isPresent("kill_combo") -> "kill_combo" config.profileJoin && message.isPresent("profile_join") -> "profile_join" - config.hideParkour && message.isPresent("parkour") -> "parkour" - config.hideTeleportPads && message.isPresent("teleport_pads") -> "teleport_pads" + config.parkour && message.isPresent("parkour") -> "parkour" + config.teleportPads && message.isPresent("teleport_pads") -> "teleport_pads" config.hideAlphaAchievements && HypixelData.hypixelAlpha && message.isPresent("achievement_get") -> "achievement_get" |