diff options
-rw-r--r-- | features/dungeonMap/index.js | 17 | ||||
-rw-r--r-- | metadata.json | 4 |
2 files changed, 14 insertions, 7 deletions
diff --git a/features/dungeonMap/index.js b/features/dungeonMap/index.js index 64faabc..7a9b7cb 100644 --- a/features/dungeonMap/index.js +++ b/features/dungeonMap/index.js @@ -842,17 +842,24 @@ class SpiritLeapOverlay { this.items = itemsNew this.buttonsContainer.clearChildren() - Object.keys(this.items).forEach((name, i) => { - - let name2 = ChatLib.removeFormatting(name) - let pClass = (this.players[name2] || "?") + getClass = (name) => { + let pClass = (this.players[name] || "?") if (pClass === "?") { Object.keys(this.players).forEach(n => { - if (name2.startsWith(n)) { + if (name.startsWith(n)) { pClass = this.players[n] } }) } + return pClass + } + + Object.keys(this.items).sort((a, b) => { + return getClass(ChatLib.removeFormatting(a)).codePointAt(0) - getClass(ChatLib.removeFormatting(b)).codePointAt(0) + }).forEach((name, i) => { + + let name2 = ChatLib.removeFormatting(name) + let pClass = getClass(name2) let button = new ButtonWithArrow().setText((name2 === this.parent.lastDoorOpener ? "&4" : "&2") + "[" + pClass + "] " + name2).addEvent(new SoopyMouseClickEvent().setHandler(() => { Player.getContainer().click(itemsNew[name]) diff --git a/metadata.json b/metadata.json index 089f51b..30db700 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.115", - "versionId": 242, + "version": "2.1.116", + "versionId": 243, "requires": [ "soopyApis", "soopyAddonsData", |