fixed room name
This commit is contained in:
parent
0472ebc940
commit
1c375b392c
|
@ -341,12 +341,19 @@ $(document).ready(function() {
|
|||
|
||||
var newRoomId = parseInt(_.last(roomNames).replace(/[^\d]+/g, "")) + 1;
|
||||
|
||||
var newRoomName = $('#roomName').val();
|
||||
// remove invalid chars? what's invalid? newlines? are those possible?
|
||||
|
||||
var newRoom = "ROOM " + newRoomId + "\n";
|
||||
|
||||
_.each(room, function(row) {
|
||||
newRoom += _.toString(row) + "\n";
|
||||
});
|
||||
|
||||
if (newRoomName) {
|
||||
newRoom += "NAME " + newRoomName + "\n";
|
||||
}
|
||||
|
||||
newRoom += "PAL " + palette.id + "\n";
|
||||
|
||||
// write
|
||||
|
|
Loading…
Reference in New Issue