Explain unavailable coordinate-strike loadouts in map and documentation (#118)

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
2026-11-02 21:01:07 +03:00
parent efb2f20e58
commit ad96018c0a
3 changed files with 5 additions and 10 deletions
+1 -1
View File
@@ -2218,7 +2218,7 @@ impl Mod for AirDef {
None
}
["strike", n] => {
// A strike missile at known site n, from where the player stands.
// A manual order: the simulation validates availability; player position is no launcher.
let p = player().ok_or("Нет игрока")?;
let id = n.parse::<u32>().map_err(|_| "/airdef strike <номер ПУ из /airdef sites>")?;
let said = self.sim.order_strike(id, DVec3::new(p.x, p.y, p.z), &mut out)?;
+2 -2
View File
@@ -2395,12 +2395,12 @@ impl AirDef {
(None, _) => lines.push(("Данных нет".into(), GREY)),
}
lines.push((format!("Пусков замечено: {}; последний {} с назад", k.launches, now.saturating_sub(k.last) / 20), GREY));
lines.push((format!("Ударных ракет: {}", self.sim.strikes.stock), WHITE));
lines.push(("Удар недоступен: нет совместимого боеприпаса".into(), GREY));
if k.aimed {
lines.push(("Ракета по ней уже в полёте".into(), YELLOW));
}
if k.est.is_some_and(|e| e.fix) && !matches!(k.state, SiteState::Destroyed(_)) {
btns.push(("Ударить по пусковой".into(), Act::Strike(id), false));
btns.push(("Почему удар недоступен?".into(), Act::Strike(id), false));
}
btns.push(("В центр".into(), Act::Centre, false));
}