-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
69 deletions.
There are no files selected for viewing
33 changes: 4 additions & 29 deletions
33
python_genshin_artifact_core/src/applications/input/calculator.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,15 @@ | ||
use mona::artifacts::Artifact; | ||
use mona::artifacts::effect_config::ArtifactConfigInterface; | ||
use mona_wasm::applications::common::{BuffInterface, CharacterInterface, EnemyInterface, SkillInterface, WeaponInterface}; | ||
use pyo3::prelude::*; | ||
use crate::applications::input::common::PyCharacterInterface; | ||
|
||
#[derive(Debug, Clone)] | ||
#[pyclass] | ||
pub struct CalculatorConfig { | ||
pub character: CharacterInterface, | ||
// pub weapon: WeaponInterface, | ||
// pub buffs: Vec<BuffInterface>, | ||
// pub artifacts: Vec<Artifact>, | ||
// pub artifact_config: Option<ArtifactConfigInterface>, | ||
// pub skill: SkillInterface, | ||
// pub enemy: Option<EnemyInterface>, | ||
pub character: PyCharacterInterface, | ||
} | ||
|
||
#[pymethods] | ||
impl CalculatorConfig { | ||
#[new] | ||
// #[args(buffs="Vec::new()", artifacts="Vec::new()", artifact_config="None", enemy="None")] | ||
fn new(character: CharacterInterface, | ||
// weapon: WeaponInterface, | ||
// buffs: Vec<BuffInterface>, | ||
// artifacts: Vec<Artifact>, | ||
// artifact_config: Option<ArtifactConfigInterface>, | ||
// skill: SkillInterface, | ||
// enemy: Option<EnemyInterface>, | ||
) -> Self { | ||
CalculatorConfig { | ||
character, | ||
// weapon, | ||
// buffs, | ||
// artifacts, | ||
// artifact_config, | ||
// skill, | ||
// enemy, | ||
} | ||
pub fn py_new( character: PyCharacterInterface) -> PyResult<Self> { | ||
Ok(Self {character}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
pub mod calculator; | ||
pub mod common; | ||
pub mod character; | ||
pub mod common; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub mod generate; | ||
pub mod wasm; | ||
pub mod input; | ||
pub mod input; |