From f8407980dbe40f49526cfc7dbe12d85ff16d141e Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 22 Apr 2026 08:58:42 +0200 Subject: [PATCH] refactor(simulation): derive Default for MonologueState (clippy) After #878 removed the `character` field, the manual Default impl is derivable. Clippy flags this under `derivable_impls` with -D warnings. Co-Authored-By: Claude Opus 4.6 --- server/src/simulation/monologue.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/server/src/simulation/monologue.rs b/server/src/simulation/monologue.rs index b3417fcc9..d066cc64a 100644 --- a/server/src/simulation/monologue.rs +++ b/server/src/simulation/monologue.rs @@ -119,7 +119,7 @@ impl PostConversationQueue { /// Tracks monologue state for cooldown and trigger detection. /// Attached to the PlayerCharacter entity. -#[derive(Component, Debug)] +#[derive(Component, Debug, Default)] pub struct MonologueState { /// Tick when the last monologue was fired. pub last_fired_tick: u64, @@ -137,19 +137,6 @@ pub struct MonologueState { pub last_observation_tick: u64, } -impl Default for MonologueState { - fn default() -> Self { - Self { - last_fired_tick: 0, - last_position: None, - idle_ticks: 0, - entered: false, - shown_ids: BTreeSet::new(), - last_observation_tick: 0, - } - } -} - /// Buffer holding the monologue event to include in the next snapshot. /// `take()` drains the buffer (consumed once per snapshot). #[derive(Component, Debug, Default)]