diff --git a/src/game.rs b/src/game.rs index 1419a3d..16fc96d 100644 --- a/src/game.rs +++ b/src/game.rs @@ -755,7 +755,7 @@ fn handle_race( let mut deinitialize = false; if !settings.race_active { if race.initialized { - log.warning(format!("Stopped race! Final score: {}", race.score)); + log.showalways(format!("SkyRace: Stopped! Final score: {}", race.score)); deinitialize = true; } else { return; @@ -780,7 +780,7 @@ fn handle_race( let mut spawn_target = false; if !race.initialized { - log.warning("SkyRace START!".to_string()); + log.showalways("SkyRace: START!".to_string()); ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Honk)); race.score = 0.0; race.initialized = true; @@ -812,7 +812,7 @@ fn handle_race( } if race.timeout <= time.elapsed_seconds_f64() { - log.warning(format!("GAME OVER! Final score: {}", race.score)); + log.showalways(format!("SkyRace: GAME OVER! Final score: {}", race.score)); deinitialize = true; } } diff --git a/src/hud.rs b/src/hud.rs index ad15bd4..157da1b 100644 --- a/src/hud.rs +++ b/src/hud.rs @@ -293,6 +293,10 @@ impl Log { self.add(message, "Me".to_string(), LogLevel::Send); } + pub fn showalways(&mut self, message: String) { + self.add(message, String::default(), LogLevel::Always); + } + pub fn warning(&mut self, message: String) { self.add(message, "WARNING".to_string(), LogLevel::Warning); }