Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Dec 3, 2023
1 parent d4ee6c0 commit 1f9c097
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ object TrevorFeatures {
try {
if (config.trapperSolver && onFarmingIsland()) {
updateTrapper()
TrevorTracker.saveAndUpdate()
TrevorTracker.update()
TrevorTracker.calculatePeltsPerHour()
if (questActive) TrevorSolver.findMob()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ object TrevorTracker {
val pelts = matcher.group("pelts").toInt()
storage.peltsGained += pelts
storage.selfKillingAnimals += 1
saveAndUpdate()
update()
}
matcher = killMobPattern.matcher(event.message)
if (matcher.matches()) {
val pelts = matcher.group("pelts").toInt()
storage.peltsGained += pelts
storage.killedAnimals += 1
saveAndUpdate()
update()
}
}

Expand All @@ -98,10 +98,10 @@ object TrevorTracker {
val foundRarity = TrapperMobRarity.entries.firstOrNull { it.formattedName == rarity } ?: return
val old = storage.animalRarities[foundRarity] ?: 0
storage.animalRarities = storage.animalRarities.editCopy { this[foundRarity] = old + 1 }
saveAndUpdate()
update()
}

fun saveAndUpdate() {
fun update() {
val storage = ProfileStorageData.profileSpecific?.trapperData ?: return
display = formatDisplay(drawTrapperDisplay(storage))
}
Expand Down

0 comments on commit 1f9c097

Please sign in to comment.