Implements the script source methods on all current structs that implement it.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-12 18:41:49 +02:00
parent f0bc62ce19
commit 00f66bbf59
5 changed files with 27 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ macro_rules! script_hook {
};
}
#[derive(Default)]
#[derive(Default, Debug)]
pub struct ScriptSourceData {
is_initialized: bool,
scripts: Vec<ScriptWrapper>,
@@ -46,6 +46,7 @@ pub trait ScriptSource<'a> {
fn collect_scripts(&self, scripts: &mut Vec<ScriptWrapper>);
}
#[derive(Debug)]
pub enum ScriptWrapper {
Script(Weak<RwLock<Option<Box<dyn Script>>>>),
Set(Weak<RwLock<ScriptSet>>),