Skip to content

Commit 7724385

Browse files
committed
leave pathwalking related info in export
1 parent 1a57a4d commit 7724385

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
output
3-
tester
3+
tester
4+
.idea

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.6.0
2+
- json export will not remove pathwalking locks
3+
14
# 0.5.2
25
- correct exports (so they will not break backward compatibility)
36

map-operations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function writeMap(map, file) {
5555
for (const exit in room.mSpecialExits) {
5656
if (Object.hasOwnProperty.call(room.mSpecialExits, exit)) {
5757
const exRoomId = room.mSpecialExits[exit];
58-
if (rawSpecialExits[exRoomId] == undefined) {
58+
if (rawSpecialExits[exRoomId] === undefined) {
5959
rawSpecialExits[exRoomId] = []
6060
}
6161
rawSpecialExits[exRoomId].push((room.mSpecialExitLocks.indexOf(exRoomId) > -1 ? "1" : "0") + exit)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mudlet-map-binary-reader",
3-
"version": "0.5.3",
3+
"version": "0.6.0",
44
"keywords": [
55
"mudlet",
66
"map",

reader-export.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,16 @@ function convertRoom(roomId, room, hash) {
2626
}
2727
delete room[key]
2828
})
29-
delete isLocked
3029
room.specialExits = room.mSpecialExits
3130
delete room.mSpecialExits
32-
delete room.mSpecialExitLocks
33-
delete room.exitWeights
34-
delete room.exitLocks
35-
delete room.isLocked
3631
for (const key in room.customLines) {
3732
if (Object.hasOwnProperty.call(room.customLines, key)) {
3833
const element = room.customLines[key];
39-
let line = {
40-
points: element.map(points => {return {x: points[0], y : points[1]}}),
41-
attributes : {
34+
room.customLines[key] = {
35+
points: element.map(points => {
36+
return {x: points[0], y: points[1]}
37+
}),
38+
attributes: {
4239
color: {
4340
r: room.customLinesColor[key].r,
4441
g: room.customLinesColor[key].g,
@@ -48,7 +45,6 @@ function convertRoom(roomId, room, hash) {
4845
arrow: room.customLinesArrow[key]
4946
}
5047
}
51-
room.customLines[key] = line
5248
}
5349
}
5450
delete room.customLinesArrow
@@ -101,7 +97,7 @@ function generateColors(map) {
10197
if (i !== 16) {
10298
let key = `ansi_${("00" + i).slice (-3)}`
10399
let envId
104-
if (i == 0 || i == 8) {
100+
if (i === 0 || i === 8) {
105101
envId = i + 8
106102
} else {
107103
envId = i

0 commit comments

Comments
 (0)