diff options
author | EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> | 2022-08-11 22:48:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 22:48:35 +0800 |
commit | 4089a5d2b0fe6f459de09d5d509fd4506741b5e8 (patch) | |
tree | 9367dbb0cbe755d938e34f97811df88c8285ab1d | |
parent | cc714e8ae5397e6b451e9b50e36bfbead3d6ac41 (diff) | |
download | SoopyV2-4089a5d2b0fe6f459de09d5d509fd4506741b5e8.tar.gz SoopyV2-4089a5d2b0fe6f459de09d5d509fd4506741b5e8.tar.bz2 SoopyV2-4089a5d2b0fe6f459de09d5d509fd4506741b5e8.zip |
fixing
+ fixed opening gui twice sets the variable to false
-rw-r--r-- | features/globalSettings/index.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index 12d5a26..9f6e657 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -200,11 +200,9 @@ class GlobalSettings extends Feature { } }) let todoText = []; - if (this.guiOpened) { - this.maxAmount = 0 + let inGui = Client.isInGui(); + if (inGui) { this.todoPickUpLog = {}; - } else if (!this.warpedAgain) { - this.maxAmount = 12 } if (pick) { Object.keys(this.todoPickUpLog).forEach((i) => { @@ -219,7 +217,7 @@ class GlobalSettings extends Feature { this.todoPickUpLog = {}; } // doesn't need to put setText() in if (pick) cuz if (!pick) it clears the todo log list - this.sbaItemPickUpLogElement.setText(todoText.join("\n")) + this.sbaItemPickUpLogElement.setText(inGui ? "" : (todoText.join("\n"))) }) //2 chat registeries below prevents pickup log to go brrr when warping this.warpedAgain = false @@ -268,13 +266,6 @@ class GlobalSettings extends Feature { } }) }); - this.guiOpened = false; - this.registerEvent('guiOpened', () => { - this.guiOpened = true - }) - this.registerEvent('guiClosed', () => { - this.guiOpened = false - }) this.firstPageSettings = [this.darkTheme] |