refactor(simulation): apply rustfmt formatting

Formatting-only changes across server source and test files.
No logic changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 01:39:44 +01:00
co-authored by Claude Opus 4.6
parent 1da81a21ea
commit d5a1f6dadb
16 changed files with 169 additions and 105 deletions
+16 -17
View File
@@ -102,12 +102,7 @@ pub fn process_player_input(
for input in inputs {
// Discard all gameplay actions while paused (D-052, R2-OQ-01).
// Only Pause/Unpause are processed — everything else is discarded.
if paused
&& !matches!(
input.action,
PlayerAction::Pause | PlayerAction::Unpause
)
{
if paused && !matches!(input.action, PlayerAction::Pause | PlayerAction::Unpause) {
continue;
}
match input.action {
@@ -190,14 +185,20 @@ pub fn process_player_input(
handle_place(&mut commands, &registry, &player_query, target_entity_id);
}
Some("Talk") => {
handle_talk(&mut commands, &registry, &player_query, &all_positions, target_entity_id);
handle_talk(
&mut commands,
&registry,
&player_query,
&all_positions,
target_entity_id,
);
}
_ => {
tracing::info!(
"Interact: target={:?}, verb={:?} — logged only",
target_entity_id,
verb,
);
"Interact: target={:?}, verb={:?} — logged only",
target_entity_id,
verb,
);
}
},
PlayerAction::WalkAway => {
@@ -363,7 +364,9 @@ fn handle_talk(
// Server-side range check: reject Talk if target is beyond close range
if let Ok(target_pos) = all_positions.get(target_entity) {
let distance = player_pos.manhattan_distance(target_pos).unwrap_or(u32::MAX);
let distance = player_pos
.manhattan_distance(target_pos)
.unwrap_or(u32::MAX);
if distance > crate::simulation::interaction::CLOSE_RANGE {
tracing::info!(
target_id,
@@ -1312,11 +1315,7 @@ mod tests {
);
let mut query = world.query::<&Stance>();
let stance = query.single(&world).unwrap();
assert_eq!(
stance.0,
MovementStance::Walk,
"Stance unchanged in batch"
);
assert_eq!(stance.0, MovementStance::Walk, "Stance unchanged in batch");
assert_eq!(
world.resource::<SimulationTime>().tick_rate,
TickRate::Paused,