diff options
-rw-r--r-- | features/nether/index.js | 1 | ||||
-rw-r--r-- | features/specialMining/index.js | 6 | ||||
-rw-r--r-- | utils/numberUtils.js | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/features/nether/index.js b/features/nether/index.js index 49388bd..77d8f27 100644 --- a/features/nether/index.js +++ b/features/nether/index.js @@ -143,6 +143,7 @@ class Nether extends Feature { this.controlLocLast = undefined this.controlLoc = undefined this.controlSkeleton = undefined + this.miniboss = undefined }) this.registerChat("You completed your rescue quest! Visit the Town Board to claim the rewards,", () => { diff --git a/features/specialMining/index.js b/features/specialMining/index.js index c7929fb..147193a 100644 --- a/features/specialMining/index.js +++ b/features/specialMining/index.js @@ -87,6 +87,7 @@ class PowderAndScatha extends Feature { this.expRateInfo = [] this.mythrilRate = 0 this.gemstoneRate = 0 + this.chestRate = 0 this.saveMiningData(); this.registerCommand("resetpowderdata", () => { @@ -119,6 +120,7 @@ class PowderAndScatha extends Feature { this.mythrilRate = (this.miningData.powder.mithril - mythril) / (Date.now() - time) this.gemstoneRate = (this.miningData.powder.gemstone - gemstone) / (Date.now() - time) + this.chestRate = (this.miningData.powder.chestRate - chestRate) / (Date.now() - time) }) }) @@ -326,6 +328,10 @@ class PowderAndScatha extends Feature { this.overlayLeft.push(`&bGems/h:`) this.overlayRight.push(`&d${numberWithCommas(Math.round(this.gemstoneRate * 1000 * 60 * 60))}`) } + if (this.chestRate) { + this.overlayLeft.push(`&bChests/h:`) + this.overlayRight.push(`&d${numberWithCommas(Math.round(this.chestRate * 1000 * 60 * 60))}`) + } } if (this.scathaCounter.getValue() && this.inCrystalHollows) { let tempText = `&6Scatha Counter\n&bKills: ${this.miningData.scatha.total_worms}\n&bWorms: ${this.miningData.scatha.worms}\n&bScathas: ${this.miningData.scatha.scathas}\n&bSince Scatha: ${this.miningData.scatha.since_scatha}\n` diff --git a/utils/numberUtils.js b/utils/numberUtils.js index 327f875..8d5e7c3 100644 --- a/utils/numberUtils.js +++ b/utils/numberUtils.js @@ -86,9 +86,9 @@ let utils = { }, timeNumber: (time, secondDecimals = 0) => { let mins = Math.floor(time / 1000 / 60) - let secs = Math.floor(time / 1000) % 60 + let secs = (time / 1000) % 60 - if (mins === 0) return secs + "s" + if (mins === 0) return `${secs.toFixed(secondDecimals)}s` return `${mins}m ${secs.toFixed(secondDecimals)}s` }, timeNumber2: (time) => { |