Skip to content

Commit

Permalink
removed unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
hannibal002 committed Oct 6, 2024
1 parent dc2ea3f commit 8a15917
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,8 @@ object SeaCreatureTracker {
val realAmount = data.amount.filter { filter(it.key) }

val total = realAmount.sumAllValues()
for ((name, amount) in realAmount.entries.sortedByDescending { it.value }) {
val displayName = SeaCreatureManager.allFishingMobs[name]?.displayName ?: run {
ErrorManager.logErrorStateWithData(
"Sea Creature Tracker can not display a name correctly",
"Could not find sea creature by name",
"SeaCreatureManager.allFishingMobs.keys" to SeaCreatureManager.allFishingMobs.keys,
"name" to name
)
name
}
for ((displayName, amount) in realAmount.entries.sortedByDescending { it.value }) {


val percentageSuffix = if (config.showPercentage.get()) {
val percentage = LorenzUtils.formatPercentage(amount.toDouble() / total)
Expand Down

0 comments on commit 8a15917

Please sign in to comment.