Loads more work on battling, initial stretch to run a turn done.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -16,16 +16,11 @@ impl ScriptSet {
|
||||
return lock.clone();
|
||||
}
|
||||
}
|
||||
self.scripts
|
||||
.insert(script.name().clone(), ScriptContainer::new(script));
|
||||
self.scripts.insert(script.name().clone(), ScriptContainer::new(script));
|
||||
self.scripts.last().unwrap().1.clone()
|
||||
}
|
||||
|
||||
pub fn stack_or_add<'b, F>(
|
||||
&mut self,
|
||||
key: &StringKey,
|
||||
instantiation: &'b F,
|
||||
) -> PkmnResult<Option<ScriptContainer>>
|
||||
pub fn stack_or_add<'b, F>(&mut self, key: &StringKey, instantiation: &'b F) -> PkmnResult<Option<ScriptContainer>>
|
||||
where
|
||||
F: Fn() -> PkmnResult<Option<Box<dyn Script>>>,
|
||||
{
|
||||
@@ -76,4 +71,8 @@ impl ScriptSet {
|
||||
pub fn count(&self) -> usize {
|
||||
self.scripts.len()
|
||||
}
|
||||
|
||||
pub(crate) fn get_underlying(&self) -> &IndexMap<StringKey, ScriptContainer> {
|
||||
&self.scripts
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user