feat: add short codes
This commit is contained in:
parent
a4e994f394
commit
707fab48bd
|
@ -85,6 +85,31 @@ impl Job {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the short code of this job.
|
||||||
|
///
|
||||||
|
/// Short codes are fully capitalized (e.g. "BRD", "BLM").
|
||||||
|
pub fn as_code(&self) -> &'static str {
|
||||||
|
match *self {
|
||||||
|
Job::Bard => "BRD",
|
||||||
|
Job::BlackMage => "BLM",
|
||||||
|
Job::Dragoon => "DRG",
|
||||||
|
Job::Machinist => "MCH",
|
||||||
|
Job::Monk => "MNK",
|
||||||
|
Job::Ninja => "NIN",
|
||||||
|
Job::RedMage => "RDM",
|
||||||
|
Job::Samurai => "SAM",
|
||||||
|
Job::Summoner => "SMN",
|
||||||
|
|
||||||
|
Job::Astrologian => "AST",
|
||||||
|
Job::Scholar => "SCH",
|
||||||
|
Job::WhiteMage => "WHM",
|
||||||
|
|
||||||
|
Job::DarkKnight => "DRK",
|
||||||
|
Job::Paladin => "PLD",
|
||||||
|
Job::Warrior => "WAR",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns the [`Role`] for this job.
|
/// Returns the [`Role`] for this job.
|
||||||
#[cfg(feature = "roles")]
|
#[cfg(feature = "roles")]
|
||||||
pub fn role(&self) -> Role {
|
pub fn role(&self) -> Role {
|
||||||
|
|
|
@ -61,6 +61,23 @@ impl NonCombatJob {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn as_code(&self) -> &'static str {
|
||||||
|
match *self {
|
||||||
|
NonCombatJob::Botanist => "BTN",
|
||||||
|
NonCombatJob::Fisher => "FSH",
|
||||||
|
NonCombatJob::Miner => "MIN",
|
||||||
|
|
||||||
|
NonCombatJob::Alchemist => "ALC",
|
||||||
|
NonCombatJob::Armorer => "ARM",
|
||||||
|
NonCombatJob::Blacksmith => "BSM",
|
||||||
|
NonCombatJob::Carpenter => "CRP",
|
||||||
|
NonCombatJob::Culinarian => "CUL",
|
||||||
|
NonCombatJob::Goldsmith => "GSM",
|
||||||
|
NonCombatJob::Leatherworker => "LTW",
|
||||||
|
NonCombatJob::Weaver => "WVR",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(feature = "job_classifications")]
|
#[cfg(feature = "job_classifications")]
|
||||||
pub fn classification(&self) -> Classification {
|
pub fn classification(&self) -> Classification {
|
||||||
match *self {
|
match *self {
|
||||||
|
|
Loading…
Reference in New Issue