diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-15 00:01:52 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-15 00:01:52 +0800 |
commit | 7c8b44420a5134db2a238316b0ac05b9a19e7a33 (patch) | |
tree | 234b17e0faf5b7df245e8de443709c7c2fbac35d /features/dungeonMap/index.js | |
parent | 76a4d3fd258a82a059eb12ab1979fcb52471c10e (diff) | |
download | SoopyV2-7c8b44420a5134db2a238316b0ac05b9a19e7a33.tar.gz SoopyV2-7c8b44420a5134db2a238316b0ac05b9a19e7a33.tar.bz2 SoopyV2-7c8b44420a5134db2a238316b0ac05b9a19e7a33.zip |
+ make rooms detect secret counts from green ticks
Diffstat (limited to 'features/dungeonMap/index.js')
-rw-r--r-- | features/dungeonMap/index.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js index 1da7c3f..91c145b 100644 --- a/features/dungeonMap/index.js +++ b/features/dungeonMap/index.js @@ -183,6 +183,7 @@ class DungeonMap extends Feature { let lastXY = "" let registerActionBar = this.registerCustom("actionbar", (curr, max) => { + return let loc = this.getRoomXYWorld() if (lastXY !== loc.join(",")) { @@ -197,6 +198,21 @@ class DungeonMap extends Feature { } }) registerActionBar.trigger.setCriteria('&7${curr}/${max} Secrets').setParameter('contains'); + + this.registerCommand("setrooms", (curr, max) => { + let loc = this.getRoomXYWorld() + + if (lastXY !== loc.join(",")) { + lastXY = loc.join(",") + return + } + if (curr === max) curr = "&a" + curr + if (this.roomDataStuff.get(loc.join(",")) !== curr + " " + max) { + this.roomDataStuff.set(loc.join(","), curr + " " + max) + + socketConnection.sendDungeonData2(this.people, [loc.join(","), curr + " " + max]) + } + }) } updateDungeonMapData2(data) { @@ -869,13 +885,11 @@ class DungeonMap extends Feature { isGreen = true } } - // console.log(ent[1], isGreen) if (isGreen) { let total = ent[1].split(" ")[1] ent[1] = "&a" + total + " " + total - // console.log(ent[1]) + this.roomDataStuff.set(loc, "&a" + total + " " + total) } - // console.log(ent[1], isGreen) } } // if (!this.renderImage) return |