Add passive optical observation post (#136)

- new Optical unit kind with its own catalog row and deploy item
- bounded one-contact line-of-sight checks against land and blocks
- day/night reach and hold timing; obstacle and unknown geometry block sight
- independent class observation with source, time and uncertainty, never DroneKind
- map/monitor/panel statuses and a line to the selected contact
- tests: day/night, wall/unknown, ageing, no kind leak, bounded work, passivity

Cherry-picked from 3ae21123964a9d3234bb2b3efc9ff926d64fc77d onto the
#132/#133/#134 base: the cue test's track literal now carries the shared
class/source/product/quality contract instead of a DroneKind.

Co-Authored-By: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
2026-11-20 22:26:16 +03:00
parent 53fbeced22
commit e5ee15a2ca
23 changed files with 1139 additions and 27 deletions
+7
View File
@@ -244,6 +244,13 @@ mod tests {
SamKind::Patriot.key()
}
#[test]
fn an_optical_post_loads_by_its_catalog_key() {
let l = Layout::parse("sam optical 10 70 20 0.5\n").unwrap();
assert_eq!(l.sams[0].kind, SamKind::Optical);
assert_eq!(l.sams[0].mode, sim::battery::SamMode::Integrated);
}
// #86: the issue's file, and the other ways a saved state can be wrong: refused whole, with the line
#[test]
fn a_damaged_state_is_refused_as_a_whole_with_its_line_and_field() {