Skip to content

Commit

Permalink
fix: round target xp in /stats
Browse files Browse the repository at this point in the history
  • Loading branch information
chatasma committed Jul 13, 2024
1 parent 11610c7 commit 974cf2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class StatCommands {
val nextLevel = level + 1
val currentLevelExpRequirement = PlayerStats.EXP_FORMULA.getExpRequiredForLevel(level)
val nextLevelExpRequirement = PlayerStats.EXP_FORMULA.getExpRequiredForLevel(nextLevel)
return "${(xp - currentLevelExpRequirement).toInt()}/${nextLevelExpRequirement - currentLevelExpRequirement}"
return "${(xp - currentLevelExpRequirement).toInt()}/${(nextLevelExpRequirement - currentLevelExpRequirement).roundToInt()}"
}

private fun createLabelledStat(label: String, value: Any, type: StatType): Component {
Expand Down

0 comments on commit 974cf2d

Please sign in to comment.