From d18cec5c13f2e791638eae6b101d4c69ae6ab929 Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Sat, 28 Apr 2018 14:17:29 +0100 Subject: [PATCH] name tiles "roomname n" e.g. Bedroom 1 for easier searching --- includes/script.js | 4 +++- readme.md | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/script.js b/includes/script.js index 0521e57..7ac233a 100644 --- a/includes/script.js +++ b/includes/script.js @@ -521,13 +521,15 @@ $(document).ready(function() { var newTiles = _.filter(bitsyData.tiles, 'new'); var tileText = ""; - _.each(newTiles, function(tile) { + _.each(newTiles, function(tile, n) { tileText += "TIL " + tile.name + "\n"; //again, rename tile name to id... _.each(tile.bitmap, function(row) { tileText += row.join('') + "\n"; }); + tileText += "NAME " + newRoomName + " " + (n + 1) + "\n"; + // don't need to worry about animation right now tileText += "\n"; diff --git a/readme.md b/readme.md index 832eba4..345cd0b 100644 --- a/readme.md +++ b/readme.md @@ -82,5 +82,4 @@ if (src.match(/^(file|https)?:\/\/|^\/\//)) { * allow user to zoom out so the image is letterboxed/windowboxed/etc. * break up rendering into separate preview and output modes (would be good to have a throttled preview for brightness slider adjustments and then a debounced tile render) * add 'invert' function -* allow for image colour hack -* set tile names to "room-name x y" or similar (thanks, Von Bednar) \ No newline at end of file +* allow for image colour hack \ No newline at end of file