From a2b348fc594317a683ac089b083ef7ab0be5471b Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 14 Apr 2024 21:52:18 +0200 Subject: [PATCH] cleanup --- src/commands.rs | 2 +- src/hud.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index 760ff3b..79889cf 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -682,7 +682,7 @@ fn spawn_entities( actor.insert(PointLightBundle { point_light: PointLight { intensity: state.light_brightness, - color: color, + color, range: 100.0, radius: 100.0, ..default() diff --git a/src/hud.rs b/src/hud.rs index 313dfea..600ed25 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -119,15 +119,15 @@ impl Log { self.add(message, "".to_string(), LogLevel::Notice); } - pub fn add(&mut self, message: String, sender: String, level: LogLevel) { + pub fn add(&mut self, text: String, sender: String, level: LogLevel) { if self.logs.len() == LOG_MAX { self.logs.pop_front(); } if let Ok(epoch) = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH) { self.logs.push_back(Message { - text: message, - sender: sender, - level: level, + text, + sender, + level, time: epoch.as_secs(), }); self.needs_rerendering = true; @@ -377,7 +377,7 @@ fn setup( left: Val::Vw(50.0), ..default() }, - visibility: visibility, + visibility, background_color: Color::rgb(0.4, 0.4, 0.6).into(), ..default() },