Skip to content

Commit

Permalink
Mobs since last Inquisitor (hannibal002#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
CuzImClicks authored and superhize committed Apr 8, 2024
1 parent 1dbc9fb commit 9dd5b3c
Showing 1 changed file with 13 additions and 1 deletion.
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

0 comments on commit 9dd5b3c

Please sign in to comment.