aboutsummaryrefslogtreecommitdiff
path: root/features/stat_next_to_name
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-29 14:36:23 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-29 14:36:23 +0800
commitaea02ec1040ff1155b0b1a1e768f88e3e404b7c0 (patch)
tree59eb749e8aecba4c4764ca4040fc48e5f78bb0ae /features/stat_next_to_name
parent38f72e98a01a6ade00c4e9eae45e7b57679184f2 (diff)
downloadSoopyV2-aea02ec1040ff1155b0b1a1e768f88e3e404b7c0.tar.gz
SoopyV2-aea02ec1040ff1155b0b1a1e768f88e3e404b7c0.tar.bz2
SoopyV2-aea02ec1040ff1155b0b1a1e768f88e3e404b7c0.zip
- networth page
- networth in stat next to name - fix to cosmetic optimisation being disabled for some reason
Diffstat (limited to 'features/stat_next_to_name')
-rw-r--r--features/stat_next_to_name/index.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/features/stat_next_to_name/index.js b/features/stat_next_to_name/index.js
index 1c1b2ab..a182515 100644
--- a/features/stat_next_to_name/index.js
+++ b/features/stat_next_to_name/index.js
@@ -17,14 +17,16 @@ class StatNextToName extends Feature {
"weight": "Weight",
"catacombsLevel": "Catacombs Level",
"skillAvg": "Skill Average",
- "totalSlayer": "Total Slayer Exp"
+ "totalSlayer": "Total Slayer Exp",
+ "networth": "Networth"
})
this.decimals = {
"weight": 0,
"catacombsLevel": 2,
"skillAvg": 2,
- "totalSlayer": 0
+ "totalSlayer": 0,
+ "networth": "small"
}
this.userStats = {}
@@ -78,7 +80,11 @@ class StatNextToName extends Feature {
nameTagString += " &2["
if(stats.usingSoopyv2) nameTagString += "&d⚝&2"
if(stats.exists && stats[this.statToShow.getValue()]){
- nameTagString += numberUtils.numberWithCommas(stats[this.statToShow.getValue()].toFixed(this.decimals[this.statToShow.getValue()]))
+ if(this.decimals[this.statToShow.getValue()] === "small"){
+ nameTagString += numberUtils.addNotation("oneLetters",Math.round(stats[this.statToShow.getValue()]))
+ }else{
+ nameTagString += numberUtils.numberWithCommas(stats[this.statToShow.getValue()].toFixed(this.decimals[this.statToShow.getValue()]))
+ }
}else{
nameTagString += "?"
}