pub struct FacReputation {
pub source: u32,
pub target: u32,
pub standing: i32,
}Expand description
One stored standing from the RepList.
Fields§
§source: u32Source faction id (FactionID1).
target: u32Target faction id (FactionID2).
standing: i32How source regards target (FactionRep), as stored.
Kept as written rather than clamped, so a file carrying an
out-of-range value still shows it. The engine clamps to 0-100 when
it loads; Self::effective_standing applies that.
Both halves are hand-written: the file holds a DWORD and the engine
reads it signed, so neither direction is one call.
Implementations§
Source§impl FacReputation
impl FacReputation
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.
Source§impl FacReputation
impl FacReputation
Sourcepub fn effective_standing(&self) -> u8
pub fn effective_standing(&self) -> u8
Returns the standing the engine would hold after its load-time clamp.
Values at or above 101 become 100, negatives become 0.
Trait Implementations§
Source§impl Clone for FacReputation
impl Clone for FacReputation
Source§fn clone(&self) -> FacReputation
fn clone(&self) -> FacReputation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FacReputation
impl Debug for FacReputation
Source§impl Default for FacReputation
impl Default for FacReputation
Source§impl HasSchema for FacReputation
impl HasSchema for FacReputation
Source§impl PartialEq for FacReputation
impl PartialEq for FacReputation
Source§fn eq(&self, other: &FacReputation) -> bool
fn eq(&self, other: &FacReputation) -> bool
self and other values to be equal, and is used by ==.