logs + events refactor

This commit is contained in:
Llywelwyn 2023-07-10 13:09:01 +01:00
parent 4f899d329e
commit c10eda695a
7 changed files with 85 additions and 4 deletions

View file

@ -32,3 +32,12 @@ pub fn log_display() -> TextBuilder {
return buf;
}
pub fn clone_log() -> Vec<Vec<crate::gamelog::LogFragment>> {
return LOG.lock().unwrap().clone();
}
pub fn restore_log(log: &mut Vec<Vec<crate::gamelog::LogFragment>>) {
LOG.lock().unwrap().clear();
LOG.lock().unwrap().append(log);
}