From 165520d522e445f2a347a1a28fa3b8052e4d2253 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 25 Feb 2023 10:32:15 +0800 Subject: [PATCH] DR_rs update bump version later --- Difficult_Rocket/__init__.py | 2 +- libs/Difficult_Rocket_rs/src/Cargo.toml | 7 ++----- libs/Difficult_Rocket_rs/src/src/sr1_data.rs | 16 +++++++++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Difficult_Rocket/__init__.py b/Difficult_Rocket/__init__.py index 78fddd5..29b3a7e 100644 --- a/Difficult_Rocket/__init__.py +++ b/Difficult_Rocket/__init__.py @@ -68,7 +68,7 @@ class _DR_option(Options): # tests playing: bool = False debugging: bool = False - crash_report_test: bool = True + crash_report_test: bool = False pyglet_macosx_dev_test: bool = True # window option diff --git a/libs/Difficult_Rocket_rs/src/Cargo.toml b/libs/Difficult_Rocket_rs/src/Cargo.toml index 92d1418..7f1cbcd 100644 --- a/libs/Difficult_Rocket_rs/src/Cargo.toml +++ b/libs/Difficult_Rocket_rs/src/Cargo.toml @@ -14,8 +14,8 @@ crate-type = ["cdylib"] [profile.dev.package.rapier2d-f64] opt-level = 3 -#[profile.release] -#codegen-units = 1 +[profile.release] +codegen-units = 1 #[dependencies.quick-xml] #version = "0.27.1" @@ -31,9 +31,6 @@ version = "0.8.4" [dependencies.serde-xml-rs] version = "0.6.0" -#[dependencies.serde-query] -#version = "0.1.4" - [dependencies.rapier2d-f64] version = "0.17.1" features = ["simd-stable"] diff --git a/libs/Difficult_Rocket_rs/src/src/sr1_data.rs b/libs/Difficult_Rocket_rs/src/src/sr1_data.rs index 0639a9b..ad505c2 100644 --- a/libs/Difficult_Rocket_rs/src/src/sr1_data.rs +++ b/libs/Difficult_Rocket_rs/src/src/sr1_data.rs @@ -40,15 +40,25 @@ pub mod part_list { #[derive(Debug, Serialize, Deserialize, Copy, Clone)] pub enum Category { - Satellite + Satellite, + None } #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Vertex { + // pub vec: + // #[serde(rename = "$value")] + // pub vecs: Option> pub x: f64, pub y: f64 } + #[derive(Debug, Serialize, Deserialize, Clone)] + pub struct Shape { + #[serde(rename = "Vertex")] + pub vertex: Vec + } + #[derive(Debug, Serialize, Deserialize, Clone)] pub struct PartType { pub id: String, @@ -74,8 +84,8 @@ pub mod part_list { pub drag: Option, pub hidden: Option, pub buoyancy: Option, - #[serde(rename = "@Shape")] - pub shapes: Option> + #[serde(rename = "Shape")] + pub shapes: Option> } #[inline]