Merge recon flights and partial reports into the classified radar picture (#135)
build / mod (push) Failing after 1m5s
build / mod (push) Failing after 1m5s
Co-Authored-By: Kimi Code <noreply@moonshot.ai> # Conflicts: # airdef-mod/src/sim/mod.rs
This commit is contained in:
@@ -24,6 +24,7 @@ mod monitor;
|
||||
mod panel;
|
||||
mod presentation;
|
||||
mod radar;
|
||||
mod recon_view;
|
||||
mod replay;
|
||||
mod scene;
|
||||
mod smoke;
|
||||
@@ -200,6 +201,8 @@ enum Page {
|
||||
More,
|
||||
/// The last raid's events and its replays.
|
||||
Replays,
|
||||
/// The enemy's recon picture and why it prices each mark: debug and after-action review (#135).
|
||||
Recon,
|
||||
/// The systems with their doctrines, and one system's doctrine (by id) (#47).
|
||||
Fleet,
|
||||
Doctrine(u32),
|
||||
@@ -235,7 +238,9 @@ const BTN_LAUNCH: u32 = 34;
|
||||
const BTN_NEXT: u32 = 35;
|
||||
const BTN_MORE: u32 = 17;
|
||||
const BTN_REPLAYS: u32 = 18;
|
||||
const BTN_RECON: u32 = 23;
|
||||
const REPLAY_EVENTS: u32 = 3;
|
||||
const RECON_ROWS: u32 = 6;
|
||||
const BTN_MAP: u32 = 40;
|
||||
const BTN_FULL: u32 = 41;
|
||||
const BTN_REEL: u32 = 42;
|
||||
@@ -1587,6 +1592,7 @@ impl AirDef {
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_DOCTRINE, label: format!("Доктрины: охрана, сектор, резерв (особых: {custom})…") }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_WAVE, label: "Налёт: состав и запуск…".into() }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_REPLAYS, label: "Повторы…".into() }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_RECON, label: "Разведка противника (разбор)…".into() }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_MORE, label: "Огонь, ремонт, эффекты…".into() }));
|
||||
}
|
||||
Page::BatteryDeploy => {
|
||||
@@ -1608,6 +1614,7 @@ impl AirDef {
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_MAP, label: "Карта налёта (R)".into() }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_FULL, label: "Полный повтор".into() }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_REEL, label: format!("Лучшие моменты ({})", replay::reel(rec).len()) }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_RECON, label: "Разведка противника (разбор)".into() }));
|
||||
}
|
||||
None => {
|
||||
title = "Повторы".into();
|
||||
@@ -1616,10 +1623,17 @@ impl AirDef {
|
||||
text: "Повторов пока нет: налёт записывается сам и появится здесь, когда небо очистится".into(),
|
||||
color: 0,
|
||||
}));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_RECON, label: "Разведка противника (разбор)".into() }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_BACK, label: "← Назад".into() }));
|
||||
}
|
||||
}
|
||||
}
|
||||
Page::Recon => {
|
||||
title = "Разведка противника — разбор (debug): что враг запомнил и почему".into();
|
||||
let rows: Vec<String> = recon_view::picture_lines(&self.sim.enemy_picture()).into_iter().take(200).collect();
|
||||
widgets.push(Widget::List(ListWidget { id: RECON_ROWS, rows, selected: None }));
|
||||
widgets.push(Widget::Button(ButtonWidget { id: BTN_BACK, label: "← Назад".into() }));
|
||||
}
|
||||
Page::More => {
|
||||
title = "AirDef — управление".to_string();
|
||||
widgets.push(Widget::Button(ButtonWidget {
|
||||
@@ -2267,6 +2281,16 @@ impl Mod for AirDef {
|
||||
self.open_menu(Page::Main);
|
||||
return;
|
||||
}
|
||||
(Page::Main, BTN_RECON) | (Page::Replays, BTN_RECON) => {
|
||||
self.open_menu(Page::Recon);
|
||||
return;
|
||||
}
|
||||
(Page::Recon, BTN_BACK) => {
|
||||
self.open_menu(Page::Main);
|
||||
return;
|
||||
}
|
||||
// The review is read-only: a row click changes nothing.
|
||||
(Page::Recon, RECON_ROWS) => return,
|
||||
(Page::Main, BTN_MORE) => {
|
||||
self.open_menu(Page::More);
|
||||
return;
|
||||
@@ -2592,6 +2616,14 @@ impl Mod for AirDef {
|
||||
self.set_effects(*v != "off", *v == "hd");
|
||||
Some(format!("Эффекты: {}", match *v { "off" => "выкл", "hd" => "HD", _ => "обычные" }))
|
||||
}
|
||||
["recon"] => {
|
||||
// The enemy's partial picture and why it prices each mark: explicit debug, never the
|
||||
// normal HUD (#135). The same lines fill the after-action review page.
|
||||
for l in recon_view::picture_lines(&self.sim.enemy_picture()) {
|
||||
say(&l);
|
||||
}
|
||||
None
|
||||
}
|
||||
["stats"] => Some(format!(
|
||||
"В воздухе: {}, ракет: {}, ПВО: {}, сбито: {}, поражений: {}, разбились о препятствия: {}; удары по ПУ: пущено {}, уничтожено {}, подавлено {}, промахов {}, сбито ПВО {}; {}",
|
||||
self.sim.drones.iter().filter(|d| d.alive()).count(),
|
||||
|
||||
Reference in New Issue
Block a user