Skip to content

Commit

Permalink
refactor: update description content (#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckySoLucky authored Mar 7, 2023
1 parent e637a74 commit c503f5a
Showing 1 changed file with 40 additions and 10 deletions.
50 changes: 40 additions & 10 deletions views/stats.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,36 @@ function getDescription() {
description.push(line.join(' '), '\n', '\n')
}
// Avg. skill
if (calculated.average_level) {
description.push(
`πŸ“š Avg Skill Level: ${
Math.floor(calculated.average_level * 10) / 10
} `
)
description.push('\n')
// Skyblock Level
if (calculated.skyblock_level.xp !== 0 && calculated.skyblock_level.level !== 0) {
description.push(
`🌟 Skyblock Level: ${calculated.skyblock_level.level + calculated.skyblock_level.progress}`,
'\n'
)
}
if (calculated.average_level || calculated.dungeons.class_average) {
// Skill Average
if (calculated.average_level) {
description.push(
`πŸ“š Avg Skill Level: ${
Math.floor(calculated.average_level * 10) / 10
} `
)
}
// Dungeons classs average
if (calculated.dungeons.class_average) {
description.push(
`βš”οΈ Avg Class Level: ${
Math.floor(calculated.dungeons.class_average.avrg_level_with_progress * 10) / 10
} `
)
}
description.push('\n')
}
// Weights
Expand All @@ -552,13 +574,21 @@ function getDescription() {
description.push('\n')
}
// Bank & purse
// Networth, Bank & purse
if (calculated.networth.noInventory === false) {
description.push(
`πŸ’Έ Networth: ${helper.formatNumber(calculated.networth.networth, true)} `
)
}
if (calculated.bank) {
description.push(
`🏦 Bank: ${helper.formatNumber(calculated.bank, true)} `
)
}
description.push(`πŸ’° Purse: ${helper.formatNumber(calculated.purse, true)}`)
description.push(
`πŸ’° Purse: ${helper.formatNumber(calculated.purse, true)}`
)
// Done!
return description.join('')
Expand Down

0 comments on commit c503f5a

Please sign in to comment.