Skip to content

Commit

Permalink
[#72] Add Shirt
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchaldir committed Sep 17, 2023
1 parent bfbbe89 commit 0a0a02a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions rpg_tools_core/src/model/equipment/appearance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
4 changes: 2 additions & 2 deletions rpg_tools_core/src/model/equipment/appearance/pants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 20 additions & 0 deletions rpg_tools_core/src/model/equipment/appearance/shirt.rs
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit 0a0a02a

Please sign in to comment.