Separate search and engagement roles, support launcher-only SAMs, animate individual tube lids and delay ground strike spending until ejection. Preserve battery configuration and launch poses in saves and replay. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
@@ -23,7 +23,7 @@ impl Sim {
|
||||
pub fn load_ground_round(&mut self, i: usize) -> Result<String, String> {
|
||||
let s = self.sams.get(i).ok_or("Нет такого комплекса")?;
|
||||
if s.kind != SamKind::S400 { return Err("Для этого комплекса нет игрового профиля RM48U".into()); }
|
||||
if !s.alive() || s.moving() || s.reloading > 0 || s.part(Part::Launcher) <= 0.0 {
|
||||
if !s.alive() || s.moving() || s.preparing.is_some() || s.reloading > 0 || s.part(Part::Launcher) <= 0.0 {
|
||||
return Err("Комплекс должен быть исправен и развёрнут".into());
|
||||
}
|
||||
if s.ground_rounds >= s.cells() { return Err("Нет свободной ячейки для RM48U".into()); }
|
||||
@@ -43,7 +43,7 @@ impl Sim {
|
||||
/// Return a loaded ground round to a nearby depot; restore a previously removed air round if available.
|
||||
pub fn unload_ground_round(&mut self, i: usize) -> Result<String, String> {
|
||||
let s = self.sams.get(i).ok_or("Нет такого комплекса")?;
|
||||
if s.kind != SamKind::S400 || !s.alive() || s.moving() || s.reloading > 0 || s.part(Part::Launcher) <= 0.0 || s.ground_rounds == 0 {
|
||||
if s.kind != SamKind::S400 || !s.alive() || s.moving() || s.preparing.is_some() || s.reloading > 0 || s.part(Part::Launcher) <= 0.0 || s.ground_rounds == 0 {
|
||||
return Err("Нужен исправный развёрнутый С-400 с загруженной RM48U".into());
|
||||
}
|
||||
let depot = self.sams.iter().enumerate().filter(|(_, d)| d.kind == SamKind::Depot && d.alive() && d.pos.distance(s.pos) < DEPOT_REACH)
|
||||
|
||||
Reference in New Issue
Block a user