From 4089a5d2b0fe6f459de09d5d509fd4506741b5e8 Mon Sep 17 00:00:00 2001 From: EmeraldMerchant <96396730+EmeraldMerchant@users.noreply.github.com> Date: Thu, 11 Aug 2022 22:48:35 +0800 Subject: fixing + fixed opening gui twice sets the variable to false --- features/globalSettings/index.js | 15 +++------------ 1 file 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] -- cgit