diff --git a/IllegalMap/Components/DmapDungeon.js b/IllegalMap/Components/DmapDungeon.js index 326c13c..8721b1d 100644 --- a/IllegalMap/Components/DmapDungeon.js +++ b/IllegalMap/Components/DmapDungeon.js @@ -266,6 +266,7 @@ export default new class DmapDungeon { if (!this.toScan.size) { this.rooms.forEach(a => a.update()) this.fullyScanned = true + this.scanFromEntrance() let trap = this.rooms.find(a => a.type == "trap") if (trap) this.trapType = trap.name.split(" ")[0] @@ -497,7 +498,7 @@ export default new class DmapDungeon { } /** * Returns an array of room objects of the rooms from room1 to room2. If room1 or room2 does not exist, returns null. - * @param {String} room1 - The room to start at + * @param {String} room1 - The name of the room to start at * @param {String} room2 - The end room * @returns {Room[]|null} */ @@ -505,14 +506,14 @@ export default new class DmapDungeon { if (!room1 || !room2) return null room1 = room1.replace(/_/g, " ").toLowerCase() room2 = room2.replace(/_/g, " ").toLowerCase() - let room = this.rooms.find(a => a.name.toLowerCase() == room1) + let room = this.rooms.find(a => a.name?.toLowerCase() == room1) if (!room) return null let route1 = this.getRoomsToEntrance(room) let ind = route1.findIndex(a => a.name.toLowerCase() == room2) if (ind !== -1) return route1.slice(0, ind+1) - let room2 = this.rooms.find(a => a.name.toLowerCase() == room2) + let room2 = this.rooms.find(a => a.name?.toLowerCase() == room2) let route2 = this.getRoomsToEntrance(room2) let dupe = route1.find(a => route2.some(b => a == b)) diff --git a/IllegalMap/data/rooms.json b/IllegalMap/data/rooms.json index 7492e79..2f25d02 100644 --- a/IllegalMap/data/rooms.json +++ b/IllegalMap/data/rooms.json @@ -1235,7 +1235,7 @@ "crypts": 34 }, { - "name": "Silver Sword", + "name": "Silvers Sword", "type": "normal", "secrets": 1, "cores": [ @@ -1349,7 +1349,7 @@ "crypts": 6 }, { - "name": "Rare Pillars", + "name": "Pillars", "type": "rare", "secrets": 1, "cores": [ diff --git a/IllegalMap/extra/PlayerTrackerCommands.js b/IllegalMap/extra/PlayerTrackerCommands.js index 5a1b4e1..3c3225c 100644 --- a/IllegalMap/extra/PlayerTrackerCommands.js +++ b/IllegalMap/extra/PlayerTrackerCommands.js @@ -1,4 +1,4 @@ -import { sortObject } from "../../BloomCore/utils/Utils" +import { sortObjectByValues } from "../../BloomCore/utils/Utils" import { getColoredName, prefix } from "../utils" import DmapDungeon from "../Components/DmapDungeon" @@ -26,7 +26,7 @@ export const roomsCommand = register("command", (player) => { const printRooms = (p) => { let hover = `&a${p.getName(true)}&e's Visited Rooms &6(${Object.keys(p.visitedRooms).length})` - let sorted = sortObject(p.visitedRooms) + let sorted = sortObjectByValues(p.visitedRooms) hover += Object.keys(sorted).map(a => `\n&a${getColoredName(a)} &e- &b${toSeconds(sorted[a])}s`).join("") new Message(new TextComponent(`&b${p.getName(true)}&a's Visited Rooms &7(Hover)`).setHover("show_text", hover)).chat() } diff --git a/IllegalMap/metadata.json b/IllegalMap/metadata.json index cabb434..c77511e 100644 --- a/IllegalMap/metadata.json +++ b/IllegalMap/metadata.json @@ -2,7 +2,7 @@ "name": "IllegalMap", "description": "Ur mom! !!", "entry": "index.js", - "version": "5.2.2", + "version": "5.2.3", "creator": "UnclaimedBloom6", "requires": [ "BloomCore", diff --git a/IllegalMapAPI.json b/IllegalMapAPI.json index 71e2a7b..1653aa6 100644 --- a/IllegalMapAPI.json +++ b/IllegalMapAPI.json @@ -1,10 +1,8 @@ { "moduleName": "IllegalMap", - "latestVersion": "5.2.2", + "latestVersion": "5.2.3", "author": "UnclaimedBloom6", "changelog": [ - "Fixed dungeon logging not logging dungeons", - "Fixed boss room being detected as unknown rooms on floors 4 and lower", - "Fixed room rotation not working properly for map-scanned rooms" + "Fixed breaking change from BloomCore update." ] } \ No newline at end of file diff --git a/README.md b/README.md index 7e870f4..3ba3064 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # IllegalMap -##### Current Version: 5.2.2 for ChatTriggers 2.1.5 or higher +##### Current Version: 5.2.3 for ChatTriggers 2.1.5 or higher Last Updated: December 8 If you find a bug or want to make a suggestion, then join my Discord server: https://discord.gg/pykzREcAuZ