aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/features')
-rw-r--r--src/main/kotlin/features/mining/PickaxeAbility.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/kotlin/features/mining/PickaxeAbility.kt b/src/main/kotlin/features/mining/PickaxeAbility.kt
index a494989..4fcf8a7 100644
--- a/src/main/kotlin/features/mining/PickaxeAbility.kt
+++ b/src/main/kotlin/features/mining/PickaxeAbility.kt
@@ -127,12 +127,15 @@ object PickaxeAbility : FirmamentFeature {
@Subscribe
fun onProfileSwitch(event: ProfileSwitchEvent) {
- lastUsage.clear()
+ lastUsage.entries.removeIf {
+ it.value < lobbyJoinTime
+ }
}
val abilityUsePattern = Pattern.compile("You used your (?<name>.*) Pickaxe Ability!")
val fuelPattern = Pattern.compile("Fuel: .*/(?<maxFuel>$SHORT_NUMBER_FORMAT)")
- val pickaxeAbilityCooldownPattern = Pattern.compile("Your pickaxe ability is on cooldown for (?<remainingCooldown>$TIME_PATTERN)\\.")
+ val pickaxeAbilityCooldownPattern =
+ Pattern.compile("Your pickaxe ability is on cooldown for (?<remainingCooldown>$TIME_PATTERN)\\.")
data class PickaxeAbilityData(
val name: String,