aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorEmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com>2022-08-10 07:21:19 +0800
committerGitHub <noreply@github.com>2022-08-10 07:21:19 +0800
commit1a1a03cb1477e1b89b39d080347a2e28ae72d6fa (patch)
tree36990f1e95c306a89fc5955cac56c1b950e7db5a /features
parent1e69dba025712a55e6f484a28a8f7d38474ad18a (diff)
downloadSoopyV2-1a1a03cb1477e1b89b39d080347a2e28ae72d6fa.tar.gz
SoopyV2-1a1a03cb1477e1b89b39d080347a2e28ae72d6fa.tar.bz2
SoopyV2-1a1a03cb1477e1b89b39d080347a2e28ae72d6fa.zip
change bonzo mask cooldown check
change bonzo mask cooldown check to 30s step
Diffstat (limited to 'features')
-rw-r--r--features/dungeonSolvers/index.js27
1 files changed, 14 insertions, 13 deletions
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js
index ee957b4..471d3d5 100644
--- a/features/dungeonSolvers/index.js
+++ b/features/dungeonSolvers/index.js
@@ -116,19 +116,7 @@ class DungeonSolvers extends Feature {
this.spiritMaskTimer = 0;
this.eraseBonzoTimer = true;
});
- this.registerChat("${prefix}\"mode\":\"dungeon\",\"map\":\"Dungeon\"}&r", () => {
- [...Player.getInventory().getItems()].forEach(i => {
- if (!i) return
- let itemName = i.getName()
- if (itemName.removeFormatting().includes("Bonzo's Mask")) {
- i.getLore().forEach(line => {
- if (line.includes("Cooldown:")) {
- this.bonzoMaskCooldown = Number(line.removeFormatting().split("n: ")[1].replace("s", ""))
- }
- })
- }
- })
- })
+ this.registerStep(false, 30, this.getBonzoMaskCooldown());
this.bonzoSpiritMaskTimer = new ToggleSetting("Timer for when bonzo/spirit mask will be ready", "works for both bonzo masks, hides bonzo masks' timers after you leave the run", false, "bonzo_mask_timer", this);
this.bonzoSpiritMaskTimerElement = new HudTextElement().setToggleSetting(this.bonzoSpiritMaskTimer).setLocationSetting(new LocationSetting("Bonzo/Spirit Mask timer location", "Allows you to edit the location of the timer", "bonzo_mask_timer_location", this, [10, 100, 1, 1]).requires(this.bonzoSpiritMaskTimer).editTempText("&9Bonzo's Mask: &c157s"));
this.hudElements.push(this.bonzoSpiritMaskTimerElement);
@@ -475,6 +463,19 @@ class DungeonSolvers extends Feature {
} catch (e) { }//older ct version
}
+ getBonzoMaskCooldown() {
+ [...Player.getInventory().getItems()].forEach(i => {
+ if (!i) return
+ let itemName = i.getName()
+ if (itemName.removeFormatting().includes("Bonzo's Mask")) {
+ i.getLore().forEach(line => {
+ if (line.includes("Cooldown:")) {
+ this.bonzoMaskCooldown = Number(line.removeFormatting().split("n: ")[1].replace("s", ""))
+ }
+ })
+ }
+ })
+ }
getCurrentRoomId() {
if (Scoreboard.getLines().length === 0) return
let id = ChatLib.removeFormatting(Scoreboard.getLineByIndex(Scoreboard.getLines().length - 1).getName()).trim().split(" ").pop()