Playtest fixes: smoke by engine, searchlights, far launch sites that load their chunks, air defence balance, last chance and radar-cued shots, radars in smart raids, echo, Windows release build from a tag
build / mod (push) Successful in 4m4s
release / windows (push) Successful in 23m13s

Smoke: one rule by engine, no heat on trails, no trail on P1-SUN. Searchlights: two lamps a target, off with an empty sky. Halos fade before their reach and their sum is limited. Launch sites load chunks through the server thread, go off-map as a last resort, and reach 4000 blocks. Air defence: ranges x1.5, shots grow with urgency, claims released, /airdef lastchance, long shots on a big radar's tracks. Build: rust-toolchain.toml, airdef.py check, generator manifest and --check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 23:44:14 +03:00
parent 5003376e70
commit ccc3e20902
67 changed files with 4573 additions and 328 deletions
+15 -1
View File
@@ -15,6 +15,8 @@ pub const BEAM_INNER: f64 = 0.03;
pub const BEAM_OUTER: f64 = 0.075;
/// A target is lit once the axis is this close to it (inside the cone's soft edge).
const LIT_ANGLE: f64 = 0.05;
/// Most lamps on one target.
const MAX_LAMPS: u32 = 2;
/// Ticks between casts of the beam's axis against the land.
const CAST_EVERY: u64 = 4;
/// Guns' hits at night on an unlit target.
@@ -75,6 +77,10 @@ impl Sim {
self.flares = keep;
// What the network tracks, for the searchlights.
let tracked: Vec<u32> = self.sams.iter().flat_map(|s| s.seen.iter().copied()).collect();
// A lamp holds a target only while fewer than two others do; the sky is swept only while
// something flies in it.
let mut held: HashMap<u32, u32> = HashMap::new();
let anything = self.drones.iter().any(|d| d.alive());
let gun_targets: Vec<u32> = self.sams.iter().filter_map(|s| s.gun_target).collect();
for i in 0..self.sams.len() {
if self.sams[i].kind != SamKind::Light || !self.sams[i].alive() || self.sams[i].moving() {
@@ -93,12 +99,20 @@ impl Sim {
let target = self
.drones
.iter()
.filter(|d| d.alive() && tracked.contains(&d.id) && d.pos.distance(pos) < BEAM)
.filter(|d| d.alive() && tracked.contains(&d.id) && d.pos.distance(pos) < BEAM && held.get(&d.id).copied().unwrap_or(0) < MAX_LAMPS)
.min_by(|a, b| {
let key = |d: &Drone| d.pos.distance(pos) * if gun_targets.contains(&d.id) { 0.3 } else { 1.0 };
key(a).total_cmp(&key(b))
})
.map(|d| (d.id, d.pos));
if let Some((t, _)) = target {
*held.entry(t).or_insert(0) += 1;
} else if !anything {
let sam = &mut self.sams[i];
sam.target = None;
sam.beam_on = false;
continue;
}
let sam = &mut self.sams[i];
let (head, _) = sam.mount();
let (want_yaw, want_pitch, reach) = match target {