aboutsummaryrefslogtreecommitdiff
path: root/core/src/data/player/structs.rs
diff options
context:
space:
mode:
author1992414357@qq.com <1992414357@qq.com>2025-06-11 19:14:04 +0800
committer1992414357@qq.com <1992414357@qq.com>2025-06-11 19:14:04 +0800
commit9e48af01ae56fe813869ada24de291ab98b361e2 (patch)
tree82b56adecbeb260ebbf2c512d78fe2d63805eb36 /core/src/data/player/structs.rs
parentaa326e69b18a4390ffbc97268eaec4793761f083 (diff)
组合模块中 structs.rs 和 implements.rs 文件
Diffstat (limited to 'core/src/data/player/structs.rs')
-rw-r--r--core/src/data/player/structs.rs45
1 files changed, 0 insertions, 45 deletions
diff --git a/core/src/data/player/structs.rs b/core/src/data/player/structs.rs
deleted file mode 100644
index cc3d7c9..0000000
--- a/core/src/data/player/structs.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use bincode::{Decode, Encode};
-use serde::{Deserialize, Serialize};
-use std::hash::{Hash};
-
-/// Player information
-/// Describes a player's specific details, which are frequently exchanged between the controller and game pad_client.
-#[derive(Default, Clone, Encode, Decode, Serialize, Deserialize, Debug)]
-pub struct Player {
-
- /// Account information
- pub account: Account,
-
- /// Custom information (Optional)
- pub customize: Option<Customize>
-}
-
-/// Account information
-/// Essential data for verifying player uniqueness, including the player's hash value and account ID.
-#[derive(Default, Clone, Encode, Decode, Serialize, Deserialize, Eq, Hash, PartialEq, Debug)]
-pub struct Account {
-
- /// Player name stored in data, allowing only lowercase letters and underscores
- pub id: String,
-
- /// Player hash value proving player uniqueness
- pub player_hash: String
-}
-
-/// Custom information
-/// Describes personalized player details displayed in-game, such as name, color, or other customizations.
-#[derive(Default, Clone, Encode, Decode, Serialize, Deserialize, PartialEq, Debug)]
-pub struct Customize {
-
- /// Player name displayed in the game
- pub nickname: String,
-
- /// HSV Color - Hue (Range: 0 - 360)
- pub color_hue: i32,
-
- /// HSV Color - Saturation (Range: 0 - 1)
- pub color_saturation: f64,
-
- /// HSV Color - Value (Range: 0 - 1)
- pub color_value: f64
-} \ No newline at end of file