mudlet-map-renderer 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -160,7 +160,10 @@ class Controls {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
renderPath(from, to, color) {
|
|
163
|
-
|
|
163
|
+
let rooms = this.pathFinder.path(from, to)?.map(number => parseInt(number));
|
|
164
|
+
if (rooms) {
|
|
165
|
+
return this.renderer.renderPath(rooms, color);
|
|
166
|
+
}
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
|
|
@@ -716,7 +716,7 @@ class Renderer {
|
|
|
716
716
|
let group = new paper.Group();
|
|
717
717
|
locations.forEach(id => {
|
|
718
718
|
let room = this.area.getRoomById(id);
|
|
719
|
-
if (!room) {
|
|
719
|
+
if (!room || room.z !== this.area.zIndex) {
|
|
720
720
|
return
|
|
721
721
|
}
|
|
722
722
|
let startPoint = new paper.Point(room.x + this.roomFactor * 0.5, room.y + this.roomFactor * 0.5)
|
|
@@ -724,7 +724,7 @@ class Renderer {
|
|
|
724
724
|
exits.forEach(exitRoomId => {
|
|
725
725
|
if (locations.indexOf(exitRoomId) > -1) {
|
|
726
726
|
let exitRoom = this.area.getRoomById(exitRoomId);
|
|
727
|
-
if (!exitRoom) {
|
|
727
|
+
if (!exitRoom || exitRoom.z !== this.area.zIndex) {
|
|
728
728
|
return
|
|
729
729
|
}
|
|
730
730
|
let endPoint = new paper.Point(exitRoom.x + this.roomFactor * 0.5, exitRoom.y + this.roomFactor * 0.5)
|