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

@@ -65,6 +65,7 @@ pub struct ExecutingMove<'a, 'b> {
use_move: &'a MoveData,
script: ScriptContainer,
targets: Vec<Option<&'a Pokemon<'b>>>,
script_source_data: RwLock<ScriptSourceData>,
}
impl<'a, 'b> ExecutingMove<'a, 'b> {
@@ -89,6 +90,7 @@ impl<'a, 'b> ExecutingMove<'a, 'b> {
use_move,
script,
targets,
script_source_data: Default::default(),
}
}
pub fn target_count(&self) -> usize {
@@ -150,7 +152,7 @@ impl<'a, 'b> ScriptSource<'a> for ExecutingMove<'a, 'b> {
}
fn get_script_source_data(&self) -> &RwLock<ScriptSourceData> {
todo!()
&self.script_source_data
}
fn get_own_scripts(&self, scripts: &mut Vec<ScriptWrapper>) {