aboutsummaryrefslogtreecommitdiff
path: root/space.js
diff options
context:
space:
mode:
Diffstat (limited to 'space.js')
-rw-r--r--space.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/space.js b/space.js
index 9ffcd18..e567733 100644
--- a/space.js
+++ b/space.js
@@ -30,7 +30,8 @@ function Space(){ // CLASS
for (let line=0; line<8; line++)
this.data.push([]); // Adds lines
for (let x=dimension[1]; x<=dimension[3]; x++){
- tilein(tiles[[y,x]],y-dimension[0]);
+ if (! tiles[[y,x]]) tilein({"content":' '.repeat(16*8),"properties":{"cell_props":{}}}); // Insert a null tile
+ else tilein(tiles[[y,x]],y-dimension[0]);
}
}
@@ -123,4 +124,4 @@ function Space(){ // CLASS
}
-exports.Space = Space
+exports = Space