refactor(simulation): split the input.rs and dialogue.rs dispatchers (T-1062)
input.rs 2,739 → 858 lines: per-domain action handlers moved to their owning modules (inventory, movement, stance, examine, follow, interaction, save_io, settings, bridge::debug, economy, vision_cone, bookmark, test_world reset + new teleport.rs); input.rs keeps the queue, the thin dispatch table, and pause/cooldown glue. All 9 type_complexity allows dissolved via one PlayerInputQuery alias. dialogue.rs → dialogue/ directory module: selection (631), response (1,473), confrontation (714), mod.rs (226, shared session components + re-exports — public paths preserved). Documented seam deviation: process_walk_away lives with confrontation (D-064/D-063 share the same world-response shape). Mechanical, zero behavior change: determinism + golden_suite byte-identical (independently re-verified); 1,504 lib tests unchanged — 23 input tests moved with their subjects, 53 dialogue tests redistributed, zero deleted. System scheduling registrations untouched (input_plugin.rs 0-line diff). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,25 @@ pub enum SettingsCommand {
|
||||
Delete { key: String },
|
||||
}
|
||||
|
||||
/// Queue a settings command from player input.
|
||||
/// `None` means the buffer was never registered (warn and drop).
|
||||
pub fn queue_settings_command(buf: Option<&mut SettingsCommandBuffer>, cmd: SettingsCommand) {
|
||||
let label = match cmd {
|
||||
SettingsCommand::Change { .. } => "ChangeSetting",
|
||||
SettingsCommand::RequestAll => "RequestAllSettings",
|
||||
SettingsCommand::Delete { .. } => "DeleteSetting",
|
||||
};
|
||||
match buf {
|
||||
Some(buf) => buf.push(cmd),
|
||||
None => {
|
||||
tracing::warn!(
|
||||
"{} received but SettingsCommandBuffer not registered",
|
||||
label
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Process settings commands from the IPC buffer.
|
||||
/// Reads SettingsCommandBuffer, writes to SettingsStoreResource,
|
||||
/// and stages a response in SnapshotBuffer.pending_settings_response.
|
||||
|
||||
Reference in New Issue
Block a user