From 0a0a02a63360a861abd4933595183380e52144fa Mon Sep 17 00:00:00 2001 From: Orchaldir Date: Sun, 17 Sep 2023 12:12:12 +0200 Subject: [PATCH] [#72] Add Shirt --- .../src/model/equipment/appearance/mod.rs | 1 + .../src/model/equipment/appearance/pants.rs | 4 ++-- .../src/model/equipment/appearance/shirt.rs | 20 +++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 rpg_tools_core/src/model/equipment/appearance/shirt.rs diff --git a/rpg_tools_core/src/model/equipment/appearance/mod.rs b/rpg_tools_core/src/model/equipment/appearance/mod.rs index 03c3a92f..123f18c3 100644 --- a/rpg_tools_core/src/model/equipment/appearance/mod.rs +++ b/rpg_tools_core/src/model/equipment/appearance/mod.rs @@ -3,6 +3,7 @@ use macro_ui::ui; use serde::{Deserialize, Serialize}; pub mod pants; +pub mod shirt; #[derive(ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "type")] diff --git a/rpg_tools_core/src/model/equipment/appearance/pants.rs b/rpg_tools_core/src/model/equipment/appearance/pants.rs index 599776b3..6c1d3ed2 100644 --- a/rpg_tools_core/src/model/equipment/appearance/pants.rs +++ b/rpg_tools_core/src/model/equipment/appearance/pants.rs @@ -3,14 +3,14 @@ use macro_convert::Convert; use macro_ui::ui; use serde::{Deserialize, Serialize}; -/// Clothing for the lower body. +/// The pants of the [`character`](crate::model::character::Character). #[derive(ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct Pants { pub style: PantsStyle, pub color: Color, } -/// What style of pants? +/// What style of [`pants`](Pants)? #[derive(Convert, ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum PantsStyle { Balloon, diff --git a/rpg_tools_core/src/model/equipment/appearance/shirt.rs b/rpg_tools_core/src/model/equipment/appearance/shirt.rs new file mode 100644 index 00000000..80943b20 --- /dev/null +++ b/rpg_tools_core/src/model/equipment/appearance/shirt.rs @@ -0,0 +1,20 @@ +use crate::model::color::Color; +use macro_convert::Convert; +use macro_ui::ui; +use serde::{Deserialize, Serialize}; + +/// The shirt of the [`character`](crate::model::character::Character). +#[derive(ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +pub struct Shirt { + pub sleeves: Sleeves, + pub color: Color, +} + +/// What style of sleeves? +#[derive(Convert, ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum Sleeves { + #[default] + Long, + None, + Short, +}