diff options
| author | troido <troido@protonmail.com> | 2020-04-20 13:00:34 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-04-20 13:00:34 +0200 |
| commit | 9ffe36a5375a25601dcc528aa603fb1e679f9847 (patch) | |
| tree | f59c1d315e81b84a2f521d3b4acd2fb52c8936ea /src/roomtemplate.rs | |
| parent | 047b23895df301a622cfd3330787ef900c9777e9 (diff) | |
stop hardcoding default room and encyclopedia
Diffstat (limited to 'src/roomtemplate.rs')
| -rw-r--r-- | src/roomtemplate.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/roomtemplate.rs b/src/roomtemplate.rs index c8d9918..d853b20 100644 --- a/src/roomtemplate.rs +++ b/src/roomtemplate.rs @@ -43,7 +43,6 @@ impl RoomTemplate { let mut field = Vec::new(); field.resize_with(width * height, Vec::new); let jsonfield: &Vec<Value> = jsonroom.get("field").ok_or(perr!("no field"))?.as_array().ok_or(perr!("field not an array"))?; - // todo: what if size doesn't match actual dimensions for (y, row) in jsonfield.iter().take(height).enumerate() { for (x, ch) in row.as_str().ok_or(perr!("field row not a string"))?.chars().take(width).enumerate() { field[x + y * width] = mapping.get(&ch).ok_or(perr!("char not found in mapping"))?.clone(); |
