fix(game): restore swept target sensors

Move claw contact and all eleven initially active type-4 circle records onto a
swept millipixel sensor test with per-object enter latching. Preserve the exact
left-bank and top-gate coordinates, radii, and scores from the initialized
object ledger.

Remove the inferred top-bank completion rule. Each original top target now
scores 500 and independently starts recovered magnetic-gate timing instead of
requiring all three for an invented bonus.

Test Plan:
- `cargo test --all-targets` -- 44 passed
- `cargo clippy --all-targets -- -D warnings` -- passed
- `cargo build --profile production` -- passed
- top sensor contact-latch and re-entry test -- passed
- 20-second deterministic launch remained in active table motion
- `git diff --cached --check` -- passed
This commit is contained in:
2026-08-22 21:12:41 +02:00
parent 9d91cc51c7
commit bf5b855f44
5 changed files with 189 additions and 30 deletions
+35
View File
@@ -59,6 +59,25 @@ pub struct StaticCircle {
pub normal_kick: f32,
}
#[derive(Clone, Copy, Debug)]
pub struct TargetSensor {
pub id: u8,
pub center: Vec2,
pub radius: f32,
pub score: u32,
}
impl TargetSensor {
const fn new(id: u8, center: Vec2, radius: f32, score: u32) -> Self {
Self {
id,
center,
radius,
score,
}
}
}
impl StaticCircle {
const fn new(id: u8, center: Vec2, contact_radius: f32) -> Self {
let (normal_rebound, tangent_coupling, normal_kick) = match id {
@@ -242,6 +261,22 @@ pub const BUMPERS: [StaticCircle; 3] = [
StaticCircle::new(53, Vec2::new(219.0, 165.0), 23.0),
];
/// Initially active type-4 circle records. Objects 149, 153, and 154 are
/// mechanism-controlled and begin disabled in the original table.
pub const TARGET_SENSORS: [TargetSensor; 11] = [
TargetSensor::new(140, Vec2::new(24.0, 182.0), 12.0, 1_000),
TargetSensor::new(141, Vec2::new(18.0, 162.0), 12.0, 1_000),
TargetSensor::new(142, Vec2::new(17.0, 144.0), 12.0, 1_500),
TargetSensor::new(143, Vec2::new(17.0, 125.0), 12.0, 1_500),
TargetSensor::new(144, Vec2::new(17.0, 106.0), 12.0, 2_000),
TargetSensor::new(145, Vec2::new(17.0, 87.0), 12.0, 2_000),
TargetSensor::new(146, Vec2::new(17.0, 67.0), 12.0, 2_500),
TargetSensor::new(147, Vec2::new(17.0, 48.0), 12.0, 3_000),
TargetSensor::new(150, Vec2::new(205.0, 47.0), 11.0, 500),
TargetSensor::new(151, Vec2::new(233.0, 46.0), 11.0, 500),
TargetSensor::new(152, Vec2::new(264.0, 46.0), 11.0, 500),
];
#[cfg(test)]
mod tests {
use super::*;