43 lines
1.2 KiB
Rust
43 lines
1.2 KiB
Rust
use crate::dynamic_data::libraries::battle_stat_calculator::BattleStatCalculator;
|
|
use crate::dynamic_data::libraries::script_resolver::ScriptCategory;
|
|
use crate::dynamic_data::script_handling::script::Script;
|
|
use crate::static_data::libraries::static_data::StaticData;
|
|
use crate::PkmnResult;
|
|
|
|
#[derive(Debug)]
|
|
pub struct DynamicLibrary<'a> {
|
|
static_data: StaticData<'a>,
|
|
stat_calculator: BattleStatCalculator,
|
|
}
|
|
|
|
impl<'a> DynamicLibrary<'a> {
|
|
pub fn static_data(&self) -> &StaticData<'a> {
|
|
&self.static_data
|
|
}
|
|
pub fn stat_calculator(&self) -> &BattleStatCalculator {
|
|
&self.stat_calculator
|
|
}
|
|
|
|
pub fn load_script(
|
|
&self,
|
|
_category: ScriptCategory,
|
|
_key: &str,
|
|
) -> PkmnResult<Box<dyn Script>> {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
#[cfg(test)]
|
|
pub mod test {
|
|
use crate::dynamic_data::libraries::battle_stat_calculator::BattleStatCalculator;
|
|
use crate::dynamic_data::libraries::dynamic_library::DynamicLibrary;
|
|
use crate::static_data::libraries::static_data;
|
|
|
|
pub fn build<'a>() -> DynamicLibrary<'a> {
|
|
DynamicLibrary {
|
|
static_data: static_data::test::build(),
|
|
stat_calculator: BattleStatCalculator {},
|
|
}
|
|
}
|
|
}
|