allow non-16x16 rooms
This commit is contained in:
@@ -110,7 +110,7 @@ impl From<String> for Room {
|
||||
}
|
||||
|
||||
let lines = &lines[1..];
|
||||
|
||||
let dimension = lines.len(); // x or y, e.g. `16` for 16x16
|
||||
let mut tiles: Vec<String> = Vec::new();
|
||||
|
||||
for line in lines.into_iter() {
|
||||
@@ -120,7 +120,7 @@ impl From<String> for Room {
|
||||
.collect();
|
||||
|
||||
if ! comma_separated { line = line[1..].to_owned(); }
|
||||
let line = line[..16].to_owned();
|
||||
let line = line[..dimension].to_owned();
|
||||
|
||||
for tile_id in line {
|
||||
tiles.push(tile_id.to_string());
|
||||
|
||||
Reference in New Issue
Block a user