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
+8 -4
View File
@@ -403,7 +403,7 @@ impl Sim {
);
for l in &s.pending {
body += &format!(
"airrecobs {} {} {} {} {} {} {} {} {} {}\n",
"airrecobs {} {} {} {} {} {} {} {} {} {} {}\n",
l.truth,
coord(l.area.x),
coord(l.area.y),
@@ -414,6 +414,7 @@ impl Sim {
l.quality.name(),
l.source.name(),
l.observed,
l.wreck,
);
}
for z in &s.zones {
@@ -715,8 +716,8 @@ impl Sim {
recon_expect.push((pending, zones));
}
"airrecobs" => {
if w.len() != 11 {
return Err(l.bad("наблюдение разведки", "нужны юнит, место, категория, источник и такт"));
if w.len() != 11 && w.len() != 12 {
return Err(l.bad("наблюдение разведки", "нужны юнит, место, категория, источник, такт и признак остова"));
}
let Some(at) = recon_sortie_at else {
return Err(l.bad("наблюдение разведки", "строка без разведчика"));
@@ -739,7 +740,10 @@ impl Sim {
let quality = recon::Quality::from_key(l.word(8, "качество")?).ok_or_else(|| l.bad("качество", "coarse или refined"))?;
let source = recon::Source::from_key(l.word(9, "источник")?).ok_or_else(|| l.bad("источник", "flyby, emission, jamming или launch"))?;
let observed = l.int(10, "такт наблюдения", 0, tick as i64)? as u64;
recon.sorties[at].pending.push(recon::Look { truth, area, radius, category, role, quality, source, observed });
// An older save has no wreck flag: every pending look it holds is of a unit
// that was alive when it was seen.
let wreck = if w.len() > 11 { l.flag(11, "остов")? } else { false };
recon.sorties[at].pending.push(recon::Look { truth, area, radius, category, role, quality, source, observed, wreck });
}
"airreczone" => {
if w.len() != 5 {