fixed room name

This commit is contained in:
synth-ruiner 2017-12-24 12:09:54 +00:00
parent 0472ebc940
commit 1c375b392c
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -38,10 +38,6 @@ croppie.js:182 (mine)
if (src.match(/^(file|https)?:\/\/|^\/\//)) {
```
## known bugs
* room name doesn't work oops
## to do
* allow user to save output as image, or tweet it :) *user can currently right-click -> Save As but the 128x128 size is not great*