diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-05-30 09:08:43 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-05-30 09:08:43 +0200 |
commit | 2fad00835fdb9d84a19c56c63a34c8a736a9aa5c (patch) | |
tree | 45aab653300c1b61730b2987070eb5340b617907 /src/main | |
parent | a12bd4e2a0450c6ee739b05713d70e8fa497dc72 (diff) | |
parent | 294aad229547eb645e96ad9f847f03dbcee56dab (diff) | |
download | skyhanni-2fad00835fdb9d84a19c56c63a34c8a736a9aa5c.tar.gz skyhanni-2fad00835fdb9d84a19c56c63a34c8a736a9aa5c.tar.bz2 skyhanni-2fad00835fdb9d84a19c56c63a34c8a736a9aa5c.zip |
Merge remote-tracking branch 'origin/beta' into beta
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt | 7 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt index cfe229871..dc0c3b6ff 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactor import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.NumberUtil +import at.hannibal2.skyhanni.utils.RegexUtils.groupOrNull import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.fromNow import at.hannibal2.skyhanni.utils.TimeUtils.format @@ -84,10 +85,12 @@ object HoppityEggsCompactChat { compactChat(event) } HoppityEggsManager.newRabbitFound.matchMatcher(event.message) { - val chocolate = group("chocolate") + val chocolate = groupOrNull("chocolate") val perSecond = group("perSecond") newRabbit = true - lastProfit = "§6+$chocolate §7and §6+${perSecond}x c/s!" + lastProfit = chocolate?.let { + "§6+$it §7and §6+${perSecond}x c/s!" + } ?: "§6+${perSecond}x c/s!" compactChat(event) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index 0660268db..f6332219e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -45,6 +45,7 @@ object HoppityEggsManager { /** * REGEX-TEST: §D§LHOPPITY'S HUNT §7You found §fArnie §7(§F§LCOMMON§7)! * REGEX-TEST: §D§LHOPPITY'S HUNT §7You found §aPenelope §7(§A§LUNCOMMON§7)! + * REGEX-TEST: §D§LHOPPITY'S HUNT §7You found §6Solomon §7(§6§LLEGENDARY§7)! */ val rabbitFoundPattern by ChocolateFactoryAPI.patternGroup.pattern( "rabbit.found", @@ -53,6 +54,7 @@ object HoppityEggsManager { /** * REGEX-TEST: §d§lNEW RABBIT! §6+2 Chocolate §7and §6+0.003x Chocolate §7per second! + * REGEX-TEST: §d§lNEW RABBIT! §6+0.02x Chocolate §7per second! */ val newRabbitFound by ChocolateFactoryAPI.patternGroup.pattern( "rabbit.found.new", |