Skip to content

Commit

Permalink
Release v5.2.3
Browse files Browse the repository at this point in the history
- Fixed breaking change from BloomCore update.
  • Loading branch information
UnclaimedBloom6 committed Jan 7, 2023
1 parent 046520f commit 9b8a776
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
7 changes: 4 additions & 3 deletions IllegalMap/Components/DmapDungeon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -497,22 +498,22 @@ 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}
*/
getRouteFrom(room1, room2) {
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))
Expand Down
4 changes: 2 additions & 2 deletions IllegalMap/data/rooms.json
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@
"crypts": 34
},
{
"name": "Silver Sword",
"name": "Silvers Sword",
"type": "normal",
"secrets": 1,
"cores": [
Expand Down Expand Up @@ -1349,7 +1349,7 @@
"crypts": 6
},
{
"name": "Rare Pillars",
"name": "Pillars",
"type": "rare",
"secrets": 1,
"cores": [
Expand Down
4 changes: 2 additions & 2 deletions IllegalMap/extra/PlayerTrackerCommands.js
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion IllegalMap/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "IllegalMap",
"description": "Ur mom! !!",
"entry": "index.js",
"version": "5.2.2",
"version": "5.2.3",
"creator": "UnclaimedBloom6",
"requires": [
"BloomCore",
Expand Down
6 changes: 2 additions & 4 deletions IllegalMapAPI.json
Original file line number Diff line number Diff line change
@@ -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."
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 9b8a776

Please sign in to comment.