We need to be able to remove and change scripts while they're currently being active.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-06-18 18:08:25 +02:00
parent c99b1bf8d9
commit a1051d059e
5 changed files with 380 additions and 174 deletions

View File

@@ -399,9 +399,11 @@ impl<'own, 'library> Pokemon<'own, 'library> {
// Ensure the ability script gets initialized with the parameters for the ability.
self.ability_script()
.get()
.as_mut()
.unwrap()
.as_mut()
.read()
.as_ref()
.unwrap()
.as_ref()
.on_initialize(self.active_ability().parameters())
} else {
self.ability_script.clear();