diff options
| author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-06 21:40:49 +0800 |
|---|---|---|
| committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-05-06 21:40:49 +0800 |
| commit | f0cfad5af93244618d5a60c88b1c0a4837e629ae (patch) | |
| tree | 062a301f34c8e6d3284fa845676b23b2ab8d7f9a /features/dungeonMap | |
| parent | e2e2d676ee056e9f44f6c67e29f0952b9ef956b2 (diff) | |
| download | SoopyV2-f0cfad5af93244618d5a60c88b1c0a4837e629ae.tar.gz SoopyV2-f0cfad5af93244618d5a60c88b1c0a4837e629ae.tar.bz2 SoopyV2-f0cfad5af93244618d5a60c88b1c0a4837e629ae.zip | |
+ Many performance improvements
+ Fix rescue mission waypoints
Diffstat (limited to 'features/dungeonMap')
| -rw-r--r-- | features/dungeonMap/index.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js index cfa4fd9..fcb964b 100644 --- a/features/dungeonMap/index.js +++ b/features/dungeonMap/index.js @@ -25,6 +25,7 @@ class DungeonMap extends Feature { } isInDungeon() { + if (!this.FeatureManager || !this.FeatureManager.features["dataLoader"]) return false return this.FeatureManager.features["dataLoader"].class.isInDungeon } @@ -112,13 +113,13 @@ class DungeonMap extends Feature { this.spiritLeapOverlayGui = new SpiritLeapOverlay(this) // this.registerEvent("tick", this.tick) - this.registerStep(true, 3, this.step) + this.registerStep(true, 3, this.step).registeredWhen(() => this.isInDungeon()) this.registerStep(true, 10, () => { this.spiritLeapOverlayGui.tick() - }) - this.registerStep(false, 5, this.step5s) - this.registerEvent("renderOverlay", this.renderOverlay) - this.registerEvent("renderWorld", this.renderWorld) + }).registeredWhen(() => this.isInDungeon()) + this.registerStep(false, 5, this.step5s).registeredWhen(() => this.isInDungeon()) + this.registerEvent("renderOverlay", this.renderOverlay).registeredWhen(() => this.isInDungeon()) + this.registerEvent("renderWorld", this.renderWorld).registeredWhen(() => this.isInDungeon()) this.registerEvent("worldLoad", this.worldLoad) this.registerEvent("guiOpened", (event) => { @@ -150,7 +151,7 @@ class DungeonMap extends Feature { new Thread(() => { this.updateMapImage() }).start() - }) + }).registeredWhen(() => this.isInDungeon()) this.registerChat("&r&r&r &r&cThe Catacombs &r&8- &r&eFloor ${*} Stats&r", () => { this.puzzles = {} |
