From 5f3bb8897d9feac251a9353ae65c0d08cc3e00ff Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Tue, 11 Jan 2022 10:05:16 +0000 Subject: [PATCH] Draw disconnected cells as red, to shout 'problem' --- game/src/ltn/connectivity.rs | 1 - game/src/ltn/draw_cells.rs | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/game/src/ltn/connectivity.rs b/game/src/ltn/connectivity.rs index 4fcda2821f..43bc80cade 100644 --- a/game/src/ltn/connectivity.rs +++ b/game/src/ltn/connectivity.rs @@ -77,7 +77,6 @@ impl Viewer { .iter() .filter(|c| c.is_disconnected()) .count(); - // TODO Also add a red outline to them or something let warning = if disconnected_cells == 0 { String::new() } else { diff --git a/game/src/ltn/draw_cells.rs b/game/src/ltn/draw_cells.rs index f5958d12b8..04ba60b353 100644 --- a/game/src/ltn/draw_cells.rs +++ b/game/src/ltn/draw_cells.rs @@ -18,6 +18,7 @@ lazy_static::lazy_static! { ]; } const CAR_FREE_COLOR: Color = Color::GREEN; +const DISCONNECTED_COLOR: Color = Color::RED; /// Partition a neighborhood's boundary polygon based on the cells. Currently this discretizes /// space into a grid, so the results don't look perfect, but it's fast. Also returns the color for @@ -83,6 +84,8 @@ pub fn draw_cells(map: &Map, neighborhood: &Neighborhood) -> (GeomBatch, Vec