way better map/maze debug output.
This commit is contained in:
parent
3394de064c
commit
f304538325
8 changed files with 72 additions and 24 deletions
|
|
@ -52,8 +52,18 @@ void WorldBuilder::generate_map() {
|
|||
]
|
||||
)"_json;
|
||||
|
||||
auto [maze, valid] = maze::script($map, script);
|
||||
dbc::check(valid, "invalid maze");
|
||||
int i = 0;
|
||||
for(; i < 10; i++) {
|
||||
auto [maze, valid] = maze::script($map, script);
|
||||
|
||||
if(valid) {
|
||||
break;
|
||||
} else {
|
||||
maze.dump(fmt::format("FAILED width={}", $map.width()), true);
|
||||
}
|
||||
}
|
||||
|
||||
dbc::check(i < 10, "failed to find a valid map after 10 attempts");
|
||||
|
||||
$map.init_tiles();
|
||||
stylize_rooms();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue