Represent damage diagnostics as typed reasons

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
2026-11-04 15:57:46 +03:00
parent eea1b3692e
commit 0c870c10d5
8 changed files with 127 additions and 31 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ pub fn draw(sim: &Sim, index: usize) -> Vec<Shape> {
s.push(fill(4.0, 156.0, 300.0, 4.0 + 10.0 * checks.len() as f32, 0xA0080C0A));
for (k, c) in checks.iter().enumerate() {
let color = if c.ok { 0xFF80FF90 } else { 0xFFFF9060 };
s.push(text(fit(format!("{} {}", if c.ok { "+" } else { "-" }, c.text), 294.0), 7.0, 158.0 + 10.0 * k as f32, color));
s.push(text(fit(format!("{} {}", if c.ok { "+" } else { "-" }, crate::why_view::reason(&c.reason)), 294.0), 7.0, 158.0 + 10.0 * k as f32, color));
}
s
}