Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Mobs since last Inquisitor #1346

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ object MythologicalCreatureTracker {

override fun reset() {
count.clear()
mobsSinceLastInquisitor = 0
}

@Expose
var mobsSinceLastInquisitor: Int = 0

@Expose
var count: MutableMap<MythologicalCreatureType, Int> = mutableMapOf()
}
Expand All @@ -78,7 +82,14 @@ object MythologicalCreatureTracker {
if (creatureType.pattern.matches(event.message)) {
BurrowAPI.lastBurrowRelatedChatMessage = SimpleTimeMark.now()
tracker.modify { it.count.addOrPut(creatureType, 1) }

when (creatureType) {
MythologicalCreatureType.MINOS_INQUISITOR -> {
tracker.modify { it.mobsSinceLastInquisitor = 0 }
}
else -> {
tracker.modify { it.mobsSinceLastInquisitor += 1 }
}
}
if (config.hideChat) {
event.blockedReason = "mythological_creature_dug"
}
Expand All @@ -99,6 +110,7 @@ object MythologicalCreatureTracker {
addAsSingletonList(" §7- §e${amount.addSeparators()} ${creatureType.displayName}$percentageSuffix")
}
addAsSingletonList(" §7- §e${total.addSeparators()} §7Total Mythological Creatures")
addAsSingletonList(" §7- §e${data.mobsSinceLastInquisitor.addSeparators()} §7Mobs since last Minos Inquisitor")
}

@SubscribeEvent
Expand Down
Loading