refactors beatitude, and prepping readme for week 7
This commit is contained in:
parent
469d83994e
commit
831720ce37
14 changed files with 172 additions and 63 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use super::{append_entry, LogFragment};
|
||||
use crate::BUC;
|
||||
use rltk::prelude::*;
|
||||
|
||||
pub struct Logger {
|
||||
|
|
@ -39,10 +40,10 @@ impl Logger {
|
|||
return self;
|
||||
}
|
||||
|
||||
pub fn buc<T: ToString>(mut self, buc: i32, cursed: Option<T>, blessed: Option<T>) -> Self {
|
||||
if buc == crate::effects::CURSED && cursed.is_some() {
|
||||
pub fn buc<T: ToString>(mut self, buc: BUC, cursed: Option<T>, blessed: Option<T>) -> Self {
|
||||
if buc == BUC::Cursed && cursed.is_some() {
|
||||
self.fragments.push(LogFragment { colour: RGB::named(RED), text: cursed.unwrap().to_string() });
|
||||
} else if buc == crate::effects::BLESSED && blessed.is_some() {
|
||||
} else if buc == BUC::Blessed && blessed.is_some() {
|
||||
self.fragments.push(LogFragment { colour: RGB::named(GOLD), text: blessed.unwrap().to_string() });
|
||||
}
|
||||
return self;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue