initial
This commit is contained in:
parent
85881db62f
commit
4f899d329e
9 changed files with 121 additions and 67 deletions
|
|
@ -22,6 +22,21 @@ impl Logger {
|
|||
}
|
||||
|
||||
pub fn log(self) {
|
||||
append_entry(self.fragments)
|
||||
return append_entry(self.fragments);
|
||||
}
|
||||
|
||||
pub fn npc_name<T: ToString>(mut self, text: T) -> Self {
|
||||
self.fragments.push(LogFragment { colour: RGB::named(rltk::YELLOW), text: text.to_string() });
|
||||
return self;
|
||||
}
|
||||
|
||||
pub fn item_name<T: ToString>(mut self, text: T) -> Self {
|
||||
self.fragments.push(LogFragment { colour: RGB::named(rltk::CYAN), text: text.to_string() });
|
||||
return self;
|
||||
}
|
||||
|
||||
pub fn damage(mut self, damage: i32) -> Self {
|
||||
self.fragments.push(LogFragment { colour: RGB::named(rltk::RED), text: format!("{}", damage).to_string() });
|
||||
return self;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue