Represent damage diagnostics as typed reasons
Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
@@ -31,6 +31,7 @@ pub use airdef_core::sim;
|
||||
mod scenario;
|
||||
mod wave;
|
||||
mod world_view;
|
||||
mod why_view;
|
||||
use sim::{Class, DroneKind, Ground, Out, Sam, SamKind, Sim};
|
||||
|
||||
const ITEMS: [&str; sim::catalog::INVENTORY_COUNT] = sim::catalog::INVENTORY;
|
||||
@@ -2371,7 +2372,7 @@ impl Mod for AirDef {
|
||||
return Err("Нет такой техники".into());
|
||||
}
|
||||
for c in self.sim.why(i) {
|
||||
say(&format!("{} {}", if c.ok { "+" } else { "-" }, c.text));
|
||||
say(&format!("{} {}", if c.ok { "+" } else { "-" }, why_view::reason(&c.reason)));
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user