update file name
This commit is contained in:
parent
eed5a7460c
commit
f2f3ec5571
4
.github/workflows/nuitka.yml
vendored
4
.github/workflows/nuitka.yml
vendored
@ -71,7 +71,7 @@ jobs:
|
||||
run: |
|
||||
cd libs/Difficult_Rocket_rs/src
|
||||
python setup.py build
|
||||
python after_build.py
|
||||
python post_build.py
|
||||
python setup.py clean
|
||||
cd ..
|
||||
# Remove-Item ./src -Recurse
|
||||
@ -145,7 +145,7 @@ jobs:
|
||||
run: |
|
||||
Copy-Item .\libs\pyglet\ .\build\DR.dist -Recurse
|
||||
Rename-Item ./build/DR.dist Difficult-Rocket
|
||||
python ./.github/workflows/after_compile.py
|
||||
python ./.github/workflows/post_compile.py
|
||||
|
||||
# Uploads artifact
|
||||
- name: Upload Artifact
|
||||
|
@ -21,6 +21,6 @@ if ($do -or "311" -in $args) {
|
||||
python3.11 setup.py build
|
||||
}
|
||||
|
||||
python3.10 after_build.py
|
||||
python3.10 post_build.py
|
||||
|
||||
Set-Location ..\..\..\
|
||||
|
@ -7,18 +7,18 @@
|
||||
|
||||
## 版本号格式
|
||||
|
||||
### 基本遵守 Semver 版本号
|
||||
### 基本遵守 Semver 规范
|
||||
|
||||
* `x.y.z.w`
|
||||
* `0.y.z.w`
|
||||
|
||||
### 各部分说明
|
||||
### 各子版本号说明
|
||||
|
||||
#### 版本号发布之后不会退回,只会增加
|
||||
|
||||
| 部分 | 名称 | 步进条件 | 更新内容 | 更新兼容性 |
|
||||
|:---------:|:----------:|:-------------:|:---------------:|:-------:|
|
||||
| `X.y.z.w` | 主版本号 | 每次 `大更新` | 大量 `新内容` | `完全不兼容` |
|
||||
| `x.Y.z.w` | `功能` 版本号 | 发布 `内容更新` | 大量 `新内容` | `基本不兼容` |
|
||||
| `x.y.Z.w` | `内容修订` 版本号 | 修订 `新内容` | 对 `新内容` 的修订 | `基本兼容` |
|
||||
| `x.y.z.W` | `内部修订` 版本号 | 发布未实装的 `内部更新` | 对 `将要到来的内容` 的更新 | `完全兼容` |
|
||||
| 子版本号 | 名称 | 步进条件 | 更新内容 | 更新兼容性 |
|
||||
|:----:|:----------:|:-------------:|:---------------:|:-------:|
|
||||
| `X` | 主版本号 | 每次 `大更新` | 大量 `新内容` | `完全不兼容` |
|
||||
| `Y` | `功能` 版本号 | 发布 `内容更新` | 大量 `新内容` | `基本不兼容` |
|
||||
| `Z` | `内容修订` 版本号 | 修订 `新内容` | 对 `新内容` 的修订 | `基本兼容` |
|
||||
| `W` | `内部修订` 版本号 | 发布未实装的 `内部更新` | 对 `将要到来的内容` 的更新 | `完全兼容` |
|
49
libs/Difficult_Rocket_rs/src/Cargo.lock
generated
49
libs/Difficult_Rocket_rs/src/Cargo.lock
generated
@ -122,6 +122,8 @@ dependencies = [
|
||||
"quick-xml",
|
||||
"rapier2d-f64",
|
||||
"serde",
|
||||
"serde-xml-rs",
|
||||
"xml-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -164,6 +166,15 @@ dependencies = [
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matrixmultiply"
|
||||
version = "0.3.2"
|
||||
@ -497,6 +508,18 @@ dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde-xml-rs"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"xml-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.152"
|
||||
@ -565,6 +588,26 @@ version = "0.12.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5"
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.38"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.16.0"
|
||||
@ -664,3 +707,9 @@ name = "windows_x86_64_msvc"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
||||
|
||||
[[package]]
|
||||
name = "xml-rs"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
|
||||
|
@ -25,11 +25,11 @@ features = ["serialize"]
|
||||
version = "1.0.152"
|
||||
features = ["derive"]
|
||||
|
||||
#[dependencies.xml-rs]
|
||||
#version = "0.8.4"
|
||||
#
|
||||
#[dependencies.serde-xml-rs]
|
||||
#version = "0.6.0"
|
||||
[dependencies.xml-rs]
|
||||
version = "0.8.4"
|
||||
|
||||
[dependencies.serde-xml-rs]
|
||||
version = "0.6.0"
|
||||
|
||||
[dependencies.rapier2d-f64]
|
||||
version = "0.17.1"
|
||||
|
@ -1,3 +1,3 @@
|
||||
python3.8 setup.py build
|
||||
python3.9 setup.py build
|
||||
python3.9 after_build.py
|
||||
python3.9 post_build.py
|
||||
|
@ -13,8 +13,8 @@ pub mod part_list {
|
||||
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use quick_xml::de::from_str;
|
||||
// use serde_xml_rs::{from_str};
|
||||
// use quick_xml::de::from_str;
|
||||
use serde_xml_rs::{from_str};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct PartList {
|
||||
@ -75,9 +75,9 @@ pub mod part_list {
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct Shape {
|
||||
// #[serde(rename = "Vertex")]
|
||||
// pub vertex: Vec<Vertex>,
|
||||
#[serde(rename = "@sensor")]
|
||||
#[serde(rename = "Vertex")]
|
||||
pub vertex: Vec<Vertex>,
|
||||
#[serde(rename = "sensor")]
|
||||
pub sensor: Option<bool>
|
||||
}
|
||||
|
||||
@ -107,35 +107,36 @@ pub mod part_list {
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct PartAttr {
|
||||
// 单独类型节点
|
||||
// pub part_attr: Option<Vec<PartAttr>>,
|
||||
pub enum PartAttr {
|
||||
Damage,
|
||||
Tank,
|
||||
Engine,
|
||||
Rcs,
|
||||
Solar,
|
||||
Lander
|
||||
}
|
||||
|
||||
// #[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
// pub struct PartAttr {
|
||||
// // 单独类型节点
|
||||
// // pub part_attr: Option<Vec<PartAttr>>,
|
||||
// }
|
||||
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct PartType {
|
||||
// https://docs.rs/quick-xml/latest/quick_xml/de/index.html
|
||||
// 基本属性
|
||||
#[serde(rename = "@id")]
|
||||
pub id: String,
|
||||
#[serde(rename = "@name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "@description")]
|
||||
pub description: String,
|
||||
#[serde(rename = "@sprite")]
|
||||
pub sprite: String,
|
||||
#[serde(rename = "@type")]
|
||||
pub r#type: PartTypes,
|
||||
#[serde(rename = "@mass")]
|
||||
pub mass: f64,
|
||||
#[serde(rename = "@width")]
|
||||
pub width: u32,
|
||||
#[serde(rename = "@height")]
|
||||
pub height: u32,
|
||||
// 可选属性
|
||||
#[serde(rename = "@friction")]
|
||||
pub friction: Option<f64>,
|
||||
#[serde(rename = "@category")]
|
||||
pub category: Option<Category>,
|
||||
#[serde(rename = "@ignoreEditorIntersections")]
|
||||
pub ignore_editor_intersections: Option<bool>,
|
||||
@ -147,24 +148,23 @@ pub mod part_list {
|
||||
pub cover_height: Option<u32>,
|
||||
#[serde(rename = "@sandboxOnly")]
|
||||
pub sandbox_only: Option<bool>,
|
||||
#[serde(rename = "@drag")]
|
||||
pub drag: Option<f64>,
|
||||
#[serde(rename = "@hidden")]
|
||||
pub hidden: Option<bool>,
|
||||
#[serde(rename = "@buoyancy")]
|
||||
pub buoyancy: Option<f64>,
|
||||
// 通用属性子节点
|
||||
#[serde(rename = "Shape")]
|
||||
pub shape: Option<Vec<Shape>>,
|
||||
#[serde(rename = "AttachPoints")]
|
||||
attach_points: Option<AttachPoints>,
|
||||
// #[serde(rename = "$value")]
|
||||
// pub value: PartAttr,
|
||||
pub attach_points: Option<AttachPoints>,
|
||||
// 特殊属性子节点
|
||||
|
||||
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn read_part_list(file_name: String) -> Option<PartList> {
|
||||
let part_list_file = fs::read_to_string(file_name.to_string());
|
||||
|
||||
match part_list_file {
|
||||
Ok(part_list_file) => {
|
||||
let part_list: PartList = from_str(part_list_file.as_str()).unwrap();
|
||||
|
@ -14,7 +14,7 @@ cd libs
|
||||
cd Difficult_Rocket_rs
|
||||
cd src
|
||||
python3.9 setup.py build
|
||||
python3.9 after_build.py
|
||||
python3.9 post_build.py
|
||||
cd ../../..
|
||||
|
||||
$arg = @()
|
||||
|
@ -14,7 +14,7 @@ cd libs
|
||||
cd Difficult_Rocket_rs
|
||||
cd src
|
||||
python3.8 setup.py build
|
||||
python after_build.py
|
||||
python post_build.py
|
||||
cd ../../..
|
||||
|
||||
$arg = @()
|
||||
|
Loading…
Reference in New Issue
Block a user