handle old room format
This commit is contained in:
parent
7c76a9d3d2
commit
fe3fac5e2b
|
@ -84,7 +84,11 @@ impl From<String> for Room {
|
||||||
let mut tiles: Vec<String> = Vec::new();
|
let mut tiles: Vec<String> = Vec::new();
|
||||||
|
|
||||||
for line in lines.into_iter() {
|
for line in lines.into_iter() {
|
||||||
let line: Vec<&str> = line.split(",").collect();
|
let line: Vec<&str> = if line.contains(",") {
|
||||||
|
line.split(",").collect()
|
||||||
|
} else { // old room format
|
||||||
|
line.split("").collect()
|
||||||
|
};
|
||||||
|
|
||||||
for tile_id in line {
|
for tile_id in line {
|
||||||
tiles.push(tile_id.to_string());
|
tiles.push(tile_id.to_string());
|
||||||
|
|
Loading…
Reference in New Issue