mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-25 11:44:25 +03:00
stop flipping colors of cars based on stuck/moving when zoomed in
This commit is contained in:
parent
c6ed4a687b
commit
b7dd4d5ec0
@ -486,9 +486,7 @@ impl AgentColorScheme {
|
||||
cs.get_def("bus", Color::rgb(50, 133, 117))
|
||||
} else {
|
||||
match input.status {
|
||||
CarStatus::Debug => cs.get_def("debug car", Color::BLUE.alpha(0.8)),
|
||||
CarStatus::Moving => cs.get_def("moving car", Color::CYAN),
|
||||
CarStatus::Stuck => cs.get_def("stuck car", Color::rgb(222, 184, 135)),
|
||||
CarStatus::Parked => cs.get_def("parked car", Color::rgb(180, 233, 76)),
|
||||
}
|
||||
}
|
||||
@ -500,10 +498,8 @@ impl AgentColorScheme {
|
||||
pub fn zoomed_color_bike(self, input: &DrawCarInput, cs: &ColorScheme) -> Color {
|
||||
match self {
|
||||
AgentColorScheme::VehicleTypes => match input.status {
|
||||
CarStatus::Debug => cs.get_def("debug bike", Color::BLUE.alpha(0.8)),
|
||||
// TODO Hard to see on the greenish bike lanes? :P
|
||||
CarStatus::Moving => cs.get_def("moving bike", Color::GREEN),
|
||||
CarStatus::Stuck => cs.get_def("stuck bike", Color::RED),
|
||||
CarStatus::Parked => unreachable!(),
|
||||
},
|
||||
_ => self.by_metadata(&input.metadata),
|
||||
|
@ -154,9 +154,8 @@ impl Car {
|
||||
_ => None,
|
||||
},
|
||||
status: match self.state {
|
||||
// TODO Cars can be Queued behind a slow Crossing. Looks kind of weird.
|
||||
CarState::Queued => CarStatus::Stuck,
|
||||
CarState::WaitingToAdvance => CarStatus::Stuck,
|
||||
CarState::Queued => CarStatus::Moving,
|
||||
CarState::WaitingToAdvance => CarStatus::Moving,
|
||||
CarState::Crossing(_, _) => CarStatus::Moving,
|
||||
// Eh they're technically moving, but this is a bit easier to spot
|
||||
CarState::Unparking(_, _, _) => CarStatus::Parked,
|
||||
|
@ -46,9 +46,7 @@ pub struct DrawCarInput {
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
pub enum CarStatus {
|
||||
Moving,
|
||||
Stuck,
|
||||
Parked,
|
||||
Debug,
|
||||
}
|
||||
|
||||
pub struct UnzoomedAgent {
|
||||
|
Loading…
Reference in New Issue
Block a user