Fix the recon picture's wrecks and its emission sources (#139)
build / mod (push) Failing after 29s

A look no longer reports a wreck as a lead: a first look at one makes no
mark, and one the picture already held is radioed home as destroyed and
takes its mark out of the picture. A hidden kill still never rewrites a
mark, so the old assessment stands until its age runs out.

The channel now follows actual work, not a switch: a radar emits only
while radar_up, a jammer only while its transmitter is on the air. A
silent, packed, failed or destroyed station is just a unit the flyby saw.

A pending wreck observation is durable; older saves without its flag read
as before, every look being of a unit alive when it was seen.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
2026-11-21 09:11:58 +03:00
parent 24b8cce11b
commit 01765027b1
3 changed files with 263 additions and 27 deletions
+5
View File
@@ -363,6 +363,11 @@ impl Sam {
pub fn radar_up(&self) -> bool {
self.radar_on && self.mode != battery::SamMode::LauncherOnly && self.alive() && !self.moving() && self.kind.spec().sensor > 0.0 && self.part(Part::Sensor) > 0.0
}
/// Its jammer is really on the air: the switch, a live station and a deployed one. The same
/// state `step_ew` transmits in, so a look names jamming only while the transmitter works.
pub fn ew_up(&self) -> bool {
self.ew_on && self.alive() && !self.moving()
}
pub fn track(&self, id: u32) -> Option<&Track> {
self.tracks.iter().find(|t| t.id == id)
}