Add persisted radar emission switch

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
2026-11-02 23:49:40 +03:00
parent 952a10f360
commit 26b258f00f
5 changed files with 25 additions and 7 deletions
+1 -1
View File
@@ -327,7 +327,7 @@ impl Sam {
}
/// Its own radar works: it has one, it is not failed and the unit is deployed.
pub fn radar_up(&self) -> bool {
self.mode != battery::SamMode::LauncherOnly && self.alive() && !self.moving() && self.kind.spec().sensor > 0.0 && self.part(Part::Sensor) > 0.0
self.radar_on && self.mode != battery::SamMode::LauncherOnly && self.alive() && !self.moving() && self.kind.spec().sensor > 0.0 && self.part(Part::Sensor) > 0.0
}
pub fn track(&self, id: u32) -> Option<&Track> {
self.tracks.iter().find(|t| t.id == id)