From 61e6d2d5dbcbea73e215ed854c222459c917e7fd Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 2 Dec 2023 20:26:38 -0500 Subject: [PATCH] Improve race documentation --- src/race.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/race.rs b/src/race.rs index 6efe78a..41f2800 100755 --- a/src/race.rs +++ b/src/race.rs @@ -94,6 +94,7 @@ pub fn get_race_id(race: Race, subrace: Subrace, gender: Gender) -> Option Some(internal_race::convert_to_internal(race, subrace, gender).unwrap() as i32) } +/// Builds the path to the skeleton (sklb) file for a given `race`, `subrace` and `gender`. pub fn build_skeleton_path(race: Race, subrace: Subrace, gender: Gender) -> String { format!( "chara/human/c{0:04}/skeleton/base/b0001/skl_c{0:04}b0001.sklb", @@ -101,6 +102,7 @@ pub fn build_skeleton_path(race: Race, subrace: Subrace, gender: Gender) -> Stri ) } +/// Returns the two subraces associated with a given `race`. For example, `Hyur` would return `[Midlander, Highlander]`. pub fn get_supported_subraces(race: Race) -> [Subrace; 2] { match race { Race::Hyur => [Subrace::Midlander, Subrace::Highlander],