A lot more work on WASM script execution
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-09-07 18:01:26 +02:00
parent f9761f61da
commit b1890681a1
102 changed files with 748 additions and 202 deletions

6
src/dynamic_data/models/battle_party.rs Normal file → Executable file
View File

@@ -6,6 +6,7 @@ use crate::dynamic_data::models::pokemon_party::PokemonParty;
/// A battle party is a wrapper around a party, with the indices for which the party is responsible
/// on the field attached.
#[derive(Debug)]
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
pub struct BattleParty {
/// The party the BattleParty is holding.
party: Arc<PokemonParty>,
@@ -47,4 +48,9 @@ impl BattleParty {
pub fn get_pokemon(&self, index: usize) -> &Option<Arc<Pokemon>> {
self.party.at(index)
}
/// Gets the underlying Pokemon Party
pub fn party(&self) -> &Arc<PokemonParty> {
&self.party
}
}