aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com>2022-08-11 22:48:35 +0800
committerGitHub <noreply@github.com>2022-08-11 22:48:35 +0800
commit4089a5d2b0fe6f459de09d5d509fd4506741b5e8 (patch)
tree9367dbb0cbe755d938e34f97811df88c8285ab1d
parentcc714e8ae5397e6b451e9b50e36bfbead3d6ac41 (diff)
downloadSoopyV2-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.js15
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]