mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 12:12:00 +03:00
debugging for intersections
This commit is contained in:
parent
5ad6f53607
commit
a4b8c2247f
@ -100,6 +100,14 @@ impl SelectionState {
|
||||
false
|
||||
}
|
||||
}
|
||||
SelectionState::SelectedIntersection(id) => {
|
||||
if input.key_pressed(Key::D, "debug") {
|
||||
map.get_i(*id).dump_debug();
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
if let Some(s) = new_state {
|
||||
|
@ -1,5 +1,6 @@
|
||||
// Copyright 2018 Google LLC, licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
use abstutil;
|
||||
use dimensioned::si;
|
||||
use geom::Pt2D;
|
||||
use std::collections::HashSet;
|
||||
@ -43,4 +44,8 @@ impl Intersection {
|
||||
}
|
||||
roads.len() == 1
|
||||
}
|
||||
|
||||
pub fn dump_debug(&self) {
|
||||
println!("{}", abstutil::to_json(self));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user