chore: remove dead code and stale doc claims found in multi-agent sweep
Test / test (pull_request) Successful in 37m58s
Test / test (pull_request) Successful in 37m58s
Compiler-verified via RUSTFLAGS=--force-warn dead_code plus workspace-wide reference greps; three parallel audit agents covered the engine crate, the other eight crates, and Copilot commit-message-vs-diff drift. Removed: - replay_overlay/input.rs: 19 orphaned twins (~950 lines) of items also defined in mod.rs — the glob re-export made the mod.rs copies win and the file-level #![allow(dead_code)] hid the corpses. The live keyboard/ button handlers and ReplayScrubKeyHold stay; the allow is retired. - retarget_animation (never called; doc examples were its only refs) - ScanThemesRequestEvent (never registered/written/read; its doc claimed a handle_scan_themes consumer that does not exist) - _VEC3_REFERENCED workaround const + now-unneeded Vec3 import - solitaire_data: load_stats/save_stats/time_attack_session_with_now default-path wrappers (the _from/_to variants are the live API) and surplus re-export names (settings MIN/MAX bounds, token loaders) - solitaire_core: Session re-export (no external consumer) - solitaire_wasm: ReplayPlayer::is_finished (no JS caller) - solitaire_app: build_app wrapper (real entry is run()) Doc fixes: - audio_plugin: WAV count 5→7, add FoundationCompletedEvent table row, drop bogus 'placeholder' label, bevy_kira_audio→kira - ToastVariant::Warning: variant is live (5 writer plugins); dropped the stale allow(dead_code) and its 'currently unused' comment Deliberately kept: Spider module (staged forward work), WinCascadePlugin (documented alternative cascade, pending owner decision), SyncCompleteEvent and solitaire_sync ApiError/merge_at (§8 change-controlled, flagged to owner). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//! Sound-effect playback via `kira`.
|
||||
//!
|
||||
//! Loads five embedded WAVs (`include_bytes!`) at startup and plays them in
|
||||
//! response to gameplay events:
|
||||
//! Loads seven embedded WAVs (`include_bytes!`) at startup — six SFX plus
|
||||
//! the ambient loop — and plays them in response to gameplay events:
|
||||
//!
|
||||
//! | Event | Sound |
|
||||
//! |---|---|
|
||||
@@ -10,6 +10,7 @@
|
||||
//! | `MoveRejectedEvent` | `card_invalid.wav` |
|
||||
//! | `NewGameRequestEvent` | `card_deal.wav` |
|
||||
//! | `GameWonEvent` | `win_fanfare.wav` |
|
||||
//! | `FoundationCompletedEvent` | `foundation_complete.wav` |
|
||||
//!
|
||||
//! An ambient loop (`ambient_loop.wav`) is started at plugin startup at very
|
||||
//! low volume (0.05 amplitude) routed through `music_track`.
|
||||
@@ -38,7 +39,7 @@ use crate::settings_plugin::{SettingsChangedEvent, SettingsResource};
|
||||
/// Volume amplitude for the stock-recycle draw sound (half of normal 1.0).
|
||||
const RECYCLE_VOLUME: f64 = 0.5;
|
||||
|
||||
/// Volume amplitude for the ambient music loop placeholder.
|
||||
/// Volume amplitude for the ambient music loop.
|
||||
const AMBIENT_VOLUME: f64 = 0.05;
|
||||
|
||||
/// Converts a linear amplitude (0.0–1.0+) to the `Decibels` type used by
|
||||
@@ -101,7 +102,7 @@ pub struct MuteState {
|
||||
pub music_muted: bool,
|
||||
}
|
||||
|
||||
/// Plays sound effects and background music via `bevy_kira_audio`. Responds to game events (card place, flip, invalid move, win fanfare) and respects volume settings from `SettingsResource`.
|
||||
/// Plays sound effects and background music via `kira`. Responds to game events (card place, flip, invalid move, win fanfare) and respects volume settings from `SettingsResource`.
|
||||
pub struct AudioPlugin;
|
||||
|
||||
impl Plugin for AudioPlugin {
|
||||
|
||||
Reference in New Issue
Block a user