diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/dr.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/dr.rs index b0778f8..0567291 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/dr.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/dr.rs @@ -181,9 +181,3 @@ pub struct DRComponentProps<'a, T> { // 附加属性 pub attr: HashMap<&'a str, T>, } - -impl<'a, T> DRComponentProps<'a, T> { - pub fn fetch_data(&self, name: &str) -> Option<&T> { - self.attr.get(name) - } -} diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/sr1.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/sr1.rs index dc9a7aa..e6b0f87 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/sr1.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/data_type/sr1.rs @@ -555,8 +555,7 @@ impl SR1PartDataAttr { current_stage: Option, steps: Option>>, extension: Option, - chute_x: Option, - chute_y: Option, + chute_pos: (Option, Option), chute_height: Option, chute_angle: Option, inflate: Option, @@ -572,8 +571,8 @@ impl SR1PartDataAttr { current_stage, steps, extension, - chute_x, - chute_y, + chute_x: chute_pos.0, + chute_y: chute_pos.1, chute_height, chute_angle, inflate, diff --git a/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs b/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs index 5706179..7b1aae1 100644 --- a/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs +++ b/mods/dr_game/Difficult_Rocket_rs/src/src/lib.rs @@ -15,14 +15,6 @@ mod xml_reader; use pyo3::prelude::*; -enum LoadingState { - Initializing, - WaitingForStart, - PreStarting, - Running, - Cleaning, -} - #[pyfunction] fn get_version_str() -> String { "0.3.0".to_string() @@ -34,9 +26,6 @@ fn test_call(py_obj: &PyAny) -> PyResult { Ok(true) } -/// A Python module implemented in Rust. The name of this function must match -/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to -/// import the module. #[pymodule] #[pyo3(name = "Difficult_Rocket_rs")] fn module_init(_py: Python<'_>, m: &PyModule) -> PyResult<()> { @@ -54,7 +43,3 @@ fn module_init(_py: Python<'_>, m: &PyModule) -> PyResult<()> { // m.add_class::()?; Ok(()) } - -// pub fn run() {} - -// fn init() {} diff --git a/mods/dr_game/__init__.py b/mods/dr_game/__init__.py index ba4eb02..36c8556 100644 --- a/mods/dr_game/__init__.py +++ b/mods/dr_game/__init__.py @@ -4,7 +4,6 @@ # All rights reserved # ------------------------------- -import warnings import traceback from typing import Optional