-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
341 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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 sleeve_style: SleeveStyle, | ||
pub neckline: Neckline, | ||
pub color: Color, | ||
} | ||
|
||
/// What style of neckline? | ||
#[derive(Convert, ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] | ||
pub enum Neckline { | ||
Boat, | ||
Crew, | ||
DeepV, | ||
#[default] | ||
None, | ||
Scoop, | ||
V, | ||
} | ||
|
||
/// What style of sleeves? | ||
#[derive(Convert, ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] | ||
pub enum SleeveStyle { | ||
#[default] | ||
Long, | ||
None, | ||
Short, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
extern crate rpg_tools_core; | ||
extern crate rpg_tools_rendering; | ||
|
||
use crate::utils::render::render_2_sets; | ||
use rpg_tools_core::model::character::appearance::body::{Body, BodyShape}; | ||
use rpg_tools_core::model::character::appearance::Appearance; | ||
use rpg_tools_core::model::color::Color; | ||
use rpg_tools_core::model::equipment::appearance::shirt::{Neckline, Shirt, SleeveStyle}; | ||
use rpg_tools_core::model::equipment::appearance::Clothing; | ||
use rpg_tools_core::model::length::Length; | ||
|
||
pub mod utils; | ||
|
||
fn main() { | ||
let mut shirts = vec![]; | ||
|
||
for neckline in Neckline::get_all() { | ||
for sleeve_style in SleeveStyle::get_all() { | ||
shirts.push(Shirt { | ||
sleeve_style, | ||
neckline, | ||
color: Color::Aqua, | ||
}) | ||
} | ||
} | ||
|
||
render_2_sets( | ||
"shirts.svg", | ||
shirts, | ||
BodyShape::get_all(), | ||
create_appearance, | ||
false, | ||
); | ||
} | ||
|
||
fn create_appearance(height: Length, shirt: &Shirt, shape: &BodyShape) -> Appearance { | ||
Appearance::humanoid( | ||
Body { | ||
shape: *shape, | ||
width: Default::default(), | ||
skin: Default::default(), | ||
clothing: Clothing::Simple { | ||
pants: Default::default(), | ||
shirt: *shirt, | ||
}, | ||
}, | ||
Default::default(), | ||
height, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.