Move battery status text to the presentation adapter

Sam::status, Comps::describe/worst and Sam::parts_text formatted
player-facing Russian in the simulation. The adapter now owns that
text: battery_view::sam_status for the panel and map, why_view::parts
and why_view::worst for the monitor and the status line. The core keeps
the data and gains only the accessors the adapter needs
(preparing_cell, public cells/reload_time/magazine/gun facts).

Texts are unchanged; the adapter tests pin the existing strings.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
2026-11-20 18:17:46 +03:00
parent 60f1bf0fd8
commit 306af49744
8 changed files with 172 additions and 91 deletions
+8
View File
@@ -179,6 +179,14 @@ impl SamKind {
let s = self.spec();
s.missile.is_some() || s.gun.is_some()
}
/// Missiles its launcher's magazine holds; `None` without a launcher.
pub fn missile_magazine(self) -> Option<u32> {
self.spec().missile.as_ref().map(|m| m.magazine)
}
/// Whether it has a gun (its bursts are read by the status line).
pub fn has_gun(self) -> bool {
self.spec().gun.is_some()
}
}
impl Sam {