1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-06-06 14:47:46 +00:00

Improve race documentation a bit

This commit is contained in:
Joshua Goins 2025-03-31 15:46:19 -04:00
parent 49698c7f21
commit 06e1bb0ead
2 changed files with 6 additions and 6 deletions

View file

@ -28,7 +28,7 @@ mod compression;
/// Reading model (MDL) files. /// Reading model (MDL) files.
pub mod model; pub mod model;
/// All of the races in Eorzea in a nice enum package. /// Playable race and genders.
pub mod race; pub mod race;
/// Reading Excel lists (EXL). /// Reading Excel lists (EXL).

View file

@ -3,22 +3,22 @@
use binrw::binrw; use binrw::binrw;
/// The playable genders in the game.
#[binrw] #[binrw]
#[brw(repr = u8)] #[brw(repr = u8)]
#[derive(PartialEq, Eq, Clone, Debug)] #[derive(PartialEq, Eq, Clone, Debug)]
#[repr(u8)] #[repr(u8)]
/// Gender of the character.
pub enum Gender { pub enum Gender {
Male = 0, Male = 0,
Female = 1, Female = 1,
} }
/// The playable tribes in the game.
/// Each race has two similar-looking tribes, with the exception of Highlander Hyur which are visually distinct.
#[binrw] #[binrw]
#[brw(repr = u8)] #[brw(repr = u8)]
#[derive(PartialEq, Eq, Clone, Copy, Debug)] #[derive(PartialEq, Eq, Clone, Copy, Debug)]
#[repr(u8)] #[repr(u8)]
/// The race's "tribe". Each race has two tribes, which are usually very similar (even down to the ids!)
/// with the exception of Hyurs, which have two very distinct tribes.
pub enum Tribe { pub enum Tribe {
Midlander = 1, Midlander = 1,
Highlander = 2, Highlander = 2,
@ -38,11 +38,11 @@ pub enum Tribe {
Veena = 16, Veena = 16,
} }
/// The playable races in the game.
#[binrw] #[binrw]
#[brw(repr = u8)] #[brw(repr = u8)]
#[derive(PartialEq, Eq, Clone, Copy, Debug)] #[derive(PartialEq, Eq, Clone, Copy, Debug)]
#[repr(u8)] #[repr(u8)]
/// The major races of Eorzea.
pub enum Race { pub enum Race {
Hyur = 1, Hyur = 1,
Elezen = 2, Elezen = 2,
@ -96,7 +96,7 @@ pub fn get_race_id(race: Race, tribe: Tribe, gender: Gender) -> Option<i32> {
Race::Hrothgar => { Race::Hrothgar => {
match gender { match gender {
Gender::Male => Some(1501), Gender::Male => Some(1501),
Gender::Female => Some(1601), // TODO: is this accurate as of dawntrail? Gender::Female => Some(1601),
} }
} }
Race::Viera => match gender { Race::Viera => match gender {