Skip to content

Commit

Permalink
[#42] Render boot shafts
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchaldir committed Sep 23, 2023
1 parent f0d6cc7 commit f559d90
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions rpg_tools_core/src/model/equipment/appearance/footwear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ pub enum FootwearStyle {
Shoes,
Slippers,
}

impl FootwearStyle {
pub fn is_over_pants(&self) -> bool {
*self == Self::KneeHighBoots
}
}
10 changes: 8 additions & 2 deletions rpg_tools_rendering/src/rendering/equipment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ pub fn render_clothing(
} = &body.clothing
{
render_shirt(renderer, config, aabb, body, shirt, from_front);
render_pants(renderer, config, aabb, body, pants);
render_footwear(renderer, config, aabb, body, footwear, from_front);

if footwear.style.is_over_pants() {
render_pants(renderer, config, aabb, body, pants);
render_footwear(renderer, config, aabb, body, footwear, from_front);
} else {
render_footwear(renderer, config, aabb, body, footwear, from_front);
render_pants(renderer, config, aabb, body, pants);
}
}
}

0 comments on commit f559d90

Please sign in to comment.