diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-01-02 13:08:12 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-01-02 13:08:12 +0800 |
commit | 85d4d38dccb2f1cc8a00ed4de16cd8e464b20abe (patch) | |
tree | a9746240db675edfa61cf3d9b00a2f88706c16b4 /features/networthGUI | |
parent | 2776d9ae74bfc2638c54389d687e921786f2139e (diff) | |
download | SoopyV2-85d4d38dccb2f1cc8a00ed4de16cd8e464b20abe.tar.gz SoopyV2-85d4d38dccb2f1cc8a00ed4de16cd8e464b20abe.tar.bz2 SoopyV2-85d4d38dccb2f1cc8a00ed4de16cd8e464b20abe.zip |
Make networth use highest networth profile
Diffstat (limited to 'features/networthGUI')
-rw-r--r-- | features/networthGUI/index.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/features/networthGUI/index.js b/features/networthGUI/index.js index b0be84e..224e75d 100644 --- a/features/networthGUI/index.js +++ b/features/networthGUI/index.js @@ -146,10 +146,15 @@ class NetworthPage extends GuiPage { return } - let nwData = skyblockData.data.profiles[skyblockData.data.stats.bestProfileId].members[playerData.data.uuid].soopyNetworth + let highestProf = undefined + Object.keys(skyblockData.data.profiles).forEach(prof=>{ + if(highestProf === undefined || skyblockData.data.profiles[prof].members[playerData.data.uuid].soopyNetworth.networth > skyblockData.data.profiles[highestProf].members[playerData.data.uuid].soopyNetworth.networth) highestProf = prof + }) + + let nwData = skyblockData.data.profiles[highestProf].members[playerData.data.uuid].soopyNetworth let nameElm = new SoopyTextElement().setText(playerData.data.stats.nameWithPrefix.replace(/§f/g, "§7")).setMaxTextScale(2).setLocation(0.1, 0.05, 0.8, 0.1) this.statArea.addChild(nameElm) - this.statArea.addChild(new SoopyTextElement().setText("§0Networth (Highest weight profile): §2$" + numberWithCommas(Math.round(nwData.networth)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.1, 0.15, 0.8, 0.1)) + this.statArea.addChild(new SoopyTextElement().setText("§0Networth (" + skyblockData.data.profiles[highestProf].stats.cute_name + "): §2$" + numberWithCommas(Math.round(nwData.networth)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.1, 0.15, 0.8, 0.1)) this.statArea.addChild(new SoopyTextElement().setText("§0Purse: §2$" + numberWithCommas(Math.round(nwData.purse)).replace(/,/g, "§7,§2") + "§0 | Bank: §2$" + numberWithCommas(Math.round(nwData.bank)).replace(/,/g, "§7,§2") + "§0 | Sack: §2$" + numberWithCommas(Math.round(nwData.sack)).replace(/,/g, "§7,§2")).setMaxTextScale(1.5).setLocation(0.1, 0.25, 0.8, 0.1)) Object.keys(nwData.categories).sort((a, b)=>nwData.categories[b].total-nwData.categories[a].total).forEach((name, i)=>{ |