diff options
author | EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> | 2022-09-16 15:28:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 15:28:57 +0800 |
commit | 9b308653e6955029fe0178b5cadda4530f463e09 (patch) | |
tree | acf3199a94b0a1fe853cf15f63954e3f9c8f0eab /features | |
parent | d8edc85a6ef6029ec29339dba82d0c9fa00d1c5b (diff) | |
download | SoopyV2-9b308653e6955029fe0178b5cadda4530f463e09.tar.gz SoopyV2-9b308653e6955029fe0178b5cadda4530f463e09.tar.bz2 SoopyV2-9b308653e6955029fe0178b5cadda4530f463e09.zip |
added powder/chests per hour toggle
Diffstat (limited to 'features')
-rw-r--r-- | features/specialMining/index.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/features/specialMining/index.js b/features/specialMining/index.js index 1edeadd..2241bc8 100644 --- a/features/specialMining/index.js +++ b/features/specialMining/index.js @@ -20,7 +20,7 @@ class PowderAndScatha extends Feature { new SettingBase("Chest Miner", "Powder mining feature here are made mainly for powder chest grinding", undefined, "chest_mining_info", this); this.compactedChat = new ToggleSetting("Compact Powder Messages", "same as the one in skytils but support following setting", false, "compact_powder_chat", this) this.fixChatForDoublePowder = new ToggleSetting("Fix Chat Messages During Double Powder", "so it's the correct amount of powder you received during the event", false, "fix_chat_dpowder", this) - this.fixChatForDoublePowderSuffix = new TextSetting("Suffix of previous message", "(so you can tell )change it yourself!", "&a(&b2X Powder&a)", "chat_dpowder_suffix", this, "(none)", false).requires(this.fixChatForDoublePowder); + this.fixChatForDoublePowderSuffix = new TextSetting("Suffix of previous message", "(so you can tell whether it's 2x powder) change it yourself!", "&a(&b2X Powder&a)", "chat_dpowder_suffix", this, "(none)", false).requires(this.fixChatForDoublePowder); this.PowderElement = new ToggleSetting("Powder Mining Info Hud (MAIN TOGGLE)", "This will show your current powder mining section (only in CH)", true, "powder_mining_hud", this).contributor("EmeraldMerchant"); this.PowderOverlayElement = new HudTextElement() .setText("") @@ -30,6 +30,8 @@ class PowderAndScatha extends Feature { this.PowderOverlayElement.disableRendering() new SettingBase("/resetpowderdata", "to reset powder mining data", undefined, "reset_powder_data_command_info", this).requires(this.PowderElement); + this.powderPerHour = new ToggleSetting("Mithril & Gemstone Powder/h", "should it show powder per hour on hud?", false, "powder_per_hour_toggle", this).requires(this.PowderElement); + this.chestsPerHour = new ToggleSetting("Chests/h", "should it show chests per hour on hud?", false, "chests_per_hour_toggle", this).requires(this.PowderElement); this.resetPowderWhenLeaveCH = new ToggleSetting("Reset Powder When Left CH", "Should it reset powder hud whenever you left ch", false, "reset_powder_when_left_ch", this).requires(this.PowderElement); this.resetPowderWhenLeaveGame = new ToggleSetting("Reset Powder When Left Game", "Should it reset powder hud whenever you left game", false, "reset_powder_when_left_game", this).requires(this.PowderElement); this.chestUncoverAlert = new ToggleSetting("Alert When You Dug a Chest Out", "so you don't miss it", false, "chest_uncover_alert", this).requires(this.PowderElement); @@ -408,15 +410,17 @@ class PowderAndScatha extends Feature { this.overlayLeft.push(`&bGems:`) this.overlayRight.push(`&d${numberWithCommas(g)}`) } - if (this.mythrilRate) { - this.overlayLeft.push(`&bMithril/h:`) - this.overlayRight.push(`&d${numberWithCommas(Math.round(this.mythrilRate * 1000 * 60 * 60))}`) - } - if (this.gemstoneRate) { - this.overlayLeft.push(`&bGems/h:`) - this.overlayRight.push(`&d${numberWithCommas(Math.round(this.gemstoneRate * 1000 * 60 * 60))}`) + if (this.powderPerHour.getValue()) { + if (this.mythrilRate) { + this.overlayLeft.push(`&bMithril/h:`) + this.overlayRight.push(`&d${numberWithCommas(Math.round(this.mythrilRate * 1000 * 60 * 60))}`) + } + if (this.gemstoneRate) { + this.overlayLeft.push(`&bGems/h:`) + this.overlayRight.push(`&d${numberWithCommas(Math.round(this.gemstoneRate * 1000 * 60 * 60))}`) + } } - if (this.chestRate) { + if (this.chestRate && this.chestsPerHour.getValue()) { this.overlayLeft.push(`&bChests/h:`) this.overlayRight.push(`&d${numberWithCommas(Math.round(this.chestRate * 1000 * 60 * 60))}`) } |