diff options
| author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-03-27 15:41:20 +0800 |
|---|---|---|
| committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-03-27 15:41:20 +0800 |
| commit | 0cf3a67c2bbd4cdaa5d364436c9153e6456624f1 (patch) | |
| tree | 03d6b37ee2f4109875050d61d63f363659031e6b /features/hud | |
| parent | b94794a3de8827f4bddb5251b010dc32943d79a1 (diff) | |
| download | SoopyV2-0cf3a67c2bbd4cdaa5d364436c9153e6456624f1.tar.gz SoopyV2-0cf3a67c2bbd4cdaa5d364436c9153e6456624f1.tar.bz2 SoopyV2-0cf3a67c2bbd4cdaa5d364436c9153e6456624f1.zip | |
make network requests all go on one permenantly open thread
Diffstat (limited to 'features/hud')
| -rw-r--r-- | features/hud/index.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/features/hud/index.js b/features/hud/index.js index d37fc42..917a2f6 100644 --- a/features/hud/index.js +++ b/features/hud/index.js @@ -150,7 +150,7 @@ class Hud extends Feature { for(let i = 1;i<8;i++){ hudStatTypes["completions_floor_"+i] = "Floor " + i + " completions" } - for(let i = 1;i<7;i++){ + for(let i = 1;i<8;i++){ hudStatTypes["completions_master_"+i] = "Master " + i + " completions" } for(let i = 1;i<8;i++){ @@ -252,7 +252,7 @@ class Hud extends Feature { this.apiLoad(this.FeatureManager.features["dataLoader"].class.lastApiData.skyblock_raw, "skyblock", false, true) } - new Thread(()=>{ + new Thread(()=>{ //TODO: dont create this thread if you have the feature disabled while(this.enabled){ this.updateSpotify() Thread.sleep(5000) @@ -532,9 +532,9 @@ class Hud extends Feature { updateHudThingos(){ let insb = this.FeatureManager.features["dataLoader"].class.isInSkyblock if(Date.now()-this.lastUpdatedStatData > 5*60000 && this.hudStat[0].enabled.getValue() && (insb || this.hudStat.map(a=>a.onlySb.getValue()).includes(false))){ - new Thread(()=>{ - this.FeatureManager.features["dataLoader"].class.loadApiData("skyblock", false) - }).start() + + this.FeatureManager.features["dataLoader"].class.loadApiData("skyblock", false) + this.lastUpdatedStatData = Date.now() return } |
