diff options
author | Daniel <kingdread@gmx.de> | 2018-09-07 01:15:55 +0200 |
---|---|---|
committer | Daniel <kingdread@gmx.de> | 2018-09-07 01:15:55 +0200 |
commit | f0d95b03542ce87cd3c897a63a7bfbcc3be6dc2c (patch) | |
tree | a10f9425bf323bb773f8bb507f0c4842bb0671d6 /src/output.rs | |
parent | 13281d5f8aaaed5a9037784f5fa38068f9b7bf65 (diff) | |
download | raidgrep-f0d95b03542ce87cd3c897a63a7bfbcc3be6dc2c.tar.gz raidgrep-f0d95b03542ce87cd3c897a63a7bfbcc3be6dc2c.tar.bz2 raidgrep-f0d95b03542ce87cd3c897a63a7bfbcc3be6dc2c.zip |
add fight outcome to output
Diffstat (limited to 'src/output.rs')
-rw-r--r-- | src/output.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/output.rs b/src/output.rs index 848eab5..9458e48 100644 --- a/src/output.rs +++ b/src/output.rs @@ -1,4 +1,4 @@ -use super::LogResult; +use super::{LogResult, FightOutcome}; use super::errors::RuntimeError; use std::io::Write; @@ -7,13 +7,18 @@ use std::io::Write; pub fn colored<W: Write>(mut f: W, item: &LogResult) -> Result<(), RuntimeError> { use colored::Colorize; writeln!(f, "{}: {:?}", "File".green(), item.log_file)?; + let outcome = match item.outcome { + FightOutcome::Success => "SUCCESS".green(), + FightOutcome::Wipe => "WIPE".red(), + }; writeln!( f, - "{}: {} - {}: {}", + "{}: {} - {}: {} {}", "Date".green(), item.time, "Boss".green(), - item.boss_name + item.boss_name, + outcome, )?; for player in &item.players { writeln!( |