fix(game): restore wheel locks and reset target
Replace the inferred eight-sector wheel and central lock rectangle with the six recovered type-3 records. Fill the five lock holes at their exact centers, double each successive bonus from 10,000 through 160,000, transfer the complete 310,000 on the fifth, and return a launcher ball without consuming one. Restore object 148 as the wheel-reset target and clear all filled-hole state on contact. Keep these sensors on the same swept path and contact-latch machinery as the claw and type-4 targets. Test Plan: - `cargo test --all-targets` -- 47 passed - `cargo clippy --all-targets -- -D warnings` -- passed - `cargo build --profile production` -- passed - live five-hole bonus/score sequence matched exactly - live object-148 reset cleared all five contact states - `git diff --cached --check` -- passed
This commit is contained in:
@@ -99,6 +99,19 @@ pub struct TargetSensor {
|
||||
pub score: u32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct MechanismSensor {
|
||||
pub id: u8,
|
||||
pub center: Vec2,
|
||||
pub radius: f32,
|
||||
}
|
||||
|
||||
impl MechanismSensor {
|
||||
const fn new(id: u8, center: Vec2, radius: f32) -> Self {
|
||||
Self { id, center, radius }
|
||||
}
|
||||
}
|
||||
|
||||
impl TargetSensor {
|
||||
const fn new(id: u8, center: Vec2, radius: f32, score: u32) -> Self {
|
||||
Self {
|
||||
@@ -309,6 +322,17 @@ pub const TARGET_SENSORS: [TargetSensor; 11] = [
|
||||
TargetSensor::new(152, Vec2::new(264.0, 46.0), 11.0, 500),
|
||||
];
|
||||
|
||||
pub const LOCK_HOLES: [MechanismSensor; 5] = [
|
||||
MechanismSensor::new(129, Vec2::new(96.0, 76.0), 19.0),
|
||||
MechanismSensor::new(130, Vec2::new(115.0, 49.0), 19.0),
|
||||
MechanismSensor::new(131, Vec2::new(147.0, 60.0), 19.0),
|
||||
MechanismSensor::new(132, Vec2::new(147.0, 92.0), 19.0),
|
||||
MechanismSensor::new(133, Vec2::new(115.0, 103.0), 19.0),
|
||||
];
|
||||
|
||||
pub const WHEEL_RESET_SENSOR: MechanismSensor =
|
||||
MechanismSensor::new(148, Vec2::new(17.0, 23.0), 19.0);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user