pub enum DecodedClass {
Soldier {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
Scout {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
Scoundrel {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
JediGuardian {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
JediConsular {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
JediSentinel {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
CombatDroid {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
ExpertDroid {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
Minion {
class_id: i32,
level: i16,
powers: Vec<u16>,
},
Unknown {
class_id: i32,
class_label: Option<String>,
level: i16,
powers: Vec<u16>,
},
}Expand description
One decoded class entry from a UTC’s ClassList, with the typed
variant chosen by matching the class_id row’s label cell in
classes.2da.
Vanilla K1 carries nine class kinds; each gets its own typed
variant. Mod-added or unrecognized rows surface as
DecodedClass::Unknown carrying the raw class_id and the
resolved label (when present) so callers can still display
something useful. Dispatch is by label, not by raw class_id,
so a mod that re-numbers a vanilla class still routes to its
typed variant.
Every variant carries class_id (the raw integer the GFF stored;
preserved so callers can recover the source-side row identity
even after dispatch), level (the entry’s class_level), and
powers (the per-entry Vec<u16> of force-power ids that
resolve into spells.2da; left raw at this stage and typed in a
later commit).
Variants§
Soldier
Vanilla classes.2da row label Soldier (vanilla row 0).
Fields
Scout
Vanilla classes.2da row label Scout (vanilla row 1).
Scoundrel
Vanilla classes.2da row label Scoundrel (vanilla row 2).
JediGuardian
Vanilla classes.2da row label JediGuardian (vanilla row 3).
JediConsular
Vanilla classes.2da row label JediConsular (vanilla row 4).
JediSentinel
Vanilla classes.2da row label JediSentinel (vanilla row 5).
CombatDroid
Vanilla classes.2da row label CombatDroid (vanilla row 6).
ExpertDroid
Vanilla classes.2da row label ExpertDroid (vanilla row 7).
Minion
Vanilla classes.2da row label Minion (vanilla row 8).
Unknown
Class identity could not be matched to any typed variant. Carries the raw fields plus the resolved label when reachable so consumers can still display something useful for mod-added or out-of-range classes.
Implementations§
Trait Implementations§
Source§impl Clone for DecodedClass
impl Clone for DecodedClass
Source§fn clone(&self) -> DecodedClass
fn clone(&self) -> DecodedClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more